| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 27/07/2008 22:31:07
|
kurzweil4
Joined: 26/03/2007 00:00:00
Messages: 35
Offline
|
I am using MyEclipse 6.0.1, ICEFaces 1.7.1, and Sun Application Server 9.1 (Glassfish v2).
I have a simple EAR with an EJB-Jar with one session bean, and a WAR with one page and one managed session bean that uses injection to get an instance of the session EJB.
When I add ICEFaces capabilities to my web project, and deploy the EAR, EJB injection stops working. There are no error messages in the server's log related to this, it just simply stops injecting.
Here are the following configurations I have tried and the results:
JSF Capabilities Only: Injection Works
JSF and Facelets Capabilities: Injection Works
JSF and ICEFaces Capabilities (no Facelets): Injection Fails
JSF and ICEFaces and ICEFaces Facelets Capabilities: Injection Fails
Any ideas on this? I can find nothing on the web about EJB injection problems when using ICEFaces.
Thanks,
Kurzweil4
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 29/07/2008 10:58:33
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2701
Offline
|
Here's a layout that works for me on Glassfish with ICEfaces and Facelets, using Toplink:
Code:
/ear
/META-INF
application.xml
my-ejb.jar
backport-util-concurrent.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-discovery.jar
commons-el.jar
commons-fileupload.jar
commons-logging.jar
el-ri.jar
icefaces-comps.jar
icefaces-facelets.jar
icefaces.jar
my-war.war
/WEB-INF/
lib/my-services.jar
@EJB injection
If this layout doesn't work for you, perhaps you could post your example.
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 29/07/2008 22:53:20
|
kurzweil4
Joined: 26/03/2007 00:00:00
Messages: 35
Offline
|
Philip,
Thanks for the response.
Are you manually packing your EAR to get it set up like that?
If I understand correctly, all of the jars in the WAR should be in the top level of the EAR. What I am confused about is the my-services.jar. Are you saying that my managed mean (which is what I am injecting into) should be in its own jar?
Thanks,
Kurzweil4
philip.breau wrote:
Here's a layout that works for me on Glassfish with ICEfaces and Facelets, using Toplink:
Code:
/ear
/META-INF
application.xml
my-ejb.jar
backport-util-concurrent.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-discovery.jar
commons-el.jar
commons-fileupload.jar
commons-logging.jar
el-ri.jar
icefaces-comps.jar
icefaces-facelets.jar
icefaces.jar
my-war.war
/WEB-INF/
lib/my-services.jar
@EJB injection
If this layout doesn't work for you, perhaps you could post your example.
Philip
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 30/07/2008 00:14:17
|
kurzweil4
Joined: 26/03/2007 00:00:00
Messages: 35
Offline
|
Philip,
I packaged my EAR according to your diagram, but injection still failed.
I opened an issue since this does not "seem" to be a configuration nor programmatic error on my part:
http://jira.icefaces.org//browse/ICE-3360
There you can download 2 zip files. They contain the EAR files and all of the respective project files. Injection works for the zip called JSF Only, and fails for the JSF ICEFaces zip. The URL required for the test is in the comments.
ICEFaces components still work, it just seems that something is causing injection to get blocked. I turned on JSF and EJB logging to FINEST, and still no suspicious error messages turned up.
Any light you can shed on this would be greatly appreciated.
Thanks,
Kurzweil4
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 30/07/2008 14:42:38
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2701
Offline
|
Change your web.xml version to 2.5 and please close the jira.
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 30/07/2008 21:10:19
|
kurzweil4
Joined: 26/03/2007 00:00:00
Messages: 35
Offline
|
Philip,
Wow! That worked! Why did that fix the problem?
What happened is that when I added ICEFaces capabilities to my project, the wizard in MyEclipse said that ICEFaces needed to run in JSF 1.1 compatibility mode. At that point it told me it need to modify web.xml and faces-config.xml for that purpose and asked me if I wanted to proceed, so I said yes.
I would be more than happy to close the issue I opened. I looked around for a way to close, but I could not figure it out. How exactly do I close the issue?
Thanks so much for you help!
Ryan
philip.breau wrote:
Change your web.xml version to 2.5 and please close the jira.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 31/07/2008 09:16:15
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2701
Offline
|
No problem. Sorry, i forgot only we can close jiras. We should probably try to keep the set web.xml version in our IDE plugins. I'll create another jira for that. I don't believe that the web.xml version has anything to do with the JSF 1.1 compatibility, which is just set by the faces-config version. But EJB injection won't work unless you're running under Servlet spec 2.5.
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 31/07/2008 11:02:04
|
kurzweil4
Joined: 26/03/2007 00:00:00
Messages: 35
Offline
|
Philip,
Is it necessary for the faces-config.xml to be changed to 1.1? I also changed the version of this file back up to 1.2, and my EAR deployed and ran with no problems.
Ryan
philip.breau wrote:
No problem. Sorry, i forgot only we can close jiras. We should probably try to keep the set web.xml version in our IDE plugins. I'll create another jira for that. I don't believe that the web.xml version has anything to do with the JSF 1.1 compatibility, which is just set by the faces-config version. But EJB injection won't work unless you're running under Servlet spec 2.5.
Philip
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 31/07/2008 11:04:34
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2701
Offline
|
Yes, you have to keep the faces-config version at 1.1 as ICEfaces still requires the JSF 1.1 compatibility mode when using the 1.2 jars.
|
. |
|
|
 |
|
|