Closed jeromeheissler closed 8 years ago
I have the same issue with project oflaDemo from https://github.com/Red5/red5-examples. I do a mvn package then copy the war to the webapps directory and the war deployer throw the same exception :
[ERROR] [Red5_Scheduler_Worker-2] org.apache.tomcat.util.digester.Digester - Begin event threw exception
java.lang.ClassNotFoundException: org.apache.tomcat.util.descriptor.web.FilterDef
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332) ~[tomcat-embed-core.jar:8.0.26]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) ~[tomcat-embed-core.jar:8.0.26]
...
[ERROR] [Red5_Scheduler_Worker-2] org.apache.tomcat.util.descriptor.web.WebXmlParser - Parse error in application web.xml file at file:/opt/red5-server-1.0.6/webapps/oflaDemo/WEB-INF/web.xml
org.xml.sax.SAXParseException: Error at (19, 13) : org.apache.tomcat.util.descriptor.web.FilterDef
For more information i'm working on a mac with java 1.8.0_60
same error here with the oflaDemo.
SEVERE: Parse error in application web.xml file at file:/opt/red5/webapps/oflaDemo/WEB-INF/web.xml
org.xml.sax.SAXParseException; systemId: file:/opt/red5/webapps/oflaDemo/WEB-INF/web.xml; lineNumber: 19; columnNumber: 13; Error at (19, 13) : org.apache.tomcat.util.descriptor.web.FilterDef
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1908)
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1940)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1181)
Throws exception when i am going to install oflaDemo from the webpanel installer.
Tried all the other example apps. Can't get any of them properly installed. WebXMLParser throws SAXParseException on everyone of them.
red5 is installed on centos 7 with jdk 1.8.0_66.
I found the missing class in the regular tomcat archive; it is in the tomcat-util-scan.jar which is not part of the embeded package. You would be able to resolve this issue by adding the jar.
added the jar - still not working
For all that have experienced this issue, does it only occur when the WarDeployer deploys your war, or does it happen every time your app starts up?
happens when I build the war and then deploy it manually too
It happens always when the WarDeployer deploys. This doesn't happen in 1.04.
Same issue here. Worked in 1.0.4, testing 1.0.6 and experiencing this.
Any solutions?
Make sure you're using Spring 4.2.4; they fixed a classloader issue, it may be the same one we saw.
On Wed, Feb 10, 2016 at 7:11 PM Mike notifications@github.com wrote:
Same issue here. Worked in 1.0.4, testing 1.0.6 and experiencing this.
Any solutions?
— Reply to this email directly or view it on GitHub https://github.com/Red5/red5-server/issues/123#issuecomment-182645880.
tried the above provided methods, all failed. are there any other suggestions?
Is this still an issue with the latest 1.0.7-M8 release? I can't replicate the issue.
Well, expecting stable release of 1.0.7, thanks a lot
1.0.7-M8 is looking pretty good in our testing so far over at Red5 Pro; All of these M8 pre-releases are helping us get to our actual release, which should be very soon.
This occurs at deployment time, as long as there will not be an exception after deploying start
Hi, I has had the same error. The Red5 server has started after that I deploy a war package. It's version 1.0.7 Release latest.
[INFO] [pool-5-thread-1] org.red5.server.scope.WebScope - Set server [Server@511db9fbmap['/chat' -> 'default', '/vod' -> 'default', '/' -> 'default']] [INFO] [pool-5-thread-1] org.red5.server.Server - Add mapping global: default host: localhost context: installer [INFO] [pool-5-thread-1] org.red5.server.Server - Add mapping global: default host: localhost:5080 context: installer [INFO] [pool-5-thread-1] org.red5.server.service.Installer - Installer service created [INFO] [pool-4-thread-1] org.red5.server.tomcat.WarDeployer - Deploy wars with app start [INFO] [pool-4-thread-1] org.red5.server.tomcat.TomcatLoader - Starting Tomcat - Web application [INFO] [pool-4-thread-1] org.red5.server.tomcat.TomcatLoader - Application root: d:/red5/dev/red5-server-1.0.7-RELEASE/red5-server/webapps Aug 12, 2016 4:57:09 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.ClassNotFoundException: org.apache.tomcat.util.descriptor.web.ServletDef at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139) at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:359) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:956) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1451) at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:120) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1115) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.red5.server.tomcat.EmbeddedTomcat.addWebapp(EmbeddedTomcat.java:52)
If I restart server, it's deploy ok.
I'm using Red5 version 1.0,5. It doesn't has that error.
Regards
I have had a solution. I only reset classLoader in EmbeddedTomcat class
Old code:
public Context addWebapp(Host host, String contextPath, String docBase, ContextConfig config) { Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); ctx.addLifecycleListener(new DefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); config.setDefaultWebXml(noDefaultWebXmlPath()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
New code:
public Context addWebapp(Host host, String contextPath, String docBase, ContextConfig config) { Context ctx = createContext(host, contextPath); ctx.setPath(contextPath); ctx.setDocBase(docBase); ctx.addLifecycleListener(new DefaultWebXmlListener()); ctx.setConfigFile(getWebappConfigFile(docBase, contextPath)); ctx.addLifecycleListener(config); config.setDefaultWebXml(noDefaultWebXmlPath()); if (host == null) { host = getHost(); } // reset ParentClassLoader if(!host.getParentClassLoader().equals(Thread.currentThread().getContextClassLoader())) { host.setParentClassLoader(Thread.currentThread().getContextClassLoader()); } host.addChild(ctx); return ctx; }
Rebuild red5 tomcat plugin and replace the old lib (red5-server\plugins\tomcatplugin-1.12.jar) And it work.
I built a file jar at: https://drive.google.com/file/d/0ByNfPmtze2FjWk1EQjJEaWM4dkk/view?usp=sharing
Thanks for the patch @ncdanh90 it'll be in tomcatplugin 1.14
Hi,
I would like to use the wardeployer to deploy my application. But when it parse my web.xml configuration it throw an exception :
My web.xml is :
If I unzip manually the war file, the application start normally. Does anyone know why it happens ?