Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to build a web service with webtool, or fix invocationTargetException
How to build a web service with webtool, or fix invocationTargetException [message #228956] Sat, 14 March 2009 15:57 Go to next message
Jeff is currently offline JeffFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,
First let me thank anyhow who will take the time to read this message, let
alone offer any advise/solutions.


So here is the deal, I been using eclipse for years now, and of course
love it. It was a bit of transition, as was traditionally more of a
multiple terminals of vi kinda guy... Being able to use vi within the
eclipse editor was the turning point for me I think. Anyhow, I have been
trying to use WTP for a while now, but each time I end up giving up. Now I
really can't give up on it. I have read through the webtools platform
book, spent countless hours searching on the web, and annoyed people in
IRC #eclipse.

Here is what I do:

I create a dynamic web project
I create a WSDL
I use the top-down approach to generate service code from the WSDL
I get through to almost to the end of the wizard, but get a
"invocationTargeException" and then am kinda stuck. (I will attach the
stack trace at the end)


Now the whole processes has actually worked before, but then after some
what appears to be random amount of time, I start getting this
invocationTargetException again. It was quite nice at this point, I
develop my service and the service is synched with my local tomcat server,
etc... Then beyond the exception issues (which of course are only relevant
when I need to update the WSDL), all the sudden my service is no longer
being built or deployed to the my local Tomcat.

Ok so now for future projects I just try to avoid the WTP code gen
processes altogether. I manually generate the code using the axis2 tool
wsdl2java. However, I can't get the dang service to be built and then
deployed to the local tomcat server. Its as if I don't use the built in
code generation wizard, the project doesn't know there is a service being
built.


So my question is, is there a way to use WTP/Eclipse to build web services
without going through the generation wizard. Is there some config file I
can update with information about my web service that eclipse will then
pick up on? I have no problem just going to the command line and
generating the code, using an ant file to do the compiling etc. I am just
looking for how people do web service development in eclipse if not using
the generation wizard.

Now if someone can help me solve the invocationTargetException or the
random loss of "autobuild" that would be great as well.

I am using Ganymede, Version 3.4.2
WTP version 3.0.4

On OSX Leopard

Below is an example WSDL file and stack trace

Jeff

<?xml version="1.0" encoding="UTF-8"?>
<wsdlefinitions
targetNamespace="http://service.weatherstreamprocessingsystem.indiana.edu"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:ax21="http://weatherstreamprocessingsystem.indiana.edu/xsd"
xmlns:ns="http://service.weatherstreamprocessingsystem.indiana.edu"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl=">http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://service.weatherstreamprocessingsystem.indiana.edu"
xmlns:ax22=">http://service.weatherstreamprocessingsystem.indiana.edu">
<xs:element name="registerQuery">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="corelationID" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="timestart" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="timeend" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="query" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="epr" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="postEvent">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="xmlEvent" nillable="false"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="registerQueryRequest">
<wsdlart name="parameters" element="ns:registerQuery">
</wsdlart>
</wsdl:message>
<wsdl:message name="postEventRequest">
<wsdlart name="parameters" element="nsostEvent">
</wsdlart>
</wsdl:message>
<wsdlortType name="QueryListenerPortType">
<wsdlperation name="registerQuery">
<wsdl:input message="ns:registerQueryRequest"
wsaw:Action="urn:registerQuery">
</wsdl:input>
</wsdlperation>
<wsdlperation name="postEvent">
<wsdl:input message="nsostEventRequest" wsaw:Action="urnostEvent">
</wsdl:input>
</wsdlperation>
</wsdlortType>
<wsdl:binding name="QueryListenerHttpBinding"
type="ns:QueryListenerPortType">
<http:binding verb="POST"/>
<wsdlperation name="registerQuery">
<httpperation location="QueryListener/registerQuery"/>
<wsdl:input>
<mime:content part="registerQuery" type="text/xml"/>
</wsdl:input>
</wsdlperation>
<wsdlperation name="postEvent">
<httpperation location="QueryListener/postEvent"/>
<wsdl:input>
<mime:content part="postEvent" type="text/xml"/>
</wsdl:input>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="QueryListenerSoap11Binding"
type="ns:QueryListenerPortType">
<soap:binding style="document"
transport=">http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="registerQuery">
<soapperation soapAction="urn:registerQuery" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdlperation>
<wsdlperation name="postEvent">
<soapperation soapAction="urnostEvent" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="QueryListenerSoap12Binding"
type="ns:QueryListenerPortType">
<soap12:binding style="document"
transport=">http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="registerQuery">
<soap12peration soapAction="urn:registerQuery" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
</wsdlperation>
<wsdlperation name="postEvent">
<soap12peration soapAction="urnostEvent" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="QueryListener">
<wsdlort name="QueryListenerHttpSoap11Endpoint"
binding="ns:QueryListenerSoap11Binding">
<soap:address
location="> http://localhost:8080/axis2/weatherstreamprocessingsystem/Qu eryListener"/>
</wsdlort>
<wsdlort name="QueryListenerHttpSoap12Endpoint"
binding="ns:QueryListenerSoap12Binding">
<soap12:address
location="> http://localhost:8080/weatherstreamprocessingsystem/services /QueryListener"/>
</wsdlort>
<wsdlort name="StreamQueryListenerHttpEndpoint"
binding="ns:QueryListenerHttpBinding">
<http:address
location="> http://localhost:8080/NEXTRADStreamProcessor/services/QueryL istener"/>
</wsdlort>
</wsdl:service>
</wsdlefinitions>

Exception occurred during code generation for the WSDL :
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.jst.ws.axis2.creation.core.command.Axis2WSDL2Jav aCommand.execute(Axis2WSDL2JavaCommand.java:201)
at
org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.runCommand(CommandFragmentEngine.java:419)
at
org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.visitTop(CommandFragmentEngine.java:359)
at
org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.moveForwardToNextStop(CommandFragmentEngine.jav a:254)
at
org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager$6.run(SimpleCommandEngineManager.java:294)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 934)
at
org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager.runForwardToNextStop(SimpleCommandEngineManag er.java:264)
at
org.eclipse.wst.command.internal.env.ui.widgets.WizardPageMa nager.runForwardToNextStop(WizardPageManager.java:91)
at
org.eclipse.wst.command.internal.env.ui.widgets.WizardPageMa nager.getNextPage(WizardPageManager.java:154)
at
org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizard Page.getNextPage(SimpleWizardPage.java:136)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:813)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:22
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :306
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
at org.eclipse.jface.window.Window.open(Window.java:801)
at
org.eclipse.wst.command.internal.env.ui.widgets.popup.Dynami cPopupWizard.run(DynamicPopupWizard.java:130)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:251)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :306
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:234
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:28
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:271)
... 61 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.en gage(SimpleDBExtension.java:53)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:224)
... 61 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.en gage(SimpleDBExtension.java:50)
... 62 more
Caused by: org.apache.axis2.schema.SchemaCompilationException:
java.lang.ClassCastException:
org.apache.xalan.processor.TransformerFactoryImpl
at
org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBean Writer.java:242)
at
org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCo mpiler.java:537)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompile r.java:381)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompile r.java:280)
at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUti lity.java:103)
... 67 more
Caused by: java.lang.ClassCastException:
org.apache.xalan.processor.TransformerFactoryImpl
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
at
org.apache.axis2.schema.writer.JavaBeanWriter.loadTemplate(J avaBeanWriter.java:1236)
at
org.apache.axis2.schema.writer.JavaBeanWriter.process(JavaBe anWriter.java:443)
at
org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBean Writer.java:239)
... 71 more
Re: How to build a web service with webtool, or fix invocationTargetException [message #228977 is a reply to message #228956] Sat, 14 March 2009 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Jeff, you can always create a Ant build script to generate your service
from the WSDL. In some ways it gives you more flexibility, but you
have to do more setup yourself.

If you search the web you'll find plenty of articles explaining how to
generate through Ant.

Dave

Jeff wrote:
> Hi,
> First let me thank anyhow who will take the time to read this message,
> let alone offer any advise/solutions.
>
>
> So here is the deal, I been using eclipse for years now, and of course
> love it. It was a bit of transition, as was traditionally more of a
> multiple terminals of vi kinda guy... Being able to use vi within the
> eclipse editor was the turning point for me I think. Anyhow, I have been
> trying to use WTP for a while now, but each time I end up giving up. Now
> I really can't give up on it. I have read through the webtools platform
> book, spent countless hours searching on the web, and annoyed people in
> IRC #eclipse.
>
> Here is what I do:
>
> I create a dynamic web project
> I create a WSDL
> I use the top-down approach to generate service code from the WSDL
> I get through to almost to the end of the wizard, but get a
> "invocationTargeException" and then am kinda stuck. (I will attach the
> stack trace at the end)
>
>
> Now the whole processes has actually worked before, but then after some
> what appears to be random amount of time, I start getting this
> invocationTargetException again. It was quite nice at this point, I
> develop my service and the service is synched with my local tomcat
> server, etc... Then beyond the exception issues (which of course are
> only relevant when I need to update the WSDL), all the sudden my service
> is no longer being built or deployed to the my local Tomcat.
>
> Ok so now for future projects I just try to avoid the WTP code gen
> processes altogether. I manually generate the code using the axis2 tool
> wsdl2java. However, I can't get the dang service to be built and then
> deployed to the local tomcat server. Its as if I don't use the built in
> code generation wizard, the project doesn't know there is a service
> being built.
>
>
> So my question is, is there a way to use WTP/Eclipse to build web
> services without going through the generation wizard. Is there some
> config file I can update with information about my web service that
> eclipse will then pick up on? I have no problem just going to the
> command line and generating the code, using an ant file to do the
> compiling etc. I am just looking for how people do web service
> development in eclipse if not using the generation wizard.
>
> Now if someone can help me solve the invocationTargetException or the
> random loss of "autobuild" that would be great as well.
>
> I am using Ganymede, Version 3.4.2
> WTP version 3.0.4
>
> On OSX Leopard
>
> Below is an example WSDL file and stack trace
>
> Jeff
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdlefinitions
> targetNamespace="http://service.weatherstreamprocessingsystem.indiana.edu"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:ns1="http://org.apache.axis2/xsd"
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> xmlns:ax21="http://weatherstreamprocessingsystem.indiana.edu/xsd"
> xmlns:ns="http://service.weatherstreamprocessingsystem.indiana.edu"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl=">http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://service.weatherstreamprocessingsystem.indiana.edu"
> xmlns:ax22=">http://service.weatherstreamprocessingsystem.indiana.edu">
> <xs:element name="registerQuery">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="corelationID" nillable="true"
> type="xs:string"/>
> <xs:element minOccurs="0" name="timestart" nillable="true"
> type="xs:string"/>
> <xs:element minOccurs="0" name="timeend" nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="query" nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="epr" nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="postEvent">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="xmlEvent" nillable="false"
> type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> </wsdl:types>
> <wsdl:message name="registerQueryRequest">
> <wsdlart name="parameters" element="ns:registerQuery">
> </wsdlart>
> </wsdl:message>
> <wsdl:message name="postEventRequest">
> <wsdlart name="parameters" element="nsostEvent">
> </wsdlart>
> </wsdl:message>
> <wsdlortType name="QueryListenerPortType">
> <wsdlperation name="registerQuery">
> <wsdl:input message="ns:registerQueryRequest"
> wsaw:Action="urn:registerQuery">
> </wsdl:input>
> </wsdlperation>
> <wsdlperation name="postEvent">
> <wsdl:input message="nsostEventRequest" wsaw:Action="urnostEvent">
> </wsdl:input>
> </wsdlperation>
> </wsdlortType>
> <wsdl:binding name="QueryListenerHttpBinding"
> type="ns:QueryListenerPortType">
> <http:binding verb="POST"/>
> <wsdlperation name="registerQuery">
> <httpperation location="QueryListener/registerQuery"/>
> <wsdl:input>
> <mime:content part="registerQuery" type="text/xml"/>
> </wsdl:input>
> </wsdlperation>
> <wsdlperation name="postEvent">
> <httpperation location="QueryListener/postEvent"/>
> <wsdl:input>
> <mime:content part="postEvent" type="text/xml"/>
> </wsdl:input>
> </wsdlperation>
> </wsdl:binding>
> <wsdl:binding name="QueryListenerSoap11Binding"
> type="ns:QueryListenerPortType">
> <soap:binding style="document"
> transport=">http://schemas.xmlsoap.org/soap/http"/>
> <wsdlperation name="registerQuery">
> <soapperation soapAction="urn:registerQuery" style="document"/>
> <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> </wsdlperation>
> <wsdlperation name="postEvent">
> <soapperation soapAction="urnostEvent" style="document"/>
> <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> </wsdlperation>
> </wsdl:binding>
> <wsdl:binding name="QueryListenerSoap12Binding"
> type="ns:QueryListenerPortType">
> <soap12:binding style="document"
> transport=">http://schemas.xmlsoap.org/soap/http"/>
> <wsdlperation name="registerQuery">
> <soap12peration soapAction="urn:registerQuery" style="document"/>
> <wsdl:input>
> <soap12:body use="literal"/>
> </wsdl:input>
> </wsdlperation>
> <wsdlperation name="postEvent">
> <soap12peration soapAction="urnostEvent" style="document"/>
> <wsdl:input>
> <soap12:body use="literal"/>
> </wsdl:input>
> </wsdlperation>
> </wsdl:binding>
> <wsdl:service name="QueryListener">
> <wsdlort name="QueryListenerHttpSoap11Endpoint"
> binding="ns:QueryListenerSoap11Binding">
> <soap:address
> location="> http://localhost:8080/axis2/weatherstreamprocessingsystem/Qu eryListener"/>
>
> </wsdlort>
> <wsdlort name="QueryListenerHttpSoap12Endpoint"
> binding="ns:QueryListenerSoap12Binding">
> <soap12:address
> location="> http://localhost:8080/weatherstreamprocessingsystem/services /QueryListener"/>
>
> </wsdlort>
> <wsdlort name="StreamQueryListenerHttpEndpoint"
> binding="ns:QueryListenerHttpBinding">
> <http:address
> location="> http://localhost:8080/NEXTRADStreamProcessor/services/QueryL istener"/>
>
> </wsdlort>
> </wsdl:service>
> </wsdlefinitions>
>
> Exception occurred during code generation for the WSDL :
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.eclipse.jst.ws.axis2.creation.core.command.Axis2WSDL2Jav aCommand.execute(Axis2WSDL2JavaCommand.java:201)
>
> at
> org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.runCommand(CommandFragmentEngine.java:419)
>
> at
> org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.visitTop(CommandFragmentEngine.java:359)
>
> at
> org.eclipse.wst.command.internal.env.core.fragment.CommandFr agmentEngine.moveForwardToNextStop(CommandFragmentEngine.jav a:254)
>
> at
> org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager$6.run(SimpleCommandEngineManager.java:294)
>
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
>
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
> at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 934)
> at
> org.eclipse.wst.command.internal.env.ui.widgets.SimpleComman dEngineManager.runForwardToNextStop(SimpleCommandEngineManag er.java:264)
>
> at
> org.eclipse.wst.command.internal.env.ui.widgets.WizardPageMa nager.runForwardToNextStop(WizardPageManager.java:91)
>
> at
> org.eclipse.wst.command.internal.env.ui.widgets.WizardPageMa nager.getNextPage(WizardPageManager.java:154)
>
> at
> org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizard Page.getNextPage(SimpleWizardPage.java:136)
>
> at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:813)
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:369)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:22
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :306
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
> at org.eclipse.jface.window.Window.open(Window.java:801)
> at
> org.eclipse.wst.command.internal.env.ui.widgets.popup.Dynami cPopupWizard.run(DynamicPopupWizard.java:130)
>
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:251)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :306
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:234
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:28
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:271)
>
> .. 61 more
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.en gage(SimpleDBExtension.java:53)
>
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate( CodeGenerationEngine.java:224)
>
> .. 61 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.en gage(SimpleDBExtension.java:50)
>
> .. 62 more
> Caused by: org.apache.axis2.schema.SchemaCompilationException:
> java.lang.ClassCastException:
> org.apache.xalan.processor.TransformerFactoryImpl
> at
> org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBean Writer.java:242)
>
> at
> org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCo mpiler.java:537)
>
> at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompile r.java:381)
> at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompile r.java:280)
> at
> org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUti lity.java:103)
> .. 67 more
> Caused by: java.lang.ClassCastException:
> org.apache.xalan.processor.TransformerFactoryImpl
> at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
> at
> org.apache.axis2.schema.writer.JavaBeanWriter.loadTemplate(J avaBeanWriter.java:1236)
>
> at
> org.apache.axis2.schema.writer.JavaBeanWriter.process(JavaBe anWriter.java:443)
>
> at
> org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBean Writer.java:239)
>
> .. 71 more
>
>
>
Re: How to build a web service with webtool, or fix invocationTargetException [message #229032 is a reply to message #228956] Mon, 16 March 2009 05:38 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4425
Registered: July 2009
Senior Member

Have you done anything unexpected such as adding a different Xalan
or a copy of WSDL4J into the JRE with which you're running Eclipse?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:content assist hot key does not work in my customized xml editor on Eclipse 3.4
Next Topic:JBoss 5 Startup from Eclipse Ganymede
Goto Forum:
  


Current Time: Tue Mar 19 07:56:44 GMT 2024

Powered by FUDForum. Page generated in 0.02688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top