java version 1.7.0_25 + apache-tomcat-7.0.41 = Illegal type for StackMapType: -4

2013-06-21 Thread Stephen More
My web application has been working great with jdk1.6. At this point I am
trying to upgrade to jdk1.7, when I deploy my war tomcat is throwing:

Jun 21, 2013 10:58:10 AM org.apache.catalina.core.ContainerBase
addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/crm]]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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:724)
Caused by: java.lang.RuntimeException: Illegal type for StackMapType: -4
at
org.apache.tomcat.util.bcel.classfile.StackMapType.setType(StackMapType.java:73)
at
org.apache.tomcat.util.bcel.classfile.StackMapType.init(StackMapType.java:65)
at
org.apache.tomcat.util.bcel.classfile.StackMapType.init(StackMapType.java:52)
at
org.apache.tomcat.util.bcel.classfile.StackMapEntry.init(StackMapEntry.java:55)
at
org.apache.tomcat.util.bcel.classfile.StackMap.init(StackMap.java:73)
at
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:145)
at org.apache.tomcat.util.bcel.classfile.Code.init(Code.java:85)
at
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:126)
at
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.init(FieldOrMethod.java:58)
at
org.apache.tomcat.util.bcel.classfile.Method.init(Method.java:72)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:268)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:128)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2118)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1994)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1960)
at
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1945)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more

Is there a config/development change I have to make or is this a bug ?

-Thanks
Stephen More


Re: java version 1.7.0_25 + apache-tomcat-7.0.41 = Illegal type for StackMapType: -4

2013-06-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Stephen,

On 6/21/13 11:10 AM, Stephen More wrote:
 My web application has been working great with jdk1.6. At this
 point I am trying to upgrade to jdk1.7, when I deploy my war tomcat
 is throwing:
 
 Caused by: java.lang.RuntimeException: Illegal type for
 StackMapType: -4 at 
 org.apache.tomcat.util.bcel.classfile.StackMapType.setType(StackMapType.java:73)

I
 
don't get this exception when I launch my webapp, but I do not have
any annotations, etc.

Do you know which JAR is failing?

I would expect this kind of thing if you used a current BCEL against a
newer .class file generated for example by Java 8, which BCEL might
not yet support (or at least the version Tomcat uses).

Can you enable debug logging and see if you can see which JAR or
.class file is being scanned when this occurs?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRxHvWAAoJEBzwKT+lPKRY5eUP/jOyYWJbZ0lL7Izd4v2lrWy6
3Wxz/eXiHNY/aynp8eeICWq1B+clcJK5cRhLt+3y1V5FZwj8+Pei13JBNjeCOosp
5GzdRnZ8+siTcHVVHUaqUykitOjiEbWPoWwOzS0Z+qdGDWDb+zRo80t4fYAA3VCb
v+PQTHwSDRrmFshjQplCxkkhyMIaacGOfF221ssHQC6LkfMVtUMnZaHWRjPEotd9
5djYmcKGQhrBMmgaIAS3agwGbacs4Of+nY1Kz5dWTyNpnS7cJKWwKHMAIXyzqq+Z
e8zqYM4LkodIlZPGtOgRgZV1/AQ3yO31TQgJ4O2YCXp829XefIz5/JedU6wiIZI9
Phm0gkl22a/AGKm3Dljr24V/lTKZy8wl7CoK/sCF3WvMBXyhletn0YS71v1WcI6K
msdyT1KvKUqYJ519gs7GU48CSYe01DCxpH+7rOW4gYQsRgAXcB11krrm7o3CuIE+
NUM0YQz/0uhpUc9Xm6zq2je8J0gXWcw+KjbwV3HCvkVrj5jSqnH2hleXY94SEW/p
ccG0opRaPj8s5v0N1EhoS/uecfmlrhDBFNE0YSp5lvq2NW0WDkffs7otKqVu8XV9
YEShan5Y7wCNMlnzJG6L9IZ6uWzjf0W66SJ5I1IQ6JRsO4hrOF0lC0VTXgVGFtoF
1wAAGW3l8u/otEhi3C1u
=GnPP
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



New behavior of Oracle Java 1.7.0_25: AWT thread and console icon

2013-06-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

All,

