Exception occurred starting up Jetty while using URLRewrite - java

I configured URLRewrite to my application. But when I tried to start up my Jetty server with Java code, an exception occurred as below:
2016-11-22 14:23:34.756:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/Users/xxx/Documents/Developer/myapp/src/main/webapp/}
java.lang.reflect.InvocationTargetException
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:497)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:80)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:67)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:332)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1210)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:610)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
at org.eclipse.jetty.server.Server.doStart(Server.java:262)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
But it worked when I deployed it to Tomcat server.
Anyone can help with this? Thank you in advance!

Finally I found that it's caused by the version of servlet-api, which is embedded in Jetty but not the one supports. So I upgraded Jetty to a newer one and changed the version of web.xml to 3.0. Then it works.
Hope this helps!

Related

Cannot deploy application with JSF 1.2 on Weblogic 12c

I have an application that uses JSF 1.2 (Mojarra implementation) and is working fine on Weblogic 10.3.6. Now we are trying to migrate it to Weblogic 12c. We followed the recommendations specified here but it still generates a strange error on deployment:
<Sep 16, 2018 6:37:17,576 PM EEST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: java.lang.NoClassDefFoundError: javax/faces/application/ApplicationWrapper.
java.lang.NoClassDefFoundError: javax/faces/application/ApplicationWrapper
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
.........................................
Caused by: java.lang.ClassNotFoundException: javax.faces.application.ApplicationWrapper
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1029)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:473)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:473)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.getConstructor(Class.java:1825)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:517)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:405)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135)
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:717)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:187)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:204)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:200)
Any idea? I cannot upgrade the JSF version for the moment.
All JSF 1.2 related jars are included in the EAR deployed (in APP-INF/lib). The weblogic-application.xml contains the proper configuration:
<wls:prefer-application-packages>
<wls:package-name>org.hibernate.*</wls:package-name>
<wls:package-name>antlr.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>org.apache.commons.net.*</wls:package-name>
<wls:package-name>javax.faces.*</wls:package-name>
<wls:package-name>com.sun.faces.*</wls:package-name>
<wls:package-name>com.bea.faces.*</wls:package-name>
</wls:prefer-application-packages>
<wls:prefer-application-resources>
<wls:resource-name>javax.faces.*</wls:resource-name>
<wls:resource-name>com.sun.faces.*</wls:resource-name>
<wls:resource-name>com.bea.faces.*</wls:resource-name>
<wls:resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</wls:resource-name>
</wls:prefer-application-resources>
What I concluded so far from the error is that the configurations to use JSF 1.2 worked (the class is complaining about is not in JSF 1.2) but I cannot find what who is looking for this class and why (in the code is not used anywhere, obviously since the code is 1.2 compliant)

Gwt 2.8-rc1 super dev mode is not working on IntelliJ IDEA 2016.2.5

