1.
==============
Issue:
When you use Axis2 Service Archiver plugin for Eclipse, you may got following exception.
java.lang.NoClassDefFoundError: org/apache/axis2/databinding/ADBBean
Reason:
I think this is a bug for Axis plugin, because the old cache data for your last operation is not deleted when you restart eclipse.
Solution:
Delete folder: workspace/.metadata/.plugins/Axis2_Service_Archiver
2.
=====================
https://issues.apache.org/jira/browse/AXIS-2146
axis官方issue单子
Different class loading used in attachment type mapping causing NoClassDefFoundError
Driver: Axis 1.2.1
The problem is that when the Eclipse WTP Web services wizard invokes the Java2WSDLAxisAnt task, the
task itself will construct an AntClassLoader around the classpath that the WS
wizard passes into the task.
When creating Web service using Axis 1.2.1 runtime on a Tomcat 4.1 server,
the classpath contains activation.jar and mail.jar.
After the AntClassLoader is constructed, Axis will CACHE this classloader in a
class call ClassUtils. Later on, when the TypeMappingRegistry is initialized,
the TypeMappingRegistry will determine whether type mapping for attachment is
needed. The way this is determined is by calling:
ClassUtils.forName("javax.activiation.DataHandler");
Of course, when creating a Web service on Axis using Tomcat 4.1,
this returns true because ClassUtils uses the CACHED AntClassLoader,
which has activation.jar and mail.jar on its classpath. So the
TypeMappingRegistry will go ahead and initialize the type mapping for
attachment. However, in the attachment type mapping's initialization method, it
does a:
Class.forName("javax.activiation.DataHandler");
instead of a:
ClassUtils.forName("javax.activiation.DataHandler");
Since Class.forName("...") will go to the Eclipse class loader, which does not
have activation.jar and mail.jar on its classpath. A NoClassDefFoundError is
being thrown.
This problem only starts happening with Axis 1.2.1. The same scenario works in Axis 1.1 and Axis 1.0.
This problem does not occur when using Tomcat 5.0 since mail.jar and activation.jar is not in the classpath
passed to Java2WSDLAxisAnt task.
Here's the exception being thrown:
--- Nested Exception ---
java.lang.NoClassDefFoundError: javax/activation/DataSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class$(J
AFDataHandlerSerializerFactory.java:37)
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.getSeria
lizerClass(JAFDataHandlerSerializerFactory.java:46)
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.<init>(J
AFDataHandlerSerializerFactory.java:34)
at org.apache.axis.encoding.DefaultTypeMappingImpl.initMappings(DefaultT
ypeMappingImpl.java:120)
at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(DefaultTypeMap
pingImpl.java:91)
at org.apache.axis.encoding.DefaultTypeMappingImpl.getSingletonDelegate(
DefaultTypeMappingImpl.java:85)
at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRe
gistryImpl.java:155)
at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(TypeMappingRe
gistryImpl.java:149)
at org.apache.axis.wsdl.fromJava.Emitter.<clinit>(Emitter.java:747)
at org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntT
ask.java:172)
at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCo
mmand.executeAntTask(Java2WSDLCommand.java:144)
at org.eclipse.jst.ws.internal.axis.consumption.core.command.Java2WSDLCo
mmand.execute(Java2WSDLCommand.java:81)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEng
ine.runCommand(CommandFragmentEngine.java:335)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEng
ine.visitTop(CommandFragmentEngine.java:301)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEng
ine.moveForwardToNextStop(CommandFragmentEngine.java:217)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineMa
nager$4.run(SimpleCommandEngineManager.java:208)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont
ext.java:346)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineMa
nager.runForwardToNextStop(SimpleCommandEngineManager.java:177)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.run
ForwardToNextStop(WizardPageManager.java:80)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.get
NextPage(WizardPageManager.java:119)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getN
extPage(SimpleWizardPage.java:120)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:7
47)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java
:345)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
at org.eclipse.jface.window.Window.open(Window.java:787)
at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWiz
ard.run(DynamicPopupWizard.java:129)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:2
46)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContri
butionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionC
ontributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.jav
a:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:10
3)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAct
ivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
We had to workaround the problem by explicitely not passing in mail.jar and activation.jar (even though
they are in the Tomcat 4.1 runtime library) when calling setClasspath for Java2WSDLAxisAnt task
so that Axis determines that isAttachmentEnabled is false and thus not do further attachment
type mapping processing.
We were trying to see if there's a way to manually set "isAttachmentEnable" to be false but could not found one.
It would be helpful if an API exist for the user to optionally disable attachment processing rather than having the Axis
code "detects" it.
Please let me know If you need any more information isolating the problem.
3.
=======================
eclipse官方也有bug单子描述
https://bugs.eclipse.org/bugs/show_bug.cgi?id=197819
分享到:
相关推荐
抛出无法找到主类:org.apache.axis.wsdl.WSDL2Java(Throws Could not find main class: org.apache.axis.wsdl.WSDL2Java)。 添加本文的jar包压缩包解压出来的所有jar包到当前使用的java.exe 命令的lib目录下的ext...
标题中的“解决axis2-CodegenWizardPluginBUG- java.lang.reflect.InvocationTargetException”指的是在使用Apache Axis2的CodegenWizardPlugin工具时遇到的一个错误。这个工具是Axis2框架的一部分,用于自动生成...
在Java编程中,`java.lang.RuntimeException` 是一个非检查异常(unchecked exception),它表示程序运行时出现的不正常情况。通常,这类异常是由于程序员的错误或代码逻辑的疏忽造成的,例如类型转换错误、空指针...
MyEclipse axis2 wsdl java.lang.reflect.invocationtargetexception code gen 大家要注意一定要仔细,这个问题基本上缺少包引起的,而且一定要clean 如果需要axis2插件 以及这个plugins中的包在我的其他资源里面有
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder. java:169) at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri alizationContextImpl.java:1015) at ...
在Java世界中,Axis2提供了高效且灵活的处理机制,支持多种协议和服务模型。Eclipse 是一个广泛使用的集成开发环境(IDE),特别适合Java开发。`org.apache.axis2.eclipse.service.plugin_1.7.8`是专门为Eclipse设计...
在开发基于Axis2的Web服务时,可能会遇到各种错误和异常,其中之一就是与`org.apache.axis2.util.JavaUtils.callStackToString`相关的问题。这个问题通常出现在Axis2尝试获取并打印堆栈跟踪信息时。 `...
eclipse插件 org.apache.axis2.eclipse.codegen.plugin_1.7.4.jar
<Call Stack = DEBUG_FRAME = org.apache.axis2.util.JavaUtils.callStackToString(JavaUtils.java:564) DEBUG_FRAME = org.apache.axis2.description.ParameterIncludeImpl.debugParameterAdd(ParameterIncludeImpl...
标题 "axis2 InvocationTargetException" 描述的是一个与Apache Axis2框架相关的编程问题,该问题通常在执行服务调用时出现,提示"InvocationTargetException"。这可能是由于多种原因引起的,包括但不限于错误的服务...
标签:axis2.eclipse.service.plugin-1.5.jar,axis2.eclipse.service.plugin,1.5,jar包下载,依赖包
标签:axis2.eclipse.codegen.plugin-1.5.jar,axis2.eclipse.codegen.plugin,1.5,jar包下载,依赖包
标签:axis2.eclipse.service.plugin-1.5.1-sources.jar,axis2.eclipse.service.plugin,1.5.1,sources,jar包下载,依赖包
标签:axis2.eclipse.service.plugin-1.4.1.jar,axis2.eclipse.service.plugin,1.4.1,jar包下载,依赖包
Eclipse Codegen Plugin是Apache Axis2为Eclipse集成开发环境提供的一款工具,用于帮助开发者自动生成服务客户端和服务端代码,从而简化Web服务的开发流程。"org.apache.axis2.eclipse.codegen.plugin_1.7.8.jar"是...
标题中的"axis2.eclipse.codengen.plugin-SNAPSHOT-axis2-eclipse-codegen-plugin.zip"指出这是一个Axis2的Eclipse插件,主要用于代码生成工具。在 Axis2 的开发环境中,此插件扮演着至关重要的角色,它能帮助开发者...
`org.apache.axis2.eclipse.codegen.plugin_1.6.3`是Axis2的代码生成器插件,它允许开发者从WSDL(Web服务描述语言)文件快速生成Java客户端和服务端代码。这个插件的主要功能包括: 1. **WSDL到Java代码生成**:你...
eclipse插件 org.apache.axis2.eclipse.service.plugin_1.7.4.jar
标签:axis2.eclipse.service.plugin-1.5-sources.jar,axis2.eclipse.service.plugin,1.5,sources,jar包下载,依赖包