Re: Annotation scanning problem with Tomcat 8 and Java 8
On 10/07/17 08:09, karapirinc wrote: > Hi, > > I am trying to solve same issue. Could you solve the problem? That particular problem (from 3 years ago) was caused by a Tomcat bug. It was fixed shortly afterwards. Upgrading to the latest 8.5.x release should fix it. If it does not, please open a bug report and provide the simplest possible test case that demonstrates the issue (including the source code for the class that triggers the problem) and someone will take a look. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Annotation scanning problem with Tomcat 8 and Java 8
Hi, I am trying to solve same issue. Could you solve the problem? Best, Yusuf -- View this message in context: http://tomcat.10.x6.nabble.com/Annotation-scanning-problem-with-Tomcat-8-and-Java-8-tp5019403p5065281.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fwd: Tomcat 8 and Java 8
Chris, My startup script (many years old) uses: CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar So its quite possible if the $CLASSPATH is empty we get the :/ The odd thing is why does it work when run from the command line but not from /etc/rc.d/init.d as both use case have the colon. https://bz.apache.org/bugzilla/show_bug.cgi?id=57823 Cheers Greg On 17 April 2015 at 06:48, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Greg, > > On 4/16/15 12:06 PM, Greg Huber wrote: > > ..To follow on, for others going grey also. > > > > The file:/ seems to be from a :/ (colon) on the class path, and > > the combination of running it from /etc/rc.d/init.d makes it not > > work. > > > > Not working -classpath > > :/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache > - -tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar > > > > > > > > Working -classpath > > /opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache- > tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar > > > > > > > > I guess we need to check for file:/ so we do not scan the whole > > server. > > Whoops. > > My first reaction is "don't do that", but it seems like a stray colon > shouldn't really be valid in the classpath, so Tomcat probably ought > to ignore "" (empty string) classpath entries. > > Could you file a Bugzilla issue? > https://bz.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%209 > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v2 > Comment: GPGTools - http://gpgtools.org > > iQIcBAEBCAAGBQJVMJ68AAoJEBzwKT+lPKRYYqEP/jihtZvF2zQPA7dF+l4HNZ6r > ZndnLNIh1FFC6HCeo/LKA2IWr9ISRw+2g5Iuftaz9RJRmdmCP2fYUrODwlZOLbU4 > Z9vj1Pc4pCXDKJ2mxTAK1hWMWTP3FwqIM02iw7dli8hiCBs7TM97gtU6u/AhpKYS > l9Fd+ynZM377zCnvoBSQ+3C744Roat9a6XZQvvAcIdWkC7ELVCXB7KNF4xtUHO4r > ezPUWzbPV6GaE5Y81kxoRIKQOGUq+/JX3q2jaH3b5zVXMWmsVfQY68Mo3UyjpMJ1 > ymiPZIYXAKJrXrY5SWhGSB6wzzx6nJVesINQB0O2ykZW/SjiXwyZpVqiMPf0tOmP > +xIAaNRFXgT6eH7Rs8+U0n8b+fSZ3uJuqB7zZDWvK0xSwjB1bYt2vRBRH28L+o1x > B2tDaDlJQfhsNji78/AiqiYiJcLrXzsJiB/niuVQSggTuGiOUtiHfY2BpbXCRnoU > 4oIU5Rety5NKO6oXeB++ZUYF97QY5OfhTjLLrXxv8ehsUG74jZlrO7xDUIgmY86+ > /Mw9EYmBWXk9l0qNBk6TqK8N8244rwvLZHmtGiKzhih+Iw+uIP+mjICjW+++Aw3j > BRmTf/MyrdD2gIO7h/m0GGOpJsAugQ9IJu7UPDC4g4vZBtWUtUEY9lGzzxcOdAoS > utxJvmUG9Ha9WfBsRyBV > =OIAY > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Fwd: Tomcat 8 and Java 8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Greg, On 4/16/15 12:06 PM, Greg Huber wrote: > ..To follow on, for others going grey also. > > The file:/ seems to be from a :/ (colon) on the class path, and > the combination of running it from /etc/rc.d/init.d makes it not > work. > > Not working -classpath > :/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache - -tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar > > > > Working -classpath > /opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache- tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar > > > > I guess we need to check for file:/ so we do not scan the whole > server. Whoops. My first reaction is "don't do that", but it seems like a stray colon shouldn't really be valid in the classpath, so Tomcat probably ought to ignore "" (empty string) classpath entries. Could you file a Bugzilla issue? https://bz.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%209 - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVMJ68AAoJEBzwKT+lPKRYYqEP/jihtZvF2zQPA7dF+l4HNZ6r ZndnLNIh1FFC6HCeo/LKA2IWr9ISRw+2g5Iuftaz9RJRmdmCP2fYUrODwlZOLbU4 Z9vj1Pc4pCXDKJ2mxTAK1hWMWTP3FwqIM02iw7dli8hiCBs7TM97gtU6u/AhpKYS l9Fd+ynZM377zCnvoBSQ+3C744Roat9a6XZQvvAcIdWkC7ELVCXB7KNF4xtUHO4r ezPUWzbPV6GaE5Y81kxoRIKQOGUq+/JX3q2jaH3b5zVXMWmsVfQY68Mo3UyjpMJ1 ymiPZIYXAKJrXrY5SWhGSB6wzzx6nJVesINQB0O2ykZW/SjiXwyZpVqiMPf0tOmP +xIAaNRFXgT6eH7Rs8+U0n8b+fSZ3uJuqB7zZDWvK0xSwjB1bYt2vRBRH28L+o1x B2tDaDlJQfhsNji78/AiqiYiJcLrXzsJiB/niuVQSggTuGiOUtiHfY2BpbXCRnoU 4oIU5Rety5NKO6oXeB++ZUYF97QY5OfhTjLLrXxv8ehsUG74jZlrO7xDUIgmY86+ /Mw9EYmBWXk9l0qNBk6TqK8N8244rwvLZHmtGiKzhih+Iw+uIP+mjICjW+++Aw3j BRmTf/MyrdD2gIO7h/m0GGOpJsAugQ9IJu7UPDC4g4vZBtWUtUEY9lGzzxcOdAoS utxJvmUG9Ha9WfBsRyBV =OIAY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fwd: Tomcat 8 and Java 8
..To follow on, for others going grey also. The file:/ seems to be from a :/ (colon) on the class path, and the combination of running it from /etc/rc.d/init.d makes it not work. Not working -classpath :/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache-tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar Working -classpath /opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache-tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar I guess we need to check for file:/ so we do not scan the whole server. Cheers Greg I have done some some debugging and it seems to be in org.apache.catalina.startup.ContextConfig.java . protected void processAnnotationsUrl(URL url, WebXml fragment, boolean handlesTypesOnly) { if (url == null) { // Nothing to do. return; } else if ("jar".equals(url.getProtocol())) { System.out.println(url.toExternalForm()); processAnnotationsJar(url, fragment, handlesTypesOnly); } else if ("file".equals(url.getProtocol())) { try { System.out.println(url.toExternalForm()); processAnnotationsFile( new File(url.toURI()), fragment, handlesTypesOnly); } catch (URISyntaxException e) { log.error(sm.getString("contextConfig.fileUrl", url), e); } } else { log.error(sm.getString("contextConfig.unknownUrlProtocol", url.getProtocol(), url)); } } If I comment out the recursive call so it works it .. file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mariadb-java-client-1.1.8.jar!/ file:/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/activation.jar!/ Apr 16, 2015 3:54:01 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Apr 16, 2015 3:54:17 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deployment of configuration descriptor /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml has finished in 19,071 ms And the put the lines back in file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mysql-connector-java-5.1.34.jar!/ file:/ it gets stuck on file:/ So is it trying to scan the whole drive? Can any one help on this? Or should I log a jira report? Cheers Greg On 15 April 2015 at 14:19, Mark Thomas wrote: > On 15/04/2015 03:28, Greg Huber wrote: > > Hello, > > > > I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on > centos 7 > > Did you use the packaged version of Tomcat or did you download a > distribution from the ASF? > > > I have a startup in /etc/rc.d/init.d script that uses the daemon eg: > > > > daemon --user $tomcatuser --pidfile=$pidfile $command start > > > > When I run the script using the command line it runs as expected, but > when > > it runs from the system-config-services is seems to hang and does not > > deploy the application. Here are the exceptions from the startup: > > I think the hang and the CNFE are two separate issues. > > > 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] > > org.apache.catalina.util.Introspection.loadClass Failed to load class > [{0}] > > java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint > > The [{0}] indicates a Tomcat bug. It should be providing the class name > to the error message. Not a big deal as we can see it from the exception > but I'll get that fixed anyway. > > Those classes should be part of the examples web application. It is odd > that they can't be found. Could you provide the full stack trace for one > of these exceptions please. > > > > > here is the output when starting: > > > > > INFO: Deploying configuration descriptor > > /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml > > Take a thread dump when Tomcat hangs. I suspect that the session manager > is waiting for entropy (for session ID generation). See > > http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 8 and Java 8
I have done some some debugging and it seems to be in org.apache.catalina.startup.ContextConfig.java . protected void processAnnotationsUrl(URL url, WebXml fragment, boolean handlesTypesOnly) { if (url == null) { // Nothing to do. return; } else if ("jar".equals(url.getProtocol())) { System.out.println(url.toExternalForm()); processAnnotationsJar(url, fragment, handlesTypesOnly); } else if ("file".equals(url.getProtocol())) { try { System.out.println(url.toExternalForm()); processAnnotationsFile( new File(url.toURI()), fragment, handlesTypesOnly); } catch (URISyntaxException e) { log.error(sm.getString("contextConfig.fileUrl", url), e); } } else { log.error(sm.getString("contextConfig.unknownUrlProtocol", url.getProtocol(), url)); } } If I comment out the recursive call so it works it .. file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mariadb-java-client-1.1.8.jar!/ file:/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/activation.jar!/ Apr 16, 2015 3:54:01 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Apr 16, 2015 3:54:17 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deployment of configuration descriptor /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml has finished in 19,071 ms And the put the lines back in file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/ jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mysql-connector-java-5.1.34.jar!/ file:/ it gets stuck on file:/ So is it trying to scan the whole drive? Can any one help on this? Or should I log a jira report? Cheers Greg On 15 April 2015 at 14:19, Mark Thomas wrote: > On 15/04/2015 03:28, Greg Huber wrote: > > Hello, > > > > I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on > centos 7 > > Did you use the packaged version of Tomcat or did you download a > distribution from the ASF? > > > I have a startup in /etc/rc.d/init.d script that uses the daemon eg: > > > > daemon --user $tomcatuser --pidfile=$pidfile $command start > > > > When I run the script using the command line it runs as expected, but > when > > it runs from the system-config-services is seems to hang and does not > > deploy the application. Here are the exceptions from the startup: > > I think the hang and the CNFE are two separate issues. > > > 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] > > org.apache.catalina.util.Introspection.loadClass Failed to load class > [{0}] > > java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint > > The [{0}] indicates a Tomcat bug. It should be providing the class name > to the error message. Not a big deal as we can see it from the exception > but I'll get that fixed anyway. > > Those classes should be part of the examples web application. It is odd > that they can't be found. Could you provide the full stack trace for one > of these exceptions please. > > > > > here is the output when starting: > > > > > INFO: Deploying configuration descriptor > > /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml > > Take a thread dump when Tomcat hangs. I suspect that the session manager > is waiting for entropy (for session ID generation). See > > http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 8 and Java 8
t) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) - locked <0xe17649c0> (a org.apache.catalina.core.StandardServer) at org.apache.catalina.startup.Catalina.start(Catalina.java:625) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) "VM Thread" prio=10 tid=0x7fed9c064000 nid=0x7966 runnable "GC task thread#0 (ParallelGC)" prio=10 tid=0x7fed9c01f000 nid=0x7964 runnable "GC task thread#1 (ParallelGC)" prio=10 tid=0x7fed9c020800 nid=0x7965 runnable "VM Periodic Task Thread" prio=10 tid=0x7fed9c09c000 nid=0x796d waiting on condition JNI global references: 170 Heap PSYoungGen total 67072K, used 53648K [0xf550, 0xfa48, 0x0001) eden space 57856K, 92% used [0xf550,0xf895c028,0xf8d8) from space 9216K, 0% used [0xf9b8,0xf9b88000,0xfa48) to space 11776K, 0% used [0xf8d8,0xf8d8,0xf990) ParOldGen total 87552K, used 75462K [0xe000, 0xe558, 0xf550) object space 87552K, 86% used [0xe000,0xe49b1b38,0xe558) PSPermGen total 21504K, used 12727K [0xdae00000, 0x00000000dc30, 0xe000) object space 21504K, 59% used [0xdae0,0xdba6df00,0xdc30) On 15 April 2015 at 14:19, Mark Thomas wrote: > On 15/04/2015 03:28, Greg Huber wrote: > > Hello, > > > > I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on > centos 7 > > Did you use the packaged version of Tomcat or did you download a > distribution from the ASF? > > > I have a startup in /etc/rc.d/init.d script that uses the daemon eg: > > > > daemon --user $tomcatuser --pidfile=$pidfile $command start > > > > When I run the script using the command line it runs as expected, but > when > > it runs from the system-config-services is seems to hang and does not > > deploy the application. Here are the exceptions from the startup: > > I think the hang and the CNFE are two separate issues. > > > 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] > > org.apache.catalina.util.Introspection.loadClass Failed to load class > [{0}] > > java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint > > The [{0}] indicates a Tomcat bug. It should be providing the class name > to the error message. Not a big deal as we can see it from the exception > but I'll get that fixed anyway. > > Those classes should be part of the examples web application. It is odd > that they can't be found. Could you provide the full stack trace for one > of these exceptions please. > > > > > here is the output when starting: > > > > > INFO: Deploying configuration descriptor > > /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml > > Take a thread dump when Tomcat hangs. I suspect that the session manager > is waiting for entropy (for session ID generation). See > > http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 8 and Java 8
Mark, >See > http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source <http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source> I tried adding -Djava.security.egd=file:/dev/./urandom and it made no difference. Btw the same setup it seems to deploy OK when run via system-config-service using jsvc : cd $CATALINA_HOME ./bin/jsvc \ -classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \ -user $tomcatuser \ -pidfile $pidfile \ -procname $servicename \ -outfile $CATALINA_BASE/logs/catalina.out \ -errfile $CATALINA_BASE/logs/catalina.err \ -Xms128M -Xmx512m \ -Dcatalina.home=$CATALINA_HOME \ -Dcatalina.base=$CATALINA_BASE \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \ org.apache.catalina.startup.Bootstrap But our jenkins stuff does not seem to like the jsvc (won't restart itself). Cheers Greg. On 15 April 2015 at 14:19, Mark Thomas wrote: > On 15/04/2015 03:28, Greg Huber wrote: > > Hello, > > > > I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on > centos 7 > > Did you use the packaged version of Tomcat or did you download a > distribution from the ASF? > > > I have a startup in /etc/rc.d/init.d script that uses the daemon eg: > > > > daemon --user $tomcatuser --pidfile=$pidfile $command start > > > > When I run the script using the command line it runs as expected, but > when > > it runs from the system-config-services is seems to hang and does not > > deploy the application. Here are the exceptions from the startup: > > I think the hang and the CNFE are two separate issues. > > > 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] > > org.apache.catalina.util.Introspection.loadClass Failed to load class > [{0}] > > java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint > > The [{0}] indicates a Tomcat bug. It should be providing the class name > to the error message. Not a big deal as we can see it from the exception > but I'll get that fixed anyway. > > Those classes should be part of the examples web application. It is odd > that they can't be found. Could you provide the full stack trace for one > of these exceptions please. > > > > > here is the output when starting: > > > > > INFO: Deploying configuration descriptor > > /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml > > Take a thread dump when Tomcat hangs. I suspect that the session manager > is waiting for entropy (for session ID generation). See > > http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 8 and Java 8
tid=0x7f110c0b9000 nid=0x7def runnable [0x] java.lang.Thread.State: RUNNABLE "C1 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x7f110c0b4800 nid=0x7dee waiting on condition [0x] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x7f110c0b1800 nid=0x7ded waiting on condition [0x] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x7f110c0b nid=0x7dec waiting on condition [0x] java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=0 tid=0x7f110c079800 nid=0x7deb in Object.wait() [0x7f10f37b4000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) - locked <0xe01794b0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209) "Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x7f110c077800 nid=0x7dea in Object.wait() [0x7f10f38b5000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157) - locked <0xe0179720> (a java.lang.ref.Reference$Lock) "main" #1 prio=5 os_prio=0 tid=0x7f110c009000 nid=0x7de6 waiting on condition [0x7f111203a000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xe1029b78> (a java.util.concurrent.FutureTask) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429) at java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917) - locked <0xe01797a0> (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) - locked <0xe01797a0> (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) - locked <0xe01797a0> (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439) - locked <0xe01797a0> (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) - locked <0xe01798d8> (a org.apache.catalina.core.StandardService) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769) - locked <0xe0179920> (a java.lang.Object) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) - locked <0xe26bdfb0> (a org.apache.catalina.core.StandardServer) at org.apache.catalina.startup.Catalina.start(Catalina.java:625) 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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485) "VM Thread" os_prio=0 tid=0x7f110c072800 nid=0x7de9 runnable "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x7f110c01e000 nid=0x7de7 runnable "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x7f110c02 nid=0x7de8 runnable "VM Periodic Task Thread" os_prio=0 tid=0x7f110c0bc000 nid=0x7df0 waiting on condition JNI global references: 48 Heap PSYoungGen total 128000K, used 16896K [0xf558, 0xff70, 0x0001) eden space 98816K, 15% used [0xf558,0xf64e8220,0xfb60) from space 29184K, 3% used [0xfda8,0xfdb98000,0xff70) to space 33280K, 0% used [0xfb60,0xfb60,0xfd68) ParOldGen total 87552K, used 71597K [0xe000, 0xe558, 0xf558) object space 87552K, 81% used [0xe000,0xe45eb4e0,0xe558) Metaspace used 13063K, capacity 13242K, committed 13568K, reserved 1060864K class spaceused 1396K, capacity 1472K, committed 1536K, reserved 1048576K Cheers Greg. On 15 April 2015 at 14:19, Mark Thomas wrote: > On 15/04/2015 03:28, Greg Huber wrote: > > Hello, > > > > I am trying to upgrade my app to Tom
Re: Tomcat 8 and Java 8
On 15/04/2015 03:28, Greg Huber wrote: > Hello, > > I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on centos 7 Did you use the packaged version of Tomcat or did you download a distribution from the ASF? > I have a startup in /etc/rc.d/init.d script that uses the daemon eg: > > daemon --user $tomcatuser --pidfile=$pidfile $command start > > When I run the script using the command line it runs as expected, but when > it runs from the system-config-services is seems to hang and does not > deploy the application. Here are the exceptions from the startup: I think the hang and the CNFE are two separate issues. > 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] > org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] > java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint The [{0}] indicates a Tomcat bug. It should be providing the class name to the error message. Not a big deal as we can see it from the exception but I'll get that fixed anyway. Those classes should be part of the examples web application. It is odd that they can't be found. Could you provide the full stack trace for one of these exceptions please. > here is the output when starting: > INFO: Deploying configuration descriptor > /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml Take a thread dump when Tomcat hangs. I suspect that the session manager is waiting for entropy (for session ID generation). See http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 8 and Java 8
Hello, I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on centos 7 I have a startup in /etc/rc.d/init.d script that uses the daemon eg: daemon --user $tomcatuser --pidfile=$pidfile $command start When I run the script using the command line it runs as expected, but when it runs from the system-config-services is seems to hang and does not deploy the application. Here are the exceptions from the startup: localhost.2015-04-15.log : 15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint 15-Apr-2015 09:10:14.722 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.echo.EchoStreamAnnotation 15-Apr-2015 09:10:14.728 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.echo.EchoAnnotation 15-Apr-2015 09:10:14.733 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.echo.EchoEndpoint 15-Apr-2015 09:10:14.746 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.snake.SnakeAnnotation 15-Apr-2015 09:10:14.751 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.chat.ChatAnnotation 15-Apr-2015 09:10:14.753 FINE [localhost-startStop-1] org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}] java.lang.ClassNotFoundException: websocket.ExamplesConfig here is the output when starting: Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version:Apache Tomcat/8.0.21 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Mar 23 2015 14:11:21 UTC Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server number: 8.0.21.0 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Linux Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version:2.6.32-504.12.2.el6.x86_64 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: amd64 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: /opt/oraclejava1.8/jdk1.8.0_40/jre Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: 1.8.0_40-b26 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor:Oracle Corporation Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE: /opt/apache-tomcat/apache-tomcat-8.0.21 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME: /opt/apache-tomcat/apache-tomcat-8.0.21 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Xms128M Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Xmx512m Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Duser.timezone=Europe/London Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.util.logging.config.file=/opt/apache-tomcat/apache-tomcat-8.0.21/conf/logging.properties Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.endorsed.dirs= Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.base=/opt/apache-tomcat/apache-tomcat-8.0.21 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=/opt/apache-tomcat/apache-tomcat-8.0.21 Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.io.tmpdir=/opt/apache-tomcat/apache-tomcat-8.0.21/temp Apr 15, 2015 9:09:48 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.3.9. Apr 15, 2015 9:09:48 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random
Annotation scanning problem with Tomcat 8 and Java 8
I'm running into a startup problem using Tomcat 8 and Java 8 during annotation scanning. I get many error messages similar to these two: Jun 30, 2014 12:44:26 PM org.apache.catalina.startup.ContextConfig processAnnotationsWebResource SEVERE: Unable to process web resource [/WEB-INF/classes/com/foo/printer/GPrinter.class] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Expected class `CONSTANT_Utf8' at index 283 and got [7] at org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:207) at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:83) at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:76) at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1897) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1135) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Jun 30, 2014 12:44:26 PM org.apache.catalina.startup.ContextConfig processAnnotationsWebResource SEVERE: Unable to process web resource [/WEB-INF/classes/com/foo/printer/impl/GTile.class] for annotations java.io.EOFException at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340) at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:188) at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:159) at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:76) at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1897) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1892) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1135) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.jav