gpt4 book ai didi

java - tomee webservice 未部署 - asm 错误 - 无法为 Web 模块 simple-webservice 创建注释扫描器 : 43626

转载 作者:太空宇宙 更新时间:2023-11-04 12:28:05 31 4
gpt4 key购买 nike

我正在尝试将基本的Web服务模板部署到tomee,我尝试了Windows 7 64位和Windows 8 64位以及java版本1.8.0_25(64位),1.8.0_91(64位)(此java版本用于构建代码和运行tomee)。 Web 服务是取自互联网的基本示例 - 下面是源代码以及堆栈跟踪。 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

最佳答案

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

关于java - tomee webservice 未部署 - asm 错误 - 无法为 Web 模块 simple-webservice 创建注释扫描器 : 43626,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38173644/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com