You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/10/20 12:36:41 UTC

[Bug 64832] New: Invalid byte tag in constant pool 19 on tomcat-juli

https://bz.apache.org/bugzilla/show_bug.cgi?id=64832

            Bug ID: 64832
           Summary: Invalid byte tag in constant pool 19 on tomcat-juli
           Product: Tomcat 9
           Version: 9.0.38
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Packaging
          Assignee: dev@tomcat.apache.org
          Reporter: rosbaldeston@hotmail.com
  Target Milestone: -----

Getting this warning when starting up a Tomcat 9.0.38 instance with a webapp
that uses the tomcat-jdbc maven library:

Oct 20, 2020 12:59:15 PM org.apache.catalina.startup.ContextConfig
processAnnotationsJar
SEVERE: Unable to process Jar entry [module-info.class] from Jar
[jar:file:/opt/webapp/WEB-INF/lib/tomcat-juli-9.0.38.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in
constant pool: 19
        at
org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:133)
        at
org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60)
        at
org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)
        at
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119)
        at
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2125)
        at
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2001)
        at
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1967)
        at
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1952)
        at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326)
        at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
        at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
        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)
        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.manageApp(HostConfig.java:1553)
        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
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
        at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:622)
        at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:569)
        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
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
        at
com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
        at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
        at
javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
        at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
        at java.security.AccessController.doPrivileged(Native Method)
        at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
        at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
        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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

tomcat-jdbc library included as, which includes the above tomcat-juli jar as a
dependency. 

  <dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-jdbc</artifactId>
    <version>9.0.38</version>
    <scope>runtime</scope>
  </dependency>


The webapp in question is marked as metadata complete, so not quite sure why
tomcat appears to be scanning jars for annotations in this case? esp as it's
also 2.5.

  <web-app version="2.5" metadata-complete="true"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    ....
  </web-app>


This is happening under amazon-corretto-8.265 openjdk on centos 7.6.


This warning appears for both tomcat-jdbc 9.0.38 and 9.0.39, but 9.0.37 appears
to work without the same issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64832] Invalid byte tag in constant pool 19 on tomcat-juli

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64832

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
The line numbers in the stack trace do not match any known 9.0.x version. I was
able to match them to circa 7.0.40

The failure occurs when scanning module-info.class which is known to use the
Java 9 class file format.

Java 9 class file support was added in 7.0.76 onwards.

It appears you are using a much older version of Tomcat than you think you are.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org