I just upgraded to 1.7.0_25 on my Mac and I noticed that when I launch
Tomcat, I get a dock icon indicating that it is running. This does not
happen on 1.7.0_21, the previous version I was running.

For some reason, 1.7.0_25 triggers something launching the AWT thread
(on my Mac, that's called AWT-AppKit) which causes the dock icon to be
shown.

Removing the dock icon is easy enough: just run in headless mode by
adding this system property to CATALINA_OPTS:

   -Djava.awt.headless=true

Or, if you want your icon to look pretty (it is otherwise completely
useless), you can use these two system properties (on Mac OS) to style it:

   -Xdock:name=[title of icon you want]
   -Xdock:icon=path to icon file to use

I'm not sure what properties to set on Windows, Gnome, KDE, or any
other system.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRxH86AAoJEBzwKT+lPKRYyiMQAI5wPrkQZ+z4Jd21IONaHqcH
tixutzG8PC+7sff9wYR10bnPpE29x9/VdxddKPJ51Yrazf4xxr654FUKkgdP6u+5
DDRe5rlN7Quy5CVBzu9XKDRW5NHBZTlTWrTBdHPTCdXpKI7jAvDpkW750NNpnKvA
8Cq0GwC44YOm+DStp8bsZTBkONR5dbYdpNscH+r0Nw98fFrAP83bZRTQHah2ujCj
urcNCwH7dZPT7WjZUcvYns5oWfsiZOCGvwKSJz5uBaS98uMbQfSfXl4FFL9fGKay
OXKW73RgklaUctIH5U3rvlGd876N66ddmUTMqS07hN45ABYsixpV7VUkZsPzF30m
hwl/pjf2qF07CkVJweCNdenT7NOLQ3Mx9hR4alOTTIvaMHij4/6S9YD87Fh+paiI
NuqRJTLnnxBQA0PXoYLAQx/PeqvcRyeibZ/kZhdzJ4lN3qF99lfHxMjNtzHwu4xj
f+tP4u9s9udZ15d0yBA1/13eD75hEUM9RBf6f5cVGmUz7jolFRCiHoHV7ETJNPei
OoBOpR3/iSaLU94gWl4twMXrkKCor3HLHyvfNc7+mBA6XM+y6EYi9vHFzPuaKvcB
fmkMtr7V5DcbUTm4vPCS0N6rnUxloQ+8aYi12xefZvlBWEhQcdzGIzKpKLnXbt1c
ODGdKUTq0rXNJPWSxT39
=4KXG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: New behavior of Oracle Java 1.7.0_25: AWT thread and console icon

2013-06-21 Thread Howard W. Smith, Jr.
Chris,

On Fri, Jun 21, 2013 at 12:28 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 All,

 I just upgraded to 1.7.0_25 on my Mac and I noticed that when I launch
 Tomcat, I get a dock icon indicating that it is running. This does not
 happen on 1.7.0_21, the previous version I was running.


Per this email of yours, I just upgraded from 1.7.0_21 to 1.7.0_25 as well,
thanks for the heads up!



 For some reason, 1.7.0_25 triggers something launching the AWT thread
 (on my Mac, that's called AWT-AppKit) which causes the dock icon to be
 shown.

 Removing the dock icon is easy enough: just run in headless mode by
 adding this system property to CATALINA_OPTS:

-Djava.awt.headless=true


I have this option set as I running tomcat/tomee as a Windows service, so
I'm good.


 Or, if you want your icon to look pretty (it is otherwise completely
 useless), you can use these two system properties (on Mac OS) to style it:

-Xdock:name=[title of icon you want]
-Xdock:icon=path to icon file to use

 I'm not sure what properties to set on Windows, Gnome, KDE, or any
 other system.


Me too (and not really a concern/requirement of mine). :)



 Hope that helps,
 - -chris


It does help. thanks!


 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQIcBAEBCAAGBQJRxH86AAoJEBzwKT+lPKRYyiMQAI5wPrkQZ+z4Jd21IONaHqcH
 tixutzG8PC+7sff9wYR10bnPpE29x9/VdxddKPJ51Yrazf4xxr654FUKkgdP6u+5
 DDRe5rlN7Quy5CVBzu9XKDRW5NHBZTlTWrTBdHPTCdXpKI7jAvDpkW750NNpnKvA
 8Cq0GwC44YOm+DStp8bsZTBkONR5dbYdpNscH+r0Nw98fFrAP83bZRTQHah2ujCj
 urcNCwH7dZPT7WjZUcvYns5oWfsiZOCGvwKSJz5uBaS98uMbQfSfXl4FFL9fGKay
 OXKW73RgklaUctIH5U3rvlGd876N66ddmUTMqS07hN45ABYsixpV7VUkZsPzF30m
 hwl/pjf2qF07CkVJweCNdenT7NOLQ3Mx9hR4alOTTIvaMHij4/6S9YD87Fh+paiI
 NuqRJTLnnxBQA0PXoYLAQx/PeqvcRyeibZ/kZhdzJ4lN3qF99lfHxMjNtzHwu4xj
 f+tP4u9s9udZ15d0yBA1/13eD75hEUM9RBf6f5cVGmUz7jolFRCiHoHV7ETJNPei
 OoBOpR3/iSaLU94gWl4twMXrkKCor3HLHyvfNc7+mBA6XM+y6EYi9vHFzPuaKvcB
 fmkMtr7V5DcbUTm4vPCS0N6rnUxloQ+8aYi12xefZvlBWEhQcdzGIzKpKLnXbt1c
 ODGdKUTq0rXNJPWSxT39
 =4KXG
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Abandoned apache children with mod_jk

2013-06-21 Thread Chris Boyce
Hello,

I'm running apache 2.2.24 (worker MPM) with mod_jk 1.2.37 under Solaris 11, 
compiled as follows (from config.log):

--with-included-apr --with-mpm=worker --enable-so --enable-rewrite 
--enable-headers --enable-proxy --enable-proxy-http --enable-expires 
--enable-nonportable-atomics=yes --disable-include --disable-autoindex 
--disable-imap --disable-userdir CC=/usr/sfw/bin/gcc

We are running Tomcat 7.0.32.

Since moving to Solaris 11 I'm noticing over time that apache children are 
getting left in an idle state (and usually not showing up on the scoreboard at 
all) when doing graceful restarts.  If I do a hard restart, the error_log notes 
that the process had to be forcibly killed:

[Wed May 15 11:41:24 2013] [warn] child process 10057 still did not exit, 
sending a SIGTERM
[Wed May 15 11:41:26 2013] [error] child process 10057 still did not exit, 
sending a SIGKILL

If I let apache go unchecked, it will eventually stop passing traffic 
completely and a hard restart is required.  Example ps output looks like this:

nobody 24429 20925   0 11:43:59 ?   0:02 /usr/local/apache2/bin/httpd 
-k start
nobody  9750 20925   0 23:59:02 ?   0:00 /usr/local/apache2/bin/httpd 
-k start
nobody 20925  2440   0   May 15 ?   3:07 /usr/local/apache2/bin/httpd 
-k start
nobody 24689 20925   0 11:47:52 ?   0:00 /usr/local/apache2/bin/httpd 
-k start
nobody 24628 20925   0 11:46:18 ?   0:01 /usr/local/apache2/bin/httpd 
-k start
nobody 24428 20925   0 11:43:39 ?   0:02 /usr/local/apache2/bin/httpd 
-k start

Note PID 9750 is lingering, doing nothing according to pfiles and truss, and 
its timestamp coincides with the last graceful restart (log rotation).  Two 
main differences between this web server and ones that are working include:

a) This is Solaris 11 (vs. Solaris 10)
b) I have hardened apache by putting it in a Solaris 11 zone, and I'm starting 
apache as the nobody user with the net_privaddr privilege so it can function 
as the parent process.  It talks to Tomcat on another zone and everything works 
great (other than the problem described here).

Apache has permission to write to /logs, and /log/apache2 is where I set these:

JkLogFile /logs/apache2/mod_jk.log
JkShmFile /logs/apache2/jk-runtime-status

And this.
PidFile /logs/apache2/run/httpd.pid


Can anyone think of a reason why children are not being recycled or getting 
stranded like this over successive graceful restarts?  We do use multiple 
listeners, so I don't know if I'm dealing with a locking/mutex/serialization 
type of issue.  I'm not a C programmer.  There seems to be little info out 
there for Solaris platforms that's recent.  

I'd be happy to post more info if needed.  I appreciate your time.


Chris


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org