tomee webservice不部署 - asm错误 - 无法为Web模块simple-webservice创建注释扫描程序:43626

时间:2016-07-03 19:32:55

标签: java web-services tomee-7

我正在尝试将基本的web服务模板部署到tomee,我已经尝试了Windows 7 64位和Windows 8 64位,带有java版本1.8.0_25(64位),1.8.0_91(64位)(这个用于构建代码的java版本)并运行tomee)。 web服务是从互联网获取的基本示例 - suorce代码在下面,以及堆栈跟踪。 Tomee 1.7.0和1.7.1海峡从互联网上下载,没有代码更改或jar更改。什么可能导致这个问题 - 我是否需要更换默认的tomee jar?

代码:

package org.superbiz.calculator.ws;

import javax.ejb.Stateless;
import javax.jws.WebService;

@Stateless
@WebService ( portName = "CalculatorPort" , 
              serviceName = "CalculatorService" , 
              targetNamespace = "http://superbiz.org/wsdl" , 
              endpointInterface = "org.superbiz.calculator.ws.CalculatorWs" )
public class Calculator implements CalculatorWs
{
    public int sum( int add1 , int add2 )
    {
        return add1 + add2;
    }

    public int multiply( int mul1 , int mul2 )
    {
        return mul1 * mul2;
    }

    public String hello()
    {
        return "hello";
    }
}
/* ################################## */
package org.superbiz.calculator.ws;

import javax.jws.WebService;

@WebService ( targetNamespace = "http://superbiz.org/wsdl" )
public interface CalculatorWs
{
    public int sum( int add1 , int add2 );

    public int multiply( int mul1 , int mul2 );

    public String hello();
}

堆栈跟踪:

INFO - ------------------------- localhost -> /host-manager
INFO - Configuring enterprise application: C:\apache-tomee-plus-7.0.0\webapps\host-manager
INFO - Enterprise application "C:\apache-tomee-plus-7.0.0\webapps\host-manager" loaded.
INFO - Assembling app: C:\apache-tomee-plus-7.0.0\webapps\host-manager
INFO - using context file C:\apache-tomee-plus-7.0.0\webapps\host-manager\META-INF\context.xml
INFO - Deployed Application(path=C:\apache-tomee-plus-7.0.0\webapps\host-manager)
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 TL
Ds were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
INFO - Deployment of web application directory C:\apache-tomee-plus-7.0.0\webapps\host-manager has finished in 391 ms
INFO - Deploying web application directory C:\apache-tomee-plus-7.0.0\webapps\manager
INFO - ------------------------- localhost -> /manager
INFO - Configuring enterprise application: C:\apache-tomee-plus-7.0.0\webapps\manager
INFO - Enterprise application "C:\apache-tomee-plus-7.0.0\webapps\manager" loaded.
INFO - Assembling app: C:\apache-tomee-plus-7.0.0\webapps\manager
INFO - using context file C:\apache-tomee-plus-7.0.0\webapps\manager\META-INF\context.xml
INFO - Deployed Application(path=C:\apache-tomee-plus-7.0.0\webapps\manager)
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 TL
Ds were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
INFO - Deployment of web application directory C:\apache-tomee-plus-7.0.0\webapps\manager has finished in 69 ms
INFO - Deploying web application directory C:\apache-tomee-plus-7.0.0\webapps\ROOT
INFO - ------------------------- localhost -> /
INFO - Configuring enterprise application: C:\apache-tomee-plus-7.0.0\webapps\ROOT
INFO - Enterprise application "C:\apache-tomee-plus-7.0.0\webapps\ROOT" loaded.
INFO - Assembling app: C:\apache-tomee-plus-7.0.0\webapps\ROOT
INFO - Deployed Application(path=C:\apache-tomee-plus-7.0.0\webapps\ROOT)
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 TL
Ds were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
INFO - Deployment of web application directory C:\apache-tomee-plus-7.0.0\webapps\ROOT has finished in 60 ms
INFO - Deploying web application directory C:\apache-tomee-plus-7.0.0\webapps\simple-webservice
INFO - ------------------------- localhost -> /simple-webservice
SEVERE - ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/simple-webservice]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:158)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module simple-webse
rvice: 43626
        at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2256)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1151)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1112)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5093)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
        ... 10 more
Caused by: org.apache.openejb.OpenEJBException: Unable to create annotation scanner for web module simple-webservice: 43626
        at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:883)
        at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:231)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2254)
        ... 16 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 43626
        at org.apache.xbean.asm5.ClassReader.readClass(Unknown Source)
        at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
        at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
        at org.apache.xbean.finder.AnnotationFinder.readClassDef(AnnotationFinder.java:1170)
        at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:147)
        at org.apache.xbean.finder.AnnotationFinder.<init>(AnnotationFinder.java:160)
        at org.apache.openejb.config.FinderFactory$OpenEJBAnnotationFinder.<init>(FinderFactory.java:546)
        at org.apache.openejb.config.FinderFactory.newFinder(FinderFactory.java:267)
        at org.apache.openejb.config.FinderFactory.create(FinderFactory.java:80)
        at org.apache.openejb.config.FinderFactory.createFinder(FinderFactory.java:69)
        at org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:875)
        ... 18 more
SEVERE - Error deploying web application directory C:\apache-tomee-plus-7.0.0\webapps\simple-webservice
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].Stan
dardHost[localhost].StandardContext[/simple-webservice]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:730)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
INFO - Deployment of web application directory C:\apache-tomee-plus-7.0.0\webapps\simple-webservice has finished in 61 ms
INFO - Starting ProtocolHandler [http-nio-8080]
INFO - Starting ProtocolHandler [ajp-nio-8009]
INFO - Server startup in 621 ms

1 个答案:

答案 0 :(得分:0)

我认为其中一个类文件可能已损坏并尝试加载它会抛出此错误,但是这些库根本没有帮助,因为它们没有记录它尝试加载的类并找到相同的源代码tomee正在使用(所以我可以添加日志记录)很难,因为maven和online中的源代码似乎有不同的包名称,它们实际构建二进制文件(奇怪)。通过删除一些(或一次一个类)

,唯一的解决方案似乎是反复试验