well I have an application which I am building using Maven and running on eclipse(tomcat runtime) , it is working fine. But when I deploy the WAR of the project on tomcat (not using eclipse), its failing. The error is due to a coustome jar which I have included.
Stack trace are as follows:-
Aug 26, 2013 3:18:16 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in dependencyCheck
java.io.IOException: Jar: smartcharging-model.jar
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:207)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1256)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:714)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:219)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:212)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.zip.ZipException: invalid distance too far back
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.util.jar.JarInputStream.read(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.util.jar.JarInputStream.getBytes(Unknown Source)
at java.util.jar.JarInputStream.checkManifest(Unknown Source)
at java.util.jar.JarInputStream.<init>(Unknown Source)
at java.util.jar.JarInputStream.<init>(Unknown Source)
at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:395)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:196)
... 29 more
Aug 26, 2013 3:18:16 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Aug 26, 2013 3:18:16 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Smart-0.0.1-SNAPSHOT] startup failed due to previous errors
Aug 26, 2013 3:18:16 PM org.apache.catalina.util.LifecycleBase stop
INFO: The stop() method was called on component [WebappLoader[/Smart-0.0.1-SNAPSHOT]] after stop() had already been called. The second call will be ignored.
Run
mvn clean install
and your code again
sounds like you have a corrupted jar. Have you tried removing it from your local repository (~/.m2/repository) and
mvn clean package
again ? eclipse might not share the same repository that the one you use to build the war in command line.
I still have an issue , even after running all the above commands. As of now I have found an workaround where in I am deleting that JAR file from the Target deployed on the server and then again copying it. I think so manually copping the JAR solves the issue.
Check the generated manifest file in META-INF folder,
make sure that 'header : value' are in the same line.
I had the same issue and it was caused by encoding problems during the transfer of the war file from a Windows to a Unix system.
For this task I used WinSCP with the "Standard" file transfer option. As soon as I switched to the "Binary" format it worked and the war could be read by the application server.
Related
I am modernizing a project that's been built using Eclipse Kepler's Export control for a few years. I ran into issues trying to jump straight to my end configuration (Java 8, Tomcat 8, CXF, and using Maven for builds) so I'm trying to do it piecemeal, and I've been stuck for two days.
I am using Eclipse Mars.2 Release (4.5.2).
For historical reasons, I have two projects, MyImpl project with all of the business logic (which is also the client/consumer of a remote web service, hence the CXF), and MyWebApp, a struts 1 dynamic web project. Everything was good running in Java 7/Tomcat 7. I am trying to introduce Maven, first into the MyImpl project, then into MyWebApp project, and finally building the web service client code.
I rearranged the source code to the maven way (/src/main/java, /src/test/java, etc.) Then I added a POM.xml with all my dependencies for MyImpl project. MyImpl project builds just fine, and MyWebApp project references MyImpl project in Eclipse, so that is good, too. Everything builds, no red Xs. Our test cases are, ahem, not well developed at this point in time, so I can't run those.
When I try and run on Tomcat 7 inside Eclipse, the Servers tab shows MyWebApp project under the Tomcat 7 server, but it does not show MyImpl project under MyWebApp project, as it did before. Yes, Java Build Path/Projects shows that MyWebApp project depends on MyImpl project. Otherwise it wouldn't build.
Tomcat fails to start up with a NoClassDefFoundError:
Jun 08, 2016 4:48:55 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebStarWebApp]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MyWebApp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoClassDefFoundError: com/mycompany/mygroup/myproject/common/util/DB_Exception
at java.lang.Class.getDeclaredFields0(Native Method)
...
DB_Exception is defined in the MyImpl project.
If I double-click the server, click on "Open launch configuration", click on the Classpath tab, I see the JRE System Library under Bootstrap Entries, and bootstrap.jar, tomcat-juli.jar, and tools.jar under User Entries. If I add MyWebApp project to User Entries and start the server, I get a class loader exception:
Jun 08, 2016 5:20:54 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "mycompany/common/logging/ISmLog"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
<stack trace through initialization code>
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
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)
If, instead of adding MyWebApp project to the run configuration, I only add MyImpl.jar (digging into the MyImpl project, selecting MyImpl\target\MyImpl-1.0.jar), I still get a NoClassDefFoundError:
Jun 08, 2016 5:32:07 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: mycompany/myproject/logging/InstrRecord
at com.mycompany.myproject.struts.plugins.MyImpl_PlugIn.init(MyImpl_PlugIn.java:55)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
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: java.lang.ClassNotFoundException: mycompany/myproject/logging/InstrRecord
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
This is with a brand new workspace and a fresh import of the code base.
When I try to access Services, Validate and Administration link on the URL http://localhost:82/SOAPDemo/, where my Axis2 Web Application is deployed, it gives me the following error :
Servlet.init() for servlet AxisServlet threw exception
At the back-end, while apache tomcat 7 is being started in eclipse, it shows me the following warning :
[WARN] Unable to instantiate deployer org.apache.axis2.deployment.ServiceDeployer;
I solved this by adding axis2-jaxws.jar in the classpath.
You can integrate it with maven : http://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxws
I got the same issue when I use axis2 1.7.9, then I tried to follow
"I solved this by adding axis2-jaxws.jar in the classpath. You can integrate it with maven : http://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxws", solution by Pierre-Yves Le Dévéhat
But it didn't work. Then I tried the
"I probably hit the same issue, here is the call stack:" ->
"I fixed it with old axis2 1.6.4 instead of 1.7.1 installation and new project creation", solution by user6140506, edited by TeWu
then the error is fixed.
axis2 1.6.4 is working for me...
I probably hit the same issue, here is the call stack:
[WARN] Unable to instantiate deployer org.apache.axis2.deployment.ServiceDeployer; see debug logs for more details
avr. 28, 2016 6:27:14 PM org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:128)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:144)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:66)
at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:61)
at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:152)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:233)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4996)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.ws.commons.schema.resolver.URIResolver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
... 24 more
I fixed it with old axis2 1.6.4 instead of 1.7.1 installation and new project creation
I'm trying to set up tomcat 7.0.57 to run a web application, in Eclipse Luna. I've added the webapp to the server, and tried to publish the serve but I get this error:
Dec 05, 2014 10:07:13 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.Catalina.load(Catalina.java:617)
at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Dec 05, 2014 10:07:13 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml: Error at (21, 76) : org.apache.catalina.startup.VersionLoggerListener
Dec 05, 2014 10:07:13 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.startup.VersionLoggerListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.Catalina.load(Catalina.java:617)
at org.apache.catalina.startup.Catalina.start(Catalina.java:679)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Dec 05, 2014 10:07:13 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml: Error at (21, 76) : org.apache.catalina.startup.VersionLoggerListener
Dec 05, 2014 10:07:13 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
Clearly something is wrong with the VersionLoggerListener because it can't find it. All my server.xml (accessed via my workspace folder) contains on line 21 is this:
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
Which seems pretty innocent. Googling doesn't seem to tell me this is missing in other peoples tomcat packages.
Checking my 'installation' of tomcat, it looks like this line is missing from the equivalent server.xml
Should they be the same? Which should I point to Workspace version, or installation version?
I don't know what's up though, here it implied that their equivalent ThreadLocalLeakPreventionListener was recently added and it's some kind of version conflict, which I don't think is the case here (?) as both are version 7 of tomcat.
Here it looks like a jar is missing, but I don't know how that would happen as I'm sure VersionLoggerListener is a core class to catalina and should be there as part of the installation.
So what is it?
I faced the same issue while switching Tomcat7 to Tomcat6.
Because the conf folder under CATALINA_BASE folder, you were using was from different tomcat version from current version.
In Tomcat 7, you will find VersionLoggerListener in server.xml
To start tomcat, just change the folder pointing to new location of CATALINA_BASE with conf folder OR DELETE the conf folder and replace it with your current tomcat conf.
For Eclipse, server Folder:.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf
I had two different version of Tomcat going. I deleted the server (using the server view) and then re-added it pointing to the installation.
I was using Tomcat 7, and then I installed Tomcat 6 in a different folder and I tried runing both Tomcat versions in separate workstations in eclipse.
Somehow Tomcat 7 did not state the same error in eclipse console.
I deleted Tomcat 7 from Eclipse and reset the Tomcat 7 server.
This workaround resolved the issue.
This error also happens if you copy some files between tomcat installations.
For example if files from the /lib folder of 7.0.57 are copied to 7.0.99, take care to reinstall the libraries according to the tomcat version.
I can able to run my tomcat 4.1 through terminal but i can't run inbuilt with eclipse. when i start tomcat it throws an error :
Sep 16, 2014 12:05:06 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-4040
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
Install path.1:/home/likewise-open/GLOBAL/Workspace/V4.3/WEBROOT
Install path.2:/home/likewise-open/GLOBAL/Workspace/V4.3/WEBROOT
Install path.3:/home/likewise-open/GLOBAL/Workspace/V4.3/WEBROOT
Install path.4:/home/likewise-open/GLOBAL/Workspace/V4.3/WEBROOT
Echain Real path.5:/home/likewise-open/GLOBAL/Workspace/V4.3/WEBROOT
Sep 16, 2014 12:06:13 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
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.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:338)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:395)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:352)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
Caused by: java.lang.OutOfMemoryError
Sep 16, 2014 12:06:16 PM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.OutOfMemoryError
But the same tomcat run through in my terminal.
Kindly suggest where i am going wrong.
P.S : i am working on ubuntu 10.10, eclipse Kepler with tomcat 4.1 version.
Jakarta Tomcat 4.x released about in 2002 - 2003. I didn't use the old stuffs like these. In my opinion, you shoud:
* Download and install Eclipse old version, as old as better ( http://en.wikipedia.org/wiki/Eclipse_(software)#Releases ).
* Try Tomcat 4.x plugin for Eclipse IDE: http://www.eclipsetotale.com/tomcatPlugin.html
Stop standalone Tomcat instance before run Tomcat from Eclipse.
Environment: Windows 7, Eclipse, GWT 2.5, Tomcat7, Java jre7
Created a GWT Web app project and let the sample code be generated. The app runs fine (w/o any code change) in Eclipse in debug mode. GWT compiled and deployed on Tomcat7 on the same machine. When a RPC request is made, get ClassNotFoundException for service implemention class GreetingServiceImpl. Log from Tomcat7 is below.
Do I need to add some setting that is missing in the generated sample code? I could not find any answer to this on the web. I am kind of blocked... please advise.
----------------
Jan 28, 2013 11:55:34 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet greetServlet as unavailable
Jan 28, 2013 11:55:34 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet greetServlet
java.lang.ClassNotFoundException: com.test.sample.server.GreetingServiceImpl
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:858)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
----------------
Try unpacking your WAR file and searching to make sure either the JAR file that contains GreetingsServiceImpl is in /WEB-INF/lib OR that the class GreetingsServiceImpl is in /WEB-INF/classes.
It is hard to say which folder to look in, without knowing what GreetingsServiceImpl is and how it gets incorporated into your build.