My project is starting correctly with GWT 2.7 and 2.8-beta1 in super dev mode
Unfortunately since 2.8-rc1 release it is not starting.
Looks like GWT project dependencies are not configured correctly.
IDE: IntelliJ IDEA 2016.2.5
"C:\Program Files\Java\jdk1.8.0_102\jre\bin\java" -Xmx2048m -XX:MaxPermSize=1024m -Djava.naming.factory.initial=org.eclipse.jetty.jndi.InitialContextFactory -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\<REPO>\com\google\gwt\gwt-codeserver\2.8.0-rc1\gwt-codeserver-2.8.0-rc1.jar;C:\<REPO>\com\google\gwt\gwt-dev\2.8.0-rc1\gwt-dev-2.8.0-rc1.jar;xxx\xxx\src\main\java;xxx\xxx\src\main\resources;xxx\xxx\target\generated-sources\gwt;C:\<REPO>\com\google\jsinterop\jsinterop-annotations\1.0.0\jsinterop-annotations-1.0.0-sources.jar;xxx\domain-model\src\main\java;xxx\domain-model\src\main\resources;xxx\sso-security-lib\src\main\java;xxx\sso-security-lib\src\main\resources;xxx\seleniumtests\src\main\java;xxx\smartgwt-data-integration\src\main\java;xxx\generator\src\main\java;xxx\generator\src\main\resources;xxx\gwt-ui-utils\src\main\java;xxx\gwt-ui-utils\src\main\resources;xxx\gwt-ui-utils\target\generated-sources\gwt;C:\Program Files\Java\jdk1.8.0_102\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\rt.jar;c:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\bcprov-ext-jdk15on-154.jar;c:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\bcprov-jdk15on-154.jar;xxx\xxx\target\test-classes;xxx\xxx\target\xxx\WEB-INF\classes;C:\<REPO>\org\springframework\spring-context\4.2.4.RELEASE\spring-context-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-aop\4.2.4.RELEASE\spring-aop-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-beans\4.2.4.RELEASE\spring-beans-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-core\4.2.4.RELEASE\spring-core-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-expression\4.2.4.RELEASE\spring-expression-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-webmvc\4.2.4.RELEASE\spring-webmvc-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-web\4.2.4.RELEASE\spring-web-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-aspects\4.2.4.RELEASE\spring-aspects-4.2.4.RELEASE.jar;C:\<REPO>\org\aspectj\aspectjweaver\1.8.7\aspectjweaver-1.8.7.jar;C:\<REPO>\com\google\gwt\gwt-servlet\2.8.0-rc1\gwt-servlet-2.8.0-rc1.jar;C:\<REPO>\com\google\gwt\gwt-user\2.8.0-rc1\gwt-user-2.8.0-rc1.jar;C:\<REPO>\com\google\jsinterop\jsinterop-annotations\1.0.0\jsinterop-annotations-1.0.0.jar;C:\<REPO>\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\<REPO>\org\w3c\css\sac\1.3\sac-1.3.jar;C:\<REPO>\org\eclipse\jetty\jetty-plus\8.1.19.v20160209\jetty-plus-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.transaction\1.1.1.v201105210645\javax.transaction-1.1.1.v201105210645.jar;C:\<REPO>\org\eclipse\jetty\jetty-webapp\8.1.19.v20160209\jetty-webapp-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-xml\8.1.19.v20160209\jetty-xml-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-util\8.1.19.v20160209\jetty-util-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-servlet\8.1.19.v20160209\jetty-servlet-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-security\8.1.19.v20160209\jetty-security-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-jndi\8.1.19.v20160209\jetty-jndi-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-server\8.1.19.v20160209\jetty-server-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;C:\<REPO>\org\eclipse\jetty\jetty-continuation\8.1.19.v20160209\jetty-continuation-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-http\8.1.19.v20160209\jetty-http-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-io\8.1.19.v20160209\jetty-io-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.mail.glassfish\1.4.1.v201005082020\javax.mail.glassfish-1.4.1.v201005082020.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.activation\1.1.0.v201105071233\javax.activation-1.1.0.v201105071233.jar;C:\<REPO>\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\<REPO>\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar;C:\<REPO>\junit\junit\4.9\junit-4.9.jar;C:\<REPO>\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\<REPO>\org\mockito\mockito-all\1.9.5\mockito-all-1.9.5.jar;C:\<REPO>\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\<REPO>\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\<REPO>\org\springframework\security\spring-security-core\4.0.3.RELEASE\spring-security-core-4.0.3.RELEASE.jar;C:\<REPO>\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\<REPO>\org\springframework\security\spring-security-config\4.0.3.RELEASE\spring-security-config-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\security\spring-security-web\4.0.3.RELEASE\spring-security-web-4.0.3.RELEASE.jar;C:\<REPO>\javax\servlet\jstl\1.2\jstl-1.2.jar;C:\<REPO>\com\xxx\commons\authentication\xxx-authentication\1.0.5\xxx-authentication-1.0.5.jar;C:\<REPO>\org\samba\jcifs\jcifs\1.3.12\jcifs-1.3.12.jar;C:\<REPO>\com\ioplex\jespa-licensed\1.1.13-INTERNAL-1\jespa-licensed-1.1.13-INTERNAL-1.jar;C:\<REPO>\org\springframework\security\spring-security-ldap\4.0.3.RELEASE\spring-security-ldap-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\spring-tx\4.2.2.RELEASE\spring-tx-4.2.2.RELEASE.jar;C:\<REPO>\org\springframework\ldap\spring-ldap-core\2.1.0.RELEASE\spring-ldap-core-2.1.0.RELEASE.jar;C:\<REPO>\org\slf4j\slf4j-api\1.7.12\slf4j-api-1.7.12.jar;C:\<REPO>\com\google\guava\guava-gwt\19.0\guava-gwt-19.0.jar;C:\<REPO>\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\<REPO>\com\google\errorprone\error_prone_annotations\2.0.2\error_prone_annotations-2.0.2.jar;C:\<REPO>\com\google\j2objc\j2objc-annotations\0.1\j2objc-annotations-0.1.jar;C:\<REPO>\com\google\guava\guava\19.0\guava-19.0.jar;xxx\domain-model\target\classes;C:\<REPO>\com\googlecode\mvp4g\mvp4g\1.3.1\mvp4g-1.3.1.jar;C:\<REPO>\com\google\gwt\inject\gin\1.5.0\gin-1.5.0.jar;C:\<REPO>\com\google\inject\guice\3.0-rc2\guice-3.0-rc2.jar;C:\<REPO>\javax\inject\javax.inject\1\javax.inject-1.jar;C:\<REPO>\com\google\inject\extensions\guice-assistedinject\3.0-rc2\guice-assistedinject-3.0-rc2.jar;xxx\sso-security-lib\target\classes;C:\<REPO>\org\springframework\security\spring-security-taglibs\4.0.3.RELEASE\spring-security-taglibs-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\security\spring-security-acl\4.0.3.RELEASE\spring-security-acl-4.0.3.RELEASE.jar;C:\<REPO>\oracle\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar;C:\<REPO>\org\springframework\spring-test\4.2.4.RELEASE\spring-test-4.2.4.RELEASE.jar;xxx\seleniumtests\target\classes;xxx\smartgwt-data-integration\target\classes;C:\<REPO>\com\smartgwt\smartgwt\6.0p\smartgwt-6.0p.jar;C:\<REPO>\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;C:\<REPO>\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\<REPO>\net\sourceforge\collections\collections-generic\4.01\collections-generic-4.01.jar;C:\<REPO>\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;C:\<REPO>\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\<REPO>\org\hibernate\hibernate-commons-annotations\3.2.0.Final\hibernate-commons-annotations-3.2.0.Final.jar;C:\<REPO>\org\hibernate\hibernate-core\3.6.0.Final\hibernate-core-3.6.0.Final.jar;C:\<REPO>\antlr\antlr\2.7.6\antlr-2.7.6.jar;C:\<REPO>\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\<REPO>\javax\transaction\jta\1.1\jta-1.1.jar;C:\<REPO>\org\hibernate\hibernate-ehcache\3.6.1.Final\hibernate-ehcache-3.6.1.Final.jar;C:\<REPO>\net\sf\ehcache\ehcache\1.5.0\ehcache-1.5.0.jar;C:\<REPO>\backport-util-concurrent\backport-util-concurrent\3.1\backport-util-concurrent-3.1.jar;C:\<REPO>\net\sf\jsr107cache\jsr107cache\1.0\jsr107cache-1.0.jar;C:\<REPO>\org\hibernate\hibernate-entitymanager\3.6.0.Final\hibernate-entitymanager-3.6.0.Final.jar;C:\<REPO>\javassist\javassist\3.12.0.GA\javassist-3.12.0.GA.jar;C:\<REPO>\org\hibernate\javax\persistence\hibernate-jpa-2.0-api\1.0.0.Final\hibernate-jpa-2.0-api-1.0.0.Final.jar;C:\<REPO>\org\hibernate\hibernate-validator\4.1.0.Final\hibernate-validator-4.1.0.Final.jar;C:\<REPO>\org\codehaus\jackson\jackson-core-asl\1.8.0\jackson-core-asl-1.8.0.jar;C:\<REPO>\org\codehaus\jackson\jackson-mapper-asl\1.8.0\jackson-mapper-asl-1.8.0.jar;C:\<REPO>\org\springframework\spring-orm\4.2.4.RELEASE\spring-orm-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-jdbc\4.2.4.RELEASE\spring-jdbc-4.2.4.RELEASE.jar;C:\<REPO>\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar;C:\<REPO>\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\<REPO>\log4j\apache-log4j-extras\1.2.17\apache-log4j-extras-1.2.17.jar;C:\<REPO>\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar;C:\<REPO>\org\hsqldb\hsqldb\2.3.2\hsqldb-2.3.2.jar;C:\<REPO>\com\thoughtworks\xstream\xstream\1.4.3\xstream-1.4.3.jar;C:\<REPO>\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\<REPO>\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;xxx\generator\target\classes;C:\<REPO>\org\aspectj\aspectjrt\1.6.12\aspectjrt-1.6.12.jar;C:\<REPO>\com\informatica\powercenter\sdk\jmf\9.1.0\jmf-9.1.0.jar;C:\<REPO>\com\sun\xml\bind\jaxb-impl\1.0.6\jaxb-impl-1.0.6.jar;C:\<REPO>\javax\xml\bind\jaxb-api\1.0\jaxb-api-1.0.jar;C:\<REPO>\com\sun\xml\bind\jaxb-libs\1.0.6\jaxb-libs-1.0.6.jar;C:\<REPO>\com\sun\msv\datatype\xsd\xsdlib\20060615\xsdlib-20060615.jar;C:\<REPO>\isorelax\isorelax\20030108\isorelax-20030108.jar;C:\<REPO>\relaxngDatatype\relaxngDatatype\20020414\relaxngDatatype-20020414.jar;C:\<REPO>\com\sun\xml\bind\jaxb-xjc\1.0.6\jaxb-xjc-1.0.6.jar;C:\<REPO>\com\informatica\powercenter\sdk\jmf-jaxb\9.1.0\jmf-jaxb-9.1.0.jar;C:\<REPO>\com\informatica\powercenter\sdk\pmserversdk\9.1.0\pmserversdk-9.1.0.jar;C:\<REPO>\org\apache\poi\poi\3.9\poi-3.9.jar;C:\<REPO>\commons-codec\commons-codec\1.5\commons-codec-1.5.jar;C:\<REPO>\org\apache\poi\poi-contrib\3.1-FINAL\poi-contrib-3.1-FINAL.jar;C:\<REPO>\org\apache\poi\poi-ooxml\3.9\poi-ooxml-3.9.jar;C:\<REPO>\org\apache\poi\poi-ooxml-schemas\3.9\poi-ooxml-schemas-3.9.jar;C:\<REPO>\org\apache\xmlbeans\xmlbeans\2.3.0\xmlbeans-2.3.0.jar;C:\<REPO>\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\<REPO>\net\sf\saxon\saxon-dom\8.7\saxon-dom-8.7.jar;xxx\gwt-ui-utils\target\classes;C:\<REPO>\net\customware\gwt\dispatch\gwt-dispatch\1.2.0\gwt-dispatch-1.2.0.jar;C:\<REPO>\net\sf\saxon\saxon\8.7\saxon-8.7.jar;C:\<REPO>\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar;C:\<REPO>\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\<REPO>\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\<REPO>\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.google.gwt.dev.DevMode -superDevMode -war C:\Users\xxx\.IntelliJIdea2016.2\system\gwt\jboss6.4-migration-xxx.b5723cb3\xxx.1652beb5\run\www -remoteUI 7907:IntelliJIdea -startupUrl core.html com.xxx.xxx.workflowdetails.WorkflowDetails com.xxx.xxx.migration.Migration com.xxx.xxx.useroptions.UserOptions com.xxx.xxx.sessiondetails.SessionDetails com.xxx.xxx.validationdetails.ValidationDetails com.xxx.xxx.builddetails.BuildDetails com.xxx.xxx.core com.xxx.xxx.dependencymgmt.DependencyMgmt com.xxx.xxx.generator.Generator
Exception in thread "main" java.lang.NoClassDefFoundError: cern/colt/map/OpenIntObjectHashMap
at com.google.gwt.dev.util.collect.IntMultimap.<init>(IntMultimap.java:28)
at com.google.gwt.dev.StringAnalyzableTypeEnvironment.<init>(StringAnalyzableTypeEnvironment.java:68)
at com.google.gwt.dev.MinimalRebuildCache.<init>(MinimalRebuildCache.java:192)
at com.google.gwt.dev.CompilerContext$Builder.<init>(CompilerContext.java:37)
at com.google.gwt.dev.DevModeBase.<init>(DevModeBase.java:636)
at com.google.gwt.dev.DevMode.<init>(DevMode.java:457)
at com.google.gwt.dev.DevMode.main(DevMode.java:424)
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:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: cern.colt.map.OpenIntObjectHashMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
When I add missing dependency to my project:
<dependency>
<groupId>colt</groupId>
<artifactId>colt</artifactId>
<version>1.2.0</version>
</dependency>
I'm getting different problem related with wrong jetty-server version (I have depoendencies to 8.1.19.v20160209 but looks like 9.x should be used):
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/HttpConfiguration$Customizer
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.google.gwt.dev.DevMode$ArgHandlerServer.setString(DevMode.java:179)
at com.google.gwt.util.tools.ArgHandlerString.handle(ArgHandlerString.java:26)
at com.google.gwt.util.tools.ToolBase.processArgs(ToolBase.java:291)
at com.google.gwt.dev.ArgProcessorBase.processArgs(ArgProcessorBase.java:30)
at com.google.gwt.dev.DevMode.main(DevMode.java:425)
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:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Let me know if you have similar problems with latest GWT releases. I could try to guess versions of all dependencies that should be used but it is not a good apreach. This should be pre-configured.
UPDATE:
When I generate simple GWT project:
mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.8.0-rc3
and import it to Intelij then dependencies are correct. I have the same gwt-maven-plugin version. I re-generated project in IDE. What I'm missing ?
You should add this dependency to your pom.xml file : gwt-dev
(gwt-dev has all the dependencies needed)
If you create a new GWT 2.8.0 module, you can check that, that contains gwt-dev dependency in the pom file.

