voyent
icefaces 1.8.1 to 3.3 migration problems  XML
Forum Index -> General Help
Author Message
jeff_prideaux

Joined: 07/Sep/2011 18:59:17
Messages: 15
Offline


I have a big icefaces 1.8.1 app that I've been putting off (for years now) migrating to a newer icefaces version. I'm trying it now and am having problems.

The following is my Tomcat server error log involving

Nov 24, 2014 10:11:13 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:449)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
... 9 more
Caused by: java.lang.NullPointerException
at com.sun.faces.config.DocumentOrderingWrapper.init(DocumentOrderingWrapper.java:572)
at com.sun.faces.config.DocumentOrderingWrapper.<init>(DocumentOrderingWrapper.java:157)
at com.sun.faces.config.ConfigManager.sortDocuments(ConfigManager.java:588)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:358)
... 10 more

Nov 24, 2014 10:11:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 24, 2014 10:11:14 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/dagger] startup failed due to previous errors

Can anyone tell what the likely suspects would be from the error messages?
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


You may want to just copy a web.xml from an ICEfaces sample app (if you are using ace and ice components you can probably look at the showcase web.xml). Something is incorrect in your configuration (could just be the namespace declaration in your web.xml and/or faces-config.xml that jsf 2 is choking on?).
There is no ICEfaces in that stack trace, appears to be your jsf 2 configuration of your app has not been ported perhaps.
jeff_prideaux

Joined: 07/Sep/2011 18:59:17
Messages: 15
Offline


Thanks for the tips. I'll be trying that. I found yesterday that when I purposefully remove my managed-bean lines from my faces-config.xml file, the web-app comes up without errors (but of course I can't use the beans). My problem is something to do with managing my backing beans.
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


Did you see this?
http://www.mkyong.com/jsf2/configure-managed-beans-in-jsf-2-0/

also make sure you are using the correct namespace/versioning
jeff_prideaux

Joined: 07/Sep/2011 18:59:17
Messages: 15
Offline


I found and fixed some syntax problems in my managed bean XML configuration files. The app now comes up but with other problems. For example, I'm getting an error when browsing back to pages:

"Component ID XXX has already been found in the view"

In case I am mixing icefaces jar files inappropriately, I've listed all my jar files below. Many are not related to icefaces, but for those those that are related to icefaces, can you tell if any are there inappropriately for an application that was originally developed with icefaces 1.8.2 and then migrated to icefaces 3.3?

activation-1.1.jar
activation.jar
asm-3.1.jar
backport-util-concurrent.jar
barbecue-1.5-beta1.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-discovery.jar
commons-el.jar
commons-fileupload-1.3.1.jar
commons-io-1.4.jar
commons-logging.jar
commons-math-2.0.jar
el-api-2.2.1-b03.jar
el-api.jar
el-ri.jar
encog-engine-2.5.0.jar
FastInfoset.jar
httpclient-4.3.4.jar
httpcore-4.3.2.jar
httpmime-4.3.4.jar
icefaces-ace.jar
icefaces-compat.jar
icefaces.jar
icepush.jar
iText-2.1.5.jar
jai_codec.jar
jai_core.jar
javaws.jar
javax.annotation.jar
javax.faces.jar
javax.servlet.jar
javax.servlet.jsp.jar
jaxb-api-2.1.jar
jaxb-api.jar
jaxb-impl-2.1.10.jar
jaxb-impl.jar
jaxb-xjc.jar
jaxb1-impl.jar
jcommon-1.0.16.jar
jdom.jar
jersey-core-1.0.3.1.jar
jersey-server-1.0.3.1.jar
jfreechart-1.0.13.jar
jhighlight-1.0.jar
jsr173_1.0_api.jar
jsr311-api-1.0.jar
jstl.jar
jxl.jar
krysalis-jCharts-1.0.0-alpha-1.jar
log4j-1.2.9.jar
neuroph-2.6.jar
pd4ml.jar
pd4ml_tl.jar
plugin.jar
poi-3.5-beta4-20081128.jar
poi-contrib-3.5-beta4-20081128.jar
poi-ooxml-3.5-beta4-20081128.jar
poi-scratchpad-3.5-beta4-20081128.jar
portlet2-api.jar
ss_css2.jar
stax-api-1.0-2.jar
uk.co.mmscomputing.device.twain.jar
webservices-api.jar
webservices-extra-api.jar
webservices-extra.jar
webservices-rt.jar
zip4j_1.3.1.jar
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


It could be your web.xml
For example, if you have an
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
in your web.xml (older 1.8 version may have had this) or even using
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
the jsf 2 will automatically be loading, and you could be loading it again, which causes duplicate component Id's to be found in the view.

2 icefaces jars will also cause 2 this error. YOu need to whittle down that list of jars. backport-util is no longer required, and the only commons-* is the commons-logging (I think) for the compat jar. You should never deploy a servlet-api jar as each application server has it's own.
Take a web.xml from a sample app (probably showcase) in your distribution bundle you are using. build it and look at the jars present. Get rid of the rest, compile and see if your app uses others. You can also look at the maven poms in the bundle. Most IDE's will show you dependency charts based on those.
jprideaux

Joined: 04/Apr/2008 00:00:00
Messages: 5
Offline


I did have the following in my web-app web.xmlk

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

but when I comment it out, Tomcat won't start and has the following error:

SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/dagger]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)

so it looks like that XML tag may be needed.

I am getting some other indications that something might be attempting to load twice. For example,

Dec 01, 2014 5:24:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(d:\xampp\tomcat\webapps\dagger\WEB-INF\lib\el-api-2.2.1-b03.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
Dec 01, 2014 5:24:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(d:\xampp\tomcat\webapps\dagger\WEB-INF\lib\el-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
Dec 01, 2014 5:24:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(d:\xampp\tomcat\webapps\dagger\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Dec 01, 2014 5:24:12 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(d:\xampp\tomcat\webapps\dagger\WEB-INF\lib\javax.servlet.jsp.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class

I'm not sure how to address this. Is it a problem with extra or files present or extra configuration lines in web.xml?
judy.guglielmin

Joined: 20/Feb/2007 00:00:00
Messages: 1396
Offline


not sure which app server you are using, but the servlet-api as well as the el implementation are usually part of the server /lib.
for example, if you have tomcat6, then el 1 is bundled, but you can modify the server to include the el-2 jar instead.
Otherwise, you can use tomcat7 which has the el-2 jar (not the actual name of the jar..you need to look at the app server to see what jars are bundled).
Basically, you need to clean up all those jars and only include what you need. review the server included libs and then what you want to use, whether you need to modify the server or use a newer one.
Build the samples in your distribution bundle and then deploy them to your app server. That will show you the jars required for icefaces and those sample apps.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team