Forums de discussion

(hot) deployment errors

thumbnail
Johann Kneringer, modifié il y a 12 années.

(hot) deployment errors

Junior Member Publications: 42 Date d'inscription: 10/11/11 Publications récentes
Hello Guys,

I'm developing a liferay jsf2 portlet using liferay sdk 6.1 and icefaces 2.0...

Until yesterday everything worked fine, but today I got following error while hot-deploying:

13:48:31,453 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.kernel.xml.DocumentException: Error on line 4 of document http://www.oracle.com/splash/www/index.html : s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'. Nested exception: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'.
com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.kernel.xml.DocumentException: Error on line 4 of document http://www.oracle.com/splash/www/index.html : s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'. Nested exception: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'.
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:62)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:221)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: com.liferay.portal.kernel.xml.DocumentException: Error on line 4 of document http://www.oracle.com/splash/www/index.html : s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'. Nested exception: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'.
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:349)
at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:115)
at com.liferay.portal.tools.deploy.PortletDeployer.setupJSF(PortletDeployer.java:492)
at com.liferay.portal.tools.deploy.PortletDeployer.getExtraContent(PortletDeployer.java:151)
at com.liferay.portal.tools.deploy.BaseDeployer.updateWebXml(BaseDeployer.java:1583)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:487)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 4 more
Caused by: org.dom4j.DocumentException: Error on line 4 of document http://www.oracle.com/splash/www/index.html : s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'. Nested exception: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";'.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:346)
... 11 more

Seems like a schema is offline, right?

Could possibly be this one: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd or the definition in portlet.xml....is there a know issue?

I only found this on the net: http://blogs.oracle.com/theaquarium/entry/java_net_outage_update

But as you can read there the problems should be fixed...Are there known issues from your side?

Another issue I get for a while during hot deployment:

14:01:24,777 INFO [PortletExplodedTomcatListener:59] Modifying portlets for /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/deploy/raumviewer-portlet.xml
Copying 1 file to /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/tomcat-6.0.32/webapps/raumviewer-portlet/WEB-INF/classes
Copying 1 file to /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/tomcat-6.0.32/webapps/raumviewer-portlet/WEB-INF/classes
Copying 1 file to /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/tomcat-6.0.32/webapps/raumviewer-portlet/META-INF
Copying 1 file to /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/tomcat-6.0.32/webapps/raumviewer-portlet/WEB-INF/jsp
java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:131)
at com.sun.faces.application.WebappLifecycleListener.getActiveSessions(WebappLifecycleListener.java:378)
at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:524)
at com.sun.faces.config.ConfigureListener.access$600(ConfigureListener.java:128)
at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1034)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:379)
at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:583)
at com.sun.faces.config.ConfigureListener.access$600(ConfigureListener.java:128)
at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1034)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:1315)
at java.lang.ClassLoader.getResources(ClassLoader.java:1041)
at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.loadURLs(MetaInfFacesConfigResourceProvider.java:159)
at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:108)
at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1180)
at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1149)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:641)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
... 12 more
30.06.2011 14:01:28 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/raumviewer-portlet]
30.06.2011 14:01:28 org.apache.catalina.startup.HostConfig checkResources
WARNUNG: Error while removing context [/raumviewer-portlet]
java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2963)
at org.apache.catalina.loader.WebappClassLoader.findResource(WebappClassLoader.java:1242)
at org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1475)
at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:1972)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1915)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4913)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:932)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1159)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1380)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
at java.lang.Thread.run(Thread.java:662)
30.06.2011 14:01:28 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor raumviewer-portlet.xml
30.06.2011 14:01:28 org.apache.catalina.startup.HostConfig deployDescriptor
WARNUNG: A docBase /home/kneringerjohann/Programme/liferay/running portal/liferay-portal-6.1.0/tomcat-6.0.32/webapps/raumviewer-portlet inside the host appBase has been specified, and will be ignored
30.06.2011 14:01:28 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.


Is there a known issue for this?

I've developed the portlet using the librarys from the examples and configurations from web.xml from the examples on portletfaces with icefaces

Thanks for your time,

Greetings from Austria,

Johann
thumbnail
Neil Griffin, modifié il y a 12 années.

RE: (hot) deployment errors

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Regarding the first hot deploy issue, yes indeed the schema must be offline. This happened once before, several months ago.

Regarding the second hot deploy issue, I've never seen that before. Here's the code for Mojarra WebappLifecycleListener.java line 378:

public List<HttpSession> getActiveSessions() {
return new ArrayList<HttpSession>(activeSessions);
}

So there may be some stale sessions or something that sometimes cause the problem, I don't know. Just a guess.
PortletFaces Community Member, modifié il y a 12 années.

RE: (hot) deployment errors

Regular Member Publications: 199 Date d'inscription: 03/04/12 Publications récentes
I've run into that second error as well. I've found that shutting down the servlet container (Tomcat) and deleting the portlet's folder from webapps will allow you to deploy successfully upon restarting Tomcat and deploying again.