javax.mail.NoSuchProviderException: when using Liberty 8.5.5.9 with Apache Commons Email 1.4

I've a web application which sending mail. To perform sending mail I use library which itself based on Apache Commons Email 1.4. When I've used Websphere Liberty 8.5.5.7 everything worked fine, but after I've upgraded to 8.5.5.9 it stopped to work and throwing an exception: javax.mail.NoSuchProviderException the full stack trace I posted at the end of the question.
Again, I've tried to run it on both installations of Websphere Liberty 8.5.5.7 and 8.5.5.9, on first one it works fine on second it's broken. I've tried to look what the difference and it looks that Liberty itself has com.ibm.ws.javax.mail-1.5_1.5.xx.jar package which interfere with Java javax-mail-1.5.2 which used by commons-email 1.4, see its pom.xml here.
After some debugging I've paid attention that:
Liberty 8.5.5.9 uses com.ibm.ws.javax.mail-1.5_1.5.12.jar while Liberty 8.5.5.7 uses com.ibm.ws.javax.mail-1.5_1.5.10.jar possible this is caused to my bug.
So, my question is how can I eliminate the influence of com.ibm.ws.javax.mail which comes together with liberty to make it work or is there another workaround?
Also, where can I submit bug report for Liberty Team?
Update:
It looks that Liberty has JavaMail 1.5 feature which can be enabled or disabled, I didn't enable it explicitly, it looks that on of my features enabled it implicitly, this is my features list:
<featureManager>
<feature>jdbc-4.1</feature>
<feature>adminCenter-1.0</feature>
<feature>jndi-1.0</feature>
<feature>localConnector-1.0</feature>
<feature>servlet-3.1</feature>
<feature>ssl-1.0</feature>
<feature>jaxrs-2.0</feature>
<feature>cdi-1.2</feature>
<feature>ejbLite-3.2</feature>
<feature>jsf-2.2</feature>
</featureManager>
Update 2
I've solved this issue by using this article: Overriding a provided API with an alternative version
Just make in your server.xml the following changes:
<application id="" name="Scholar" type="ear" location="scholar.ear">
<classloader delegation="parentLast" />
</application>
And now your libraries will receive higher precedence then Liberty's libraries.
Full stack trace of the exception:
org.apache.commons.mail.EmailException: Sending the email to the following server failed : relay.******.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1421) ~[commons-email-1.4.jar:1.4]
at org.apache.commons.mail.Email.send(Email.java:1448) ~[commons-email-1.4.jar:1.4]
at my.package.mailer.sendHtmlMail(IBMMail.java:96) ~[classes/:?]
at my.package.mailer.EmailGateway.sendMail(EmailGateway.java:24) [classes/:?]
at my.package.mailer.EventMailGateway.eventCreatedNotification(EventMailGateway.java:52) [classes/:?]
at **********.restful.EventsAPI.saveEvent(EventsAPI.java:99) [classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
at com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java:636) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.performInvocation(LibertyJaxRsInvoker.java:115) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97) [cxf-core-3.0.3.jar:3.0.3]
at com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:210) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200) [cxf-rt-frontend-jaxrs-3.0.3.jar:3.0.3]
at com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker.invoke(LibertyJaxRsInvoker.java:381) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99) [cxf-rt-frontend-jaxrs-3.0.3.jar:3.0.3]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) [cxf-core-3.0.3.jar:3.0.3]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [cxf-core-3.0.3.jar:3.0.3]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) [cxf-core-3.0.3.jar:3.0.3]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:124) [com.ibm.ws.jaxrs-2.0.common_1.0.12.jar:3.0.3]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:256) [cxf-rt-transports-http-3.0.3.jar:3.0.3]
at com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke(AbstractJaxRsWebEndpoint.java:134) [com.ibm.ws.jaxrs-2.0.common_1.0.12.jar:?]
at com.ibm.websphere.jaxrs.server.IBMRestServlet.handleRequest(IBMRestServlet.java:149) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at com.ibm.websphere.jaxrs.server.IBMRestServlet.doPost(IBMRestServlet.java:107) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [com.ibm.ws.javaee.servlet.3.1_1.0.12.jar:?]
at com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestServlet.java:99) [com.ibm.ws.jaxrs-2.0.server_1.0.12.jar:?]
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:778) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1161) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:928) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262) [com.ibm.ws.webcontainer_1.1.12.jar:?]
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:341) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:471) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:405) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:285) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:256) [com.ibm.ws.transport.http_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174) [com.ibm.ws.channelfw_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83) [com.ibm.ws.channelfw_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504) [com.ibm.ws.channelfw_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574) [com.ibm.ws.channelfw_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929) [com.ibm.ws.channelfw_1.0.12.jar:?]
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018) [com.ibm.ws.channelfw_1.0.12.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:820) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Session.getTransport(Session.java:742) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Session.getTransport(Session.java:682) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Session.getTransport(Session.java:662) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Session.getTransport(Session.java:719) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Transport.send0(Transport.java:248) ~[javax.mail-1.5.2.jar:1.5.2]
at javax.mail.Transport.send(Transport.java:124) ~[javax.mail-1.5.2.jar:1.5.2]
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411) ~[commons-email-1.4.jar:1.4]
... 48 more
I've solved this issue by using this article: Overriding a provided API with an alternative version
Just make in your server.xml the following changes:
<application id="" name="Scholar" type="ear" location="scholar.ear">
<classloader delegation="parentLast" />
</application>
And now your libraries will receive higher precedence then Liberty's libraries.
I hit javax.mail.NoSuchProviderException: smtp after updating from Liberty 8.5.5.8 to 8.5.5.9. Adding <feature>javaMail-1.5</feature> to my server.xml worked for me.

