users@glassfish.java.net

Help for glassfiah and java application

From: Giacomo Campanelli - Dogma Systems <giacomo.campanelli_at_dogmasystems.it>
Date: Tue, 30 Sep 2008 16:24:30 +0200

Hi. I have a problem with java stand alone application and glassfish.
The java application is developed using netbeans 6.1 and it include a
web service create from wsdl file. The web sercive is located in host
192.168.1.145, my computer is 192.168.1.19.
Ok. When i run the program from netbeans it works very well without any
problem, but when i create the install packege and install the program
in my computer and run it without netbeans i have an exception. Before
post the exception:
1 - the libraries used in the program out of the netbeans are the same
that i used with netbeans;
2 - the java version is the same (1.6.0) and same is the java home;

this is the exception:
Exception occurred during event dispatching:
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap
classloader, but this RI (from
jar:file:/home/giacomo/MyRent/jar/lib/webservices-rt.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place
jaxb-api.jar in the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
       at
com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
       at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)

       at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)

       at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
       at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

       at java.lang.reflect.Method.invoke(Method.java:597)
       at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
       at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
       at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
       at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
       at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
       at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
       at java.security.AccessController.doPrivileged(Native Method)
       at
com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
       at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
       at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

       at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at java.lang.Class.newInstance0(Class.java:355)
       at java.lang.Class.newInstance(Class.java:308)
       at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
       at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
       at javax.xml.ws.spi.Provider.provider(Provider.java:76)
       at javax.xml.ws.Service.<init>(Service.java:57)
       at
webinvoicingapp.WebInvoicingService.<init>(WebInvoicingService.java:46)
       at
it.aessepi.myrentcs.gui.archivi.JSchedaWebInvoicing.salvaElemento(JSchedaWebInvoicing.java:184)

       at
it.aessepi.utils.gui.JDialogScheda.salvaElemento(JDialogScheda.java:150)
       at
it.aessepi.utils.gui.JDialogScheda.doClose(JDialogScheda.java:170)
       at
it.aessepi.utils.gui.JDialogScheda.buttonSalvaActionPerformed(JDialogScheda.java:109)

       at
it.aessepi.utils.gui.JDialogScheda.access$300(JDialogScheda.java:28)
       at
it.aessepi.utils.gui.JDialogScheda$4.actionPerformed(JDialogScheda.java:97)
       at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
       at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

       at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

       at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
       at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

       at java.awt.Component.processMouseEvent(Component.java:6038)
       at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
       at java.awt.Component.processEvent(Component.java:5803)
       at java.awt.Container.processEvent(Container.java:2058)
       at java.awt.Component.dispatchEventImpl(Component.java:4410)
       at java.awt.Container.dispatchEventImpl(Container.java:2116)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
       at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
       at java.awt.Container.dispatchEventImpl(Container.java:2102)
       at java.awt.Window.dispatchEventImpl(Window.java:2429)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
       at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

       at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

       at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)

       at java.awt.Dialog$1.run(Dialog.java:1039)
       at java.awt.Dialog$3.run(Dialog.java:1091)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.awt.Dialog.show(Dialog.java:1089)
       at it.aessepi.utils.gui.JDialogScheda.show(JDialogScheda.java:270)
       at
it.aessepi.myrentcs.gui.archivi.JSchedaClienti.buttonWebInvoicingActionPerformed(JSchedaClienti.java:681)

       at
it.aessepi.myrentcs.gui.archivi.JSchedaClienti.access$500(JSchedaClienti.java:49)

       at
it.aessepi.myrentcs.gui.archivi.JSchedaClienti$6.actionPerformed(JSchedaClienti.java:413)

       at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
       at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

       at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

       at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
       at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

       at java.awt.Component.processMouseEvent(Component.java:6038)
       at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
       at java.awt.Component.processEvent(Component.java:5803)
       at java.awt.Container.processEvent(Container.java:2058)
       at java.awt.Component.dispatchEventImpl(Component.java:4410)
       at java.awt.Container.dispatchEventImpl(Container.java:2116)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
       at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
       at java.awt.Container.dispatchEventImpl(Container.java:2102)
       at java.awt.Window.dispatchEventImpl(Window.java:2429)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
       at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

       at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

       at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)

       at java.awt.Dialog$1.run(Dialog.java:1039)
       at java.awt.Dialog$3.run(Dialog.java:1091)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.awt.Dialog.show(Dialog.java:1089)
       at it.aessepi.utils.gui.JAnagrafica.show(JAnagrafica.java:2171)
       at
it.aessepi.myrentcs.gui.main.MyRentFrame.jMenuAnaClientiActionPerformed(MyRentFrame.java:3213)

       at
it.aessepi.myrentcs.gui.main.MyRentFrame.access$2400(MyRentFrame.java:177)
       at
it.aessepi.myrentcs.gui.main.MyRentFrame$23.actionPerformed(MyRentFrame.java:1193)

       at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
       at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

       at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

       at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
       at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
       at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1170)
       at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1211)

       at java.awt.Component.processMouseEvent(Component.java:6038)
       at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
       at java.awt.Component.processEvent(Component.java:5803)
       at java.awt.Container.processEvent(Container.java:2058)
       at java.awt.Component.dispatchEventImpl(Component.java:4410)
       at java.awt.Container.dispatchEventImpl(Container.java:2116)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
       at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
       at java.awt.Container.dispatchEventImpl(Container.java:2102)
       at java.awt.Window.dispatchEventImpl(Window.java:2429)
       at java.awt.Component.dispatchEvent(Component.java:4240)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
       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)

I had just try to create the endorsed directory in my java home but the
exception in the same. Depends from glassfish?
Any ideas?

thanks for your patience and i hope to help to solve this problem.

Giacomo