Skip to main content

Error calling web service

1 reply [Last post]
tskale
Offline
Joined: 2005-08-17
Points: 0

I ma trying to call web service from JavaFX client. Client library is generated using Netbeans and added to JavaFX project.

Platform details:
Product Version: NetBeans IDE 6.0.1 (Build 200801291616)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

The JavaFX project builds fine. But when I try to run, following error occurs:

****************
run:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:997)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323)
at net.java.javafx.typeImpl.F3Shell.main(F3Shell.java:36)
at net.java.javafx.FXShell.main(FXShell.java:6)
Caused by: java.lang.NoClassDefFoundError: [Ljavax/xml/ws/WebServiceFeature;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at net.java.javafx.typeImpl.PropertyIntrospector.getPropertyDescriptors(PropertyIntrospector.java:28)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.createIntrinsicType(TypeFactoryImpl.java:3126)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.getTypeForClass(TypeFactoryImpl.java:6571)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.getTypeInternal(TypeFactoryImpl.java:6643)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.getTypeInternal(TypeFactoryImpl.java:6576)
at net.java.javafx.typeImpl.TypeFactoryImpl$ModuleImpl.getType(TypeFactoryImpl.java:6514)
at net.java.javafx.typeImpl.Compilation.buildCompilationUnit(Compilation.java:1099)
at net.java.javafx.typeImpl.Compilation.buildCompilationUnit(Compilation.java:1387)
at net.java.javafx.typeImpl.Compilation.buildCompilationUnit(Compilation.java:1180)
at net.java.javafx.typeImpl.Compilation.buildCompilationUnit(Compilation.java:1152)
at net.java.javafx.typeImpl.Compilation.compile(Compilation.java:831)
at net.java.javafx.typeImpl.Compilation.compile(Compilation.java:819)
at net.java.javafx.typeImpl.F3Shell$1.run(F3Shell.java:93)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
C:\NetBeansProjects\JavaFXApplication1\nbproject\build-impl.xml:414: The following error occurred while executing this line:
C:\NetBeansProjects\JavaFXApplication1\nbproject\build-impl.xml:261: Java returned: 1
BUILD FAILED (total time: 5 seconds)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tskale
Offline
Joined: 2005-08-17
Points: 0

Resolved the problem:

Added library JAX-WS2.1 under Compile and Run tab of project-properties (from Netbeans Libraries).
The previous error was resolved but another error appeared saying bootstrap loader is loading JAX-WS2.0 lib and suggested to use endorsed mechanism to load JAX-WS 2.1.

Created /endorsed directory in C:\Program Files\Java\jdk1.6.0_03\jre\lib\endorsed
and copied jaxb-api.jar from C:\Program Files\NetBeans 6.0.1\java1\modules\ext\jaxws21

Now it is working as expected.