Ant: "IOException: Error writing request body to server" on deployment to tomcat

I am new to StackExchange so please bear with my eventual mistakes...
I have been searching for answers but none seem to apply to my situation being that that build and deployment actually works, but the result is though an IOException at the end of the deployment call.
I am making a build an deployment script in ant. The deployment part is using this taskdef:
<taskdef name="tomcatdeploy" classname="org.apache.catalina.ant.DeployTask" />
<target name="-tomcatdeploy" description="deploy to tomcat">
<echo>deploying from client</echo>
<tomcatdeploy
url="http://32.0.26.146:8080/manager/text"
username="<veryHardToGuessUsername>"
password="<veryHardToGuessPassword>"
path="/avlsweb"
war="/mnt/s/Web/Avlsweb/BambooBuilds/TEST/${nt-server.dir.test}_Tc${version}/avlsweb##${version}.war"
version="${version}"
/>
We use Bamboo as build server. This worked fine for a number of builds. However recently I got this build error:
/mnt/data/bamboo_home/xml-data/build-dir/AVTST-TEST15-JOB1/AvlswebScripts/Ant/build.xml:286: java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3192)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3175)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:242)
at org.apache.catalina.ant.DeployTask.execute(DeployTask.java:195)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
The strange thing is that the build works and it also deploys fine to tomcat. However, for some reason an IOException occurs after the deployment resulting in a "red" failed build message in Bamboo. A couple of additional remarks:
Tomcat manager-script user is setup
Bamboo build server with ant is running on the same server as the targeting tomcat applicationserver however bamboo and the targeting tomcat are running as separate servers on separate ports.
Build server: Atlassian Bamboo 5.9.0
Ant version: 1.9.2
Tomcat version: 8.0.15
Java version: 1.7.0_67
Any ideas?
i think i am slow, i have faced same problem
in tomcatdeploy task instead of war make it localWar
You will get this error if you already have an instance deployed to the Tomcat server. You can set update="true" in the tomcatdeploy:
<tomcatdeploy
url="http://32.0.26.146:8080/manager/text"
username="<veryHardToGuessUsername>"
password="<veryHardToGuessPassword>"
path="/avlsweb"
war="/mnt/s/Web/Avlsweb/BambooBuilds/TEST/${nt-server.dir.test}_Tc${version}/avlsweb##${version}.war"
version="${version}"
update="true"
/>
Another option is to explicitly undeploy and then redeploy, or use the reload tag instead of the deploy tag.

