Henning Kristensen created TOMEE-976:
----------------------------------------

             Summary: Server startup fails on large, virtual Solaris servers 
with java.lang.ArithmeticException: / by zero
                 Key: TOMEE-976
                 URL: https://issues.apache.org/jira/browse/TOMEE-976
             Project: TomEE
          Issue Type: Bug
    Affects Versions: 1.5.2
         Environment: Virtual server in larger Solaris box - returns 236 
availableProcessors (Runtime.getRuntime().availableProcessors())
            Reporter: Henning Kristensen


"part" gets rounded to 0 at line 189 in org.apache.tomee.catalina.Warmup.java 
when there's more than double the number of availableProcessors compared to the 
number of classes to preload. Subsequently the server doesn't start properly.

I would think that "part" should be guarded against being 0.

Here's the top of the startup log:

Using CATALINA_BASE:   /opt/apache-tomee-plus-1.5.2
Using CATALINA_HOME:   /opt/apache-tomee-plus-1.5.2
Using CATALINA_TMPDIR: /opt/apache-tomee-plus-1.5.2/temp
Using JRE_HOME:        /opt/jdk1.6.0_43/jre
Using CLASSPATH:       
/opt/apache-tomee-plus-1.5.2/bin/bootstrap.jar:/opt/apache-tomee-plus-1.5.2/bin/tomcat-juli.jar
13-06-2013 13:35:30 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
/opt/jdk
1.6.0_43/jre/lib/sparc/server:/opt/jdk1.6.0_43/jre/lib/sparc:/opt/jdk1.6.0_43/jre/../lib/sparc:/usr/jdk/packages/lib/sparc:/lib:/usr/lib
13-06-2013 13:35:30 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
13-06-2013 13:35:30 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Exception in thread "warmup - 1" Exception in thread "warmup - 2" 
java.lang.ArithmeticException: / by zero
        at org.apache.tomee.catalina.Warmup$2.run(Warmup.java:196)
Exception in thread "warmup - 4" Exception in thread "warmup - 3" 
java.lang.ArithmeticException: / by zero
        at org.apache.tomee.catalina.Warmup$2.run(Warmup.java:196)
java.lang.ArithmeticException: / by zero
Exception in thread "warmup - 5"        at 
org.apache.tomee.catalina.Warmup$2.run(Warmup.java:196)
Exception in thread "warmup - 6" java.lang.ArithmeticException: / by zero
        at org.apache.tomee.catalina.Warmup$2.run(Warmup.java:196)
...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to