| Author |
Message |
|
|
Philip,
I am just back from vacation.
Thanks for your suggestion of removing the Sun RI jars but that did not solve the problem either. I did however get things working; I am now able to deploy an ear with a 1.1.5 Icefaces .war (showcase.war) in JBoss 4.0.5 and use the JBoss Web Loader. Basically I just reinstalled JBoss 4.0.5 with an EJB 3 configuration, created an ear that contained the showcase.war and deployed it … volia … it all worked. So why did I have so much trouble before? I am not quite sure but from posts I have read I was not the only one.
Here are some of the things I learned:
There is no need to pass the ice-faces.jar as an init parameter to the JspServlet in the tomcat55.sar/conf/web.xml. I had tried passing the ice-faces.jar as an init parameter to the JspServlet because that is what I do with tomahawk.
Do not put the ice-faces jars in the tomcat55.sar/jsf-lib; I didn’t have to touch this directory after reinstalling of JBoss 4.0.5. When using tomahawk I do put the tomahawk.jar in the jsf-lib directory but with an Icefaces implementation this does not seem to be the case.
The following jars should be in the war’s WEB-INF/lib:
el-api.jar
el-ri.jar
icefaces.jar
icefaces-comps.jar
Thanks for all your help.
Charlie
|
 |
|
|
Philip,
One change to my original post is that I am using JBoss 4.0.4 not 4.0.5.
My goal was to get an Icefaces war working within an ear with UseJBossWebLoader set to true (because I have a "legacy" application that has to be deployed that way).
So I added the showcase.war to one of our existing application ears. Showcase deployed fine and ran fine within the ear until I changed UseJBossWebLoader from false to true.
The following documents the problems I had and the things I tried:
With no changes except changing UseJBossWebLoader from false to true, I got:
13:31:39,970 ERROR [Digester] Digester.getParser:
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:486)
at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:691)
at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:899)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
No worries ... I kind of expected this one. I removed all the jars from the WEB-INF/lib that would be loaded by other classloaders and got the following error:
...
12:14:01,471 INFO [D2DViewHandler]
ICEsoft Technologies, Inc.
ICEfaces 1.5.1
Build number: 5
Revision: 12374
12:14:02,378 ERROR [[/aims]] StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the f
aces-initialization does not work at all - make sure that you properly include all configuration set
tings necessary for a basic faces application and that all the necessary libs are included. Also che
ck the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web
-containers which do not support registering context-listeners via TLD files and a context listener
is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
...
No worries ... I have seen this one before and there are lots of forum entries on how to fix it:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94248
Do not deploy the Myfaces jars in the WEB-INF/lib directory, they are already present in the tomcat deploy
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces
Classloader wiki
http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
Must add tomahawk-1.1.3.jar to \deploy\jbossweb-tomcat55.sar\jsf-libs and configure
\deploy\jbossweb-tomcat55.sar\conf/web.xml
Ok, I am not using tomahawk, I am using Icefaces. So I added ice-faces.jar and icefaces-comps.jar to tomcat55.sar\jsf-libs and configured tomcat55.sar\conf\web.xml
<init-param>
<description>IceFaces tlds</description>
<param-name>tagLibJar1</param-name>
<param-value>jsf-libs/icefaces.jar</param-value>
</init-param>
I got the following errors:
12:43:18,469 INFO [D2DViewHandler]
ICEsoft Technologies, Inc.
ICEfaces 1.5.1
Build number: 5
Revision: 12374
12:43:18,469 ERROR [STDERR] java.lang.ClassCastException: com.icesoft.faces.application.D2DViewHandler
12:43:18,860 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:560)
...
... the cycle continues ... I am sure that it is just a matter of getting the right jars in the right places. So far I have not found the "sweet spot", that's where I was hoping for some help.
Thanks.
Charlie
|
 |
|
|
I am having problems deploying a war that uses Icefaces 1.1.5 within an ear in JBoss 4.0.5.
I have no problem deploying an Icefaces .war to the deploy directory. The problem comes when I try and deploy the war within an ear when using the JBoss classloader.
Everything works fine if I have am using the Tomcat class loader (UseJBossWebLoader=false in jbossweb-tomcat55.sar/META-INF/jboss-services.xml).
But if I want to use the JBossWebLoader things start to unravel.
It appears to be a classloader problem. If have tried many combinations of deploying jars to the various lib directories: jbossweb-tomcat55.sar/jsf-libs, web-inf/libs, ear/lib, ear/applib and even server/lib. Unfortunately the application can only be deployed using the JbossWebLoader and thus if I want to use Icefaces (and I do, as it has worked very well in another application) I need to get Icefaces deploying with the JbossWebLoader.
I have followed informative threads in this and other forums but they all dealt with problems of deploying a pure war, not an ear. Any assistance would be greatly appreciated.
|
 |
|
|
|
|