Tomcat Restart automatically Web Application on startup, after error

I've a big trouble on tomcat.
Before explaine, let me tell is the first time I see something like this...
I'm building an application using JPA on Hibernate, Spring 3.0 and Jersey REST Framework.
When using glassfish, everything works fine, but deployng the same application on tomcat, I registered the following error code:
GRAVE: Error deploying configuration descriptor java-zero.xml
java.lang.NoClassDefFoundError: com/sun/jersey/spi/container/servlet/ServletContainer
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2527)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1010)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1483)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1095)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
... 34 more
Then tomcat restarts the application and again, the same error. In an infinite loop.
Looks like a library conflict, but I really don't have any ideas on how to solve it...
Any suggestion is appreciated!
Ciao, Davide.
java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer suggests that you either don't have the Jersey JAR file or you've put it in the wrong place.
If it's the former, download it here and add it to Tomcat.
If it's the latter, put it and all its dependencies in either your WEB-INF/lib, server/lib for Tomcat 5.x or lib for Tomcat 6.x. (Just one, not all.)
It works with Glassfish because they've bundled it for you. Tomcat has not.
Remove all Jersey JAR from /WEB_INF/lib folder, refresh project and again paste all JARs of Jersey library into /WEB_INF/lib. Refresh project, stop server again, deploy and run.
It looks like either jersey.jar and/or jsr311-api.jar are missing from your webapp. You might check they are in the WEB-INF/lib folder.

Categories