Skip to main content

[glassfish osgi]

10 replies [Last post]
Anonymous

Hi,

I am using GlassFish Server v3 Preview.
I try to access org.osgi.framework.BundleContext from a jsp. Therefore I
wrote a bundle that is storing the BundleContext (in the start method of
BundleActivator).
After starting the war file and accessing the jsp I get following error:
...
PWC6199: Generated servlet error:
string:///index2_jsp.java:7: package org.osgi.framework does not exist

PWC6199: Generated servlet error:
string:///index2_jsp.java:11: package org.osgi.framework does not exist
...

It seems that the packages can not be loaded. My question is how I can make
sure that this is happen.
When I am accessing a package from a bundle I started in Felix there is no
error. Are these packages private?

greetings,
Alex
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alexander Blotny

Hi all,

I am using GlassFish Server v3 Preview.

When I try to use a Web Service Client created with jax-ws there is an
exception:

javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
not found
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
at javax.xml.ws.spi.Provider.provider(Provider.java:110)
at javax.xml.ws.Service.(Service.java:56)

I have looked in the modules and the webservice-osgi.jar includes this
class. Furthermore the bundle is resolved in the process of using the
client. Has anyone an explanation why this class can not be found?

greetings,
Alex

[att1.html]

Sahoo

Likely a thread context class loader issue. Can you post the complete
stack trace from server.log?

Sahoo

Alexander Blotny wrote:
> Hi all,
>
> I am using GlassFish Server v3 Preview.
>
> When I try to use a Web Service Client created with jax-ws there is an
> exception:
>
> javax.xml.ws.WebServiceException: Provider
> com.sun.xml.ws.spi.ProviderImpl not found
> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
> at javax.xml.ws.Service.(Service.java:56)
>
> I have looked in the modules and the webservice-osgi.jar includes this
> class. Furthermore the bundle is resolved in the process of using the
> client. Has anyone an explanation why this class can not be found?
>
> greetings,
> Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Alexander Blotny

The stack trace is:

[#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
bundle Messaging [214].|#]

[#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]

[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]

[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]

[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:8
2)|#]

[#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activa
tor.java:276)|#]

[#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]

[#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]

[#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
com.sun.xml.ws.spi.ProviderImpl not found|#]

[#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]

[#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]

[#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]

[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]

[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSer
vice.(SendMessageService.java:42)|#]

[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messaging
.java:45)|#]

[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java:
54)|#]

[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
a:589)|#]

[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]

[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| ... 6 more|#]

[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
com.sun.xml.ws.spi.ProviderImpl|#]

[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]

[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at java.security.AccessController.doPrivileged(Native
Method)|#]

[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]

[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]

[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]

[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]

[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| at
javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]

[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
me=Thread-1;| ... 14 more|#]

Am 24.09.09 17:21 schrieb "Sahoo" unter :

> Likely a thread context class loader issue. Can you post the complete
> stack trace from server.log?
>
> Sahoo
>
> Alexander Blotny wrote:
>> Hi all,
>>
>> I am using GlassFish Server v3 Preview.
>>
>> When I try to use a Web Service Client created with jax-ws there is an
>> exception:
>>
>> javax.xml.ws.WebServiceException: Provider
>> com.sun.xml.ws.spi.ProviderImpl not found
>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>> at javax.xml.ws.Service.(Service.java:56)
>>
>> I have looked in the modules and the webservice-osgi.jar includes this
>> class. Furthermore the bundle is resolved in the process of using the
>> client. Has anyone an explanation why this class can not be found?
>>
>> greetings,
>> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

It appears that you are trying to use javax.xml.ws api in the bundle
activator. Since the activator is running with an undefined thread
context class loader and the javax.xml.ws API is not really OSGi
friendly, it is failing to find the provider. I don't see any easier
work around here. Can you try changing your OSGi bundle to a "Web
Application Bundle" as described at [1]? You can do something like this:
1. Add a manifest header called Web-ContextPath in the OSGi bundle with
a value like /foo (anything starting with /).

2. Add a Servlet context listener and call the Web Service in the
servlet context listener instead of calling the activator.

3. Now install and start the bundle whichever way you like. Let me know
if you need further help.

Thanks,
Sahoo

[1]
http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html

Alexander Blotny wrote:
> The stack trace is:
>
> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
> bundle Messaging [214].|#]
>
> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:8
> 2)|#]
>
> [#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activa
> tor.java:276)|#]
>
> [#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>
> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>
> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
> com.sun.xml.ws.spi.ProviderImpl not found|#]
>
> [#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>
> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>
> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSer
> vice.(SendMessageService.java:42)|#]
>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messaging
> .java:45)|#]
>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java:
> 54)|#]
>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
> a:589)|#]
>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| ... 6 more|#]
>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
> com.sun.xml.ws.spi.ProviderImpl|#]
>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
> Method)|#]
>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| at
> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
> me=Thread-1;| ... 14 more|#]
>
>
> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>
>
>> Likely a thread context class loader issue. Can you post the complete
>> stack trace from server.log?
>>
>> Sahoo
>>
>> Alexander Blotny wrote:
>>
>>> Hi all,
>>>
>>> I am using GlassFish Server v3 Preview.
>>>
>>> When I try to use a Web Service Client created with jax-ws there is an
>>> exception:
>>>
>>> javax.xml.ws.WebServiceException: Provider
>>> com.sun.xml.ws.spi.ProviderImpl not found
>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>> at javax.xml.ws.Service.(Service.java:56)
>>>
>>> I have looked in the modules and the webservice-osgi.jar includes this
>>> class. Furthermore the bundle is resolved in the process of using the
>>> client. Has anyone an explanation why this class can not be found?
>>>
>>> greetings,
>>> Alex
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Alexander Blotny

Unfortunately my problem is unsolved. The work around does not work.
Also if I am using the javax.xml.ws api outside of the Activator I get the
same error:

javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
not found

I tried the same stuff in a standalone felix with webservices-api-1.3.1.jar
and webservices-rt-1.3.1.jar and there was no problem.
Then I replaced the webservice-osgi bundle in modules with these jar files
and tried it again with glassfish, but the error stays.

Maybe someone who has successfully used javax.xml.ws api in glassfish?

Am 24.09.09 19:28 schrieb "Sahoo" unter :

> It appears that you are trying to use javax.xml.ws api in the bundle
> activator. Since the activator is running with an undefined thread
> context class loader and the javax.xml.ws API is not really OSGi
> friendly, it is failing to find the provider. I don't see any easier
> work around here. Can you try changing your OSGi bundle to a "Web
> Application Bundle" as described at [1]? You can do something like this:
> 1. Add a manifest header called Web-ContextPath in the OSGi bundle with
> a value like /foo (anything starting with /).
>
> 2. Add a Servlet context listener and call the Web Service in the
> servlet context listener instead of calling the activator.
>
> 3. Now install and start the bundle whichever way you like. Let me know
> if you need further help.
>
> Thanks,
> Sahoo
>
> [1]
> http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html
>
> Alexander Blotny wrote:
>> The stack trace is:
>>
>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
>> bundle Messaging [214].|#]
>>
>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:8
>> 2)|#]
>>
>> [#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activa
>> tor.java:276)|#]
>>
>> [#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>>
>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>>
>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
>> com.sun.xml.ws.spi.ProviderImpl not found|#]
>>
>> [#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>>
>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>>
>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSer
>> vice.(SendMessageService.java:42)|#]
>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messaging
>> .java:45)|#]
>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java:
>> 54)|#]
>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
>> a:589)|#]
>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| ... 6 more|#]
>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
>> com.sun.xml.ws.spi.ProviderImpl|#]
>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
>> Method)|#]
>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| at
>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>> me=Thread-1;| ... 14 more|#]
>>
>>
>> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>>
>>
>>> Likely a thread context class loader issue. Can you post the complete
>>> stack trace from server.log?
>>>
>>> Sahoo
>>>
>>> Alexander Blotny wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am using GlassFish Server v3 Preview.
>>>>
>>>> When I try to use a Web Service Client created with jax-ws there is an
>>>> exception:
>>>>
>>>> javax.xml.ws.WebServiceException: Provider
>>>> com.sun.xml.ws.spi.ProviderImpl not found
>>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>>> at javax.xml.ws.Service.(Service.java:56)
>>>>
>>>> I have looked in the modules and the webservice-osgi.jar includes this
>>>> class. Furthermore the bundle is resolved in the process of using the
>>>> client. Has anyone an explanation why this class can not be found?
>>>>
>>>> greetings,
>>>> Alex
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

Can you provide details after you applied the work around? What changes
you made and what behavior you observed? May be you can attach a test
case where you have already applied the work around for analysis?

Sahoo

Alexander Blotny wrote:
> Unfortunately my problem is unsolved. The work around does not work.
> Also if I am using the javax.xml.ws api outside of the Activator I get the
> same error:
>
> javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
> not found
>
> I tried the same stuff in a standalone felix with webservices-api-1.3.1.jar
> and webservices-rt-1.3.1.jar and there was no problem.
> Then I replaced the webservice-osgi bundle in modules with these jar files
> and tried it again with glassfish, but the error stays.
>
> Maybe someone who has successfully used javax.xml.ws api in glassfish?
>
> Am 24.09.09 19:28 schrieb "Sahoo" unter :
>
>
>> It appears that you are trying to use javax.xml.ws api in the bundle
>> activator. Since the activator is running with an undefined thread
>> context class loader and the javax.xml.ws API is not really OSGi
>> friendly, it is failing to find the provider. I don't see any easier
>> work around here. Can you try changing your OSGi bundle to a "Web
>> Application Bundle" as described at [1]? You can do something like this:
>> 1. Add a manifest header called Web-ContextPath in the OSGi bundle with
>> a value like /foo (anything starting with /).
>>
>> 2. Add a Servlet context listener and call the Web Service in the
>> servlet context listener instead of calling the activator.
>>
>> 3. Now install and start the bundle whichever way you like. Let me know
>> if you need further help.
>>
>> Thanks,
>> Sahoo
>>
>> [1]
>> http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html
>>
>> Alexander Blotny wrote:
>>
>>> The stack trace is:
>>>
>>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
>>> bundle Messaging [214].|#]
>>>
>>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>>>
>>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>>>
>>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>>>
>>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:8
>>> 2)|#]
>>>
>>> [#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activa
>>> tor.java:276)|#]
>>>
>>> [#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>>>
>>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>>>
>>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
>>> com.sun.xml.ws.spi.ProviderImpl not found|#]
>>>
>>> [#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>>>
>>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>>>
>>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>>>
>>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>>>
>>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSer
>>> vice.(SendMessageService.java:42)|#]
>>>
>>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messaging
>>> .java:45)|#]
>>>
>>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java:
>>> 54)|#]
>>>
>>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
>>> a:589)|#]
>>>
>>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>>>
>>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| ... 6 more|#]
>>>
>>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
>>> com.sun.xml.ws.spi.ProviderImpl|#]
>>>
>>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>>>
>>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
>>> Method)|#]
>>>
>>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>>>
>>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>>>
>>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>>>
>>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>>>
>>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| at
>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>>>
>>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadNa
>>> me=Thread-1;| ... 14 more|#]
>>>
>>>
>>> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>>>
>>>
>>>
>>>> Likely a thread context class loader issue. Can you post the complete
>>>> stack trace from server.log?
>>>>
>>>> Sahoo
>>>>
>>>> Alexander Blotny wrote:
>>>>
>>>>
>>>>> Hi all,
>>>>>
>>>>> I am using GlassFish Server v3 Preview.
>>>>>
>>>>> When I try to use a Web Service Client created with jax-ws there is an
>>>>> exception:
>>>>>
>>>>> javax.xml.ws.WebServiceException: Provider
>>>>> com.sun.xml.ws.spi.ProviderImpl not found
>>>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>>>> at javax.xml.ws.Service.(Service.java:56)
>>>>>
>>>>> I have looked in the modules and the webservice-osgi.jar includes this
>>>>> class. Furthermore the bundle is resolved in the process of using the
>>>>> client. Has anyone an explanation why this class can not be found?
>>>>>
>>>>> greetings,
>>>>> Alex
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Alexander Blotny

Hi,

Now it worked. I build a war file and a simple Servlet which initial calls
my webservice class:

public void init() throws ServletException {
super.init();
System.out.println("MESSAGE Test");
Messaging messaging = null;
try {
messaging = new Messaging();
} catch (MalformedURLException e) {
e.printStackTrace();
}

String[] recipients = {"sip:alb@fokus.fraunhofer.de"};
String sender = "sip:alb-test@fokus.fraunhofer.de";
String content = "TEST";
System.out.println("RESULT: " + messaging.sendMessage(recipients, sender,
content));
}

The Messaging class was provided in WEB-INF/lib.

If I do the same in the Activator or in a class called by an osgi event I
get the mentioned exception.

The output in server.log for the event case:

[#|2009-09-29T19:28:27.617+0200|INFO|glassfish|null|_ThreadID=17;_ThreadName
=Thread-1;|WARNING: SvcRef [org.osgi.service.event.EventHandler] EventAdmin:
Exception during event dispatch [org.osgi.service.event.Event
[topic=Messaging] | [org.osgi.service.event.EventHandler] | Bundle(Messaging
[215])] (javax.xml.ws.WebServiceException: Provider
com.sun.xml.ws.spi.ProviderImpl not found)|#]

Alex

Am 29.09.09 15:00 schrieb "Sahoo" unter :

> Can you provide details after you applied the work around? What changes
> you made and what behavior you observed? May be you can attach a test
> case where you have already applied the work around for analysis?
>
> Sahoo
>
> Alexander Blotny wrote:
>> Unfortunately my problem is unsolved. The work around does not work.
>> Also if I am using the javax.xml.ws api outside of the Activator I get the
>> same error:
>>
>> javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
>> not found
>>
>> I tried the same stuff in a standalone felix with webservices-api-1.3.1.jar
>> and webservices-rt-1.3.1.jar and there was no problem.
>> Then I replaced the webservice-osgi bundle in modules with these jar files
>> and tried it again with glassfish, but the error stays.
>>
>> Maybe someone who has successfully used javax.xml.ws api in glassfish?
>>
>> Am 24.09.09 19:28 schrieb "Sahoo" unter :
>>
>>
>>> It appears that you are trying to use javax.xml.ws api in the bundle
>>> activator. Since the activator is running with an undefined thread
>>> context class loader and the javax.xml.ws API is not really OSGi
>>> friendly, it is failing to find the provider. I don't see any easier
>>> work around here. Can you try changing your OSGi bundle to a "Web
>>> Application Bundle" as described at [1]? You can do something like this:
>>> 1. Add a manifest header called Web-ContextPath in the OSGi bundle with
>>> a value like /foo (anything starting with /).
>>>
>>> 2. Add a Servlet context listener and call the Web Service in the
>>> servlet context listener instead of calling the activator.
>>>
>>> 3. Now install and start the bundle whichever way you like. Let me know
>>> if you need further help.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> [1]
>>> http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html
>>>
>>> Alexander Blotny wrote:
>>>
>>>> The stack trace is:
>>>>
>>>>
[#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
>>>> bundle Messaging [214].|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:>>>>
8
>>>> 2)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activ>>>>
a
>>>> tor.java:276)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
>>>> com.sun.xml.ws.spi.ProviderImpl not found|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSe>>>>
r
>>>> vice.(SendMessageService.java:42)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messagin>>>>
g
>>>> .java:45)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java>>>>
:
>>>> 54)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>>
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.ja>>>>
v
>>>> a:589)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| ... 6 more|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
>>>> com.sun.xml.ws.spi.ProviderImpl|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
>>>> Method)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| at
>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>>>>
>>>>
[#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
a
>>>> me=Thread-1;| ... 14 more|#]
>>>>
>>>>
>>>> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>>>>
>>>>
>>>>
>>>>> Likely a thread context class loader issue. Can you post the complete
>>>>> stack trace from server.log?
>>>>>
>>>>> Sahoo
>>>>>
>>>>> Alexander Blotny wrote:
>>>>>
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I am using GlassFish Server v3 Preview.
>>>>>>
>>>>>> When I try to use a Web Service Client created with jax-ws there is an
>>>>>> exception:
>>>>>>
>>>>>> javax.xml.ws.WebServiceException: Provider
>>>>>> com.sun.xml.ws.spi.ProviderImpl not found
>>>>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>>>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>>>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>>>>> at javax.xml.ws.Service.(Service.java:56)
>>>>>>
>>>>>> I have looked in the modules and the webservice-osgi.jar includes this
>>>>>> class. Furthermore the bundle is resolved in the process of using the
>>>>>> client. Has anyone an explanation why this class can not be found?
>>>>>>
>>>>>> greetings,
>>>>>> Alex
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

Can you attach a test case?

Sahoo

Alexander Blotny wrote:
> Hi,
>
> Now it worked. I build a war file and a simple Servlet which initial calls
> my webservice class:
>
> public void init() throws ServletException {
> super.init();
> System.out.println("MESSAGE Test");
> Messaging messaging = null;
> try {
> messaging = new Messaging();
> } catch (MalformedURLException e) {
> e.printStackTrace();
> }
>
> String[] recipients = {"sip:alb@fokus.fraunhofer.de"};
> String sender = "sip:alb-test@fokus.fraunhofer.de";
> String content = "TEST";
> System.out.println("RESULT: " + messaging.sendMessage(recipients, sender,
> content));
> }
>
> The Messaging class was provided in WEB-INF/lib.
>
> If I do the same in the Activator or in a class called by an osgi event I
> get the mentioned exception.
>
> The output in server.log for the event case:
>
> [#|2009-09-29T19:28:27.617+0200|INFO|glassfish|null|_ThreadID=17;_ThreadName
> =Thread-1;|WARNING: SvcRef [org.osgi.service.event.EventHandler] EventAdmin:
> Exception during event dispatch [org.osgi.service.event.Event
> [topic=Messaging] | [org.osgi.service.event.EventHandler] | Bundle(Messaging
> [215])] (javax.xml.ws.WebServiceException: Provider
> com.sun.xml.ws.spi.ProviderImpl not found)|#]
>
>
> Alex
>
>
> Am 29.09.09 15:00 schrieb "Sahoo" unter :
>
>
>> Can you provide details after you applied the work around? What changes
>> you made and what behavior you observed? May be you can attach a test
>> case where you have already applied the work around for analysis?
>>
>> Sahoo
>>
>> Alexander Blotny wrote:
>>
>>> Unfortunately my problem is unsolved. The work around does not work.
>>> Also if I am using the javax.xml.ws api outside of the Activator I get the
>>> same error:
>>>
>>> javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
>>> not found
>>>
>>> I tried the same stuff in a standalone felix with webservices-api-1.3.1.jar
>>> and webservices-rt-1.3.1.jar and there was no problem.
>>> Then I replaced the webservice-osgi bundle in modules with these jar files
>>> and tried it again with glassfish, but the error stays.
>>>
>>> Maybe someone who has successfully used javax.xml.ws api in glassfish?
>>>
>>> Am 24.09.09 19:28 schrieb "Sahoo" unter :
>>>
>>>
>>>
>>>> It appears that you are trying to use javax.xml.ws api in the bundle
>>>> activator. Since the activator is running with an undefined thread
>>>> context class loader and the javax.xml.ws API is not really OSGi
>>>> friendly, it is failing to find the provider. I don't see any easier
>>>> work around here. Can you try changing your OSGi bundle to a "Web
>>>> Application Bundle" as described at [1]? You can do something like this:
>>>> 1. Add a manifest header called Web-ContextPath in the OSGi bundle with
>>>> a value like /foo (anything starting with /).
>>>>
>>>> 2. Add a Servlet context listener and call the Web Service in the
>>>> servlet context listener instead of calling the activator.
>>>>
>>>> 3. Now install and start the bundle whichever way you like. Let me know
>>>> if you need further help.
>>>>
>>>> Thanks,
>>>> Sahoo
>>>>
>>>> [1]
>>>> http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html
>>>>
>>>> Alexander Blotny wrote:
>>>>
>>>>
>>>>> The stack trace is:
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
>>>>> bundle Messaging [214].|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:>>>>
> 8
>
>>>>> 2)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activ>>>>
> a
>
>>>>> tor.java:276)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
>>>>> com.sun.xml.ws.spi.ProviderImpl not found|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSe>>>>
> r
>
>>>>> vice.(SendMessageService.java:42)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messagin>>>>
> g
>
>>>>> .java:45)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java>>>>
> :
>
>>>>> 54)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>>
>>>>>
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.ja>>>>
> v
>
>>>>> a:589)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| ... 6 more|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
>>>>> com.sun.xml.ws.spi.ProviderImpl|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
>>>>> Method)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| at
>>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>>>>>
>>>>>
>>>>>
> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>>>
> a
>
>>>>> me=Thread-1;| ... 14 more|#]
>>>>>
>>>>>
>>>>> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Likely a thread context class loader issue. Can you post the complete
>>>>>> stack trace from server.log?
>>>>>>
>>>>>> Sahoo
>>>>>>
>>>>>> Alexander Blotny wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I am using GlassFish Server v3 Preview.
>>>>>>>
>>>>>>> When I try to use a Web Service Client created with jax-ws there is an
>>>>>>> exception:
>>>>>>>
>>>>>>> javax.xml.ws.WebServiceException: Provider
>>>>>>> com.sun.xml.ws.spi.ProviderImpl not found
>>>>>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>>>>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>>>>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>>>>>> at javax.xml.ws.Service.(Service.java:56)
>>>>>>>
>>>>>>> I have looked in the modules and the webservice-osgi.jar includes this
>>>>>>> class. Furthermore the bundle is resolved in the process of using the
>>>>>>> client. Has anyone an explanation why this class can not be found?
>>>>>>>
>>>>>>> greetings,
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Alexander Blotny

I attached the sources and a compiled version in target folder.
Also there is a dependency bundle in the archive. When you start the
service.messaging bundle the Activator tries to send a SOAP message.

Am 30.09.09 02:49 schrieb "Sahoo" unter :

> Can you attach a test case?
>
> Sahoo
>
> Alexander Blotny wrote:
>> Hi,
>>
>> Now it worked. I build a war file and a simple Servlet which initial calls
>> my webservice class:
>>
>> public void init() throws ServletException {
>> super.init();
>> System.out.println("MESSAGE Test");
>> Messaging messaging = null;
>> try {
>> messaging = new Messaging();
>> } catch (MalformedURLException e) {
>> e.printStackTrace();
>> }
>>
>> String[] recipients = {"sip:alb@fokus.fraunhofer.de"};
>> String sender = "sip:alb-test@fokus.fraunhofer.de";
>> String content = "TEST";
>> System.out.println("RESULT: " + messaging.sendMessage(recipients, sender,
>> content));
>> }
>>
>> The Messaging class was provided in WEB-INF/lib.
>>
>> If I do the same in the Activator or in a class called by an osgi event I
>> get the mentioned exception.
>>
>> The output in server.log for the event case:
>>
>> [#|2009-09-29T19:28:27.617+0200|INFO|glassfish|null|_ThreadID=17;_ThreadName
>> =Thread-1;|WARNING: SvcRef [org.osgi.service.event.EventHandler] EventAdmin:
>> Exception during event dispatch [org.osgi.service.event.Event
>> [topic=Messaging] | [org.osgi.service.event.EventHandler] | Bundle(Messaging
>> [215])] (javax.xml.ws.WebServiceException: Provider
>> com.sun.xml.ws.spi.ProviderImpl not found)|#]
>>
>>
>> Alex
>>
>>
>> Am 29.09.09 15:00 schrieb "Sahoo" unter :
>>
>>
>>> Can you provide details after you applied the work around? What changes
>>> you made and what behavior you observed? May be you can attach a test
>>> case where you have already applied the work around for analysis?
>>>
>>> Sahoo
>>>
>>> Alexander Blotny wrote:
>>>
>>>> Unfortunately my problem is unsolved. The work around does not work.
>>>> Also if I am using the javax.xml.ws api outside of the Activator I get the
>>>> same error:
>>>>
>>>> javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl
>>>> not found
>>>>
>>>> I tried the same stuff in a standalone felix with webservices-api-1.3.1.jar
>>>> and webservices-rt-1.3.1.jar and there was no problem.
>>>> Then I replaced the webservice-osgi bundle in modules with these jar files
>>>> and tried it again with glassfish, but the error stays.
>>>>
>>>> Maybe someone who has successfully used javax.xml.ws api in glassfish?
>>>>
>>>> Am 24.09.09 19:28 schrieb "Sahoo" unter :
>>>>
>>>>
>>>>
>>>>> It appears that you are trying to use javax.xml.ws api in the bundle
>>>>> activator. Since the activator is running with an undefined thread
>>>>> context class loader and the javax.xml.ws API is not really OSGi
>>>>> friendly, it is failing to find the provider. I don't see any easier
>>>>> work around here. Can you try changing your OSGi bundle to a "Web
>>>>> Application Bundle" as described at [1]? You can do something like this:
>>>>> 1. Add a manifest header called Web-ContextPath in the OSGi bundle with
>>>>> a value like /foo (anything starting with /).
>>>>>
>>>>> 2. Add a Servlet context listener and call the Web Service in the
>>>>> servlet context listener instead of calling the activator.
>>>>>
>>>>> 3. Now install and start the bundle whichever way you like. Let me know
>>>>> if you need further help.
>>>>>
>>>>> Thanks,
>>>>> Sahoo
>>>>>
>>>>> [1]
>>>>> http://weblogs.java.net/blog/ss141213/archive/2009/06/developing_hybr.html
>>>>>
>>>>> Alexander Blotny wrote:
>>>>>
>>>>>
>>>>>> The stack trace is:
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;|org.osgi.framework.BundleException: Activator start error in
>>>>>> bundle Messaging [214].|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.391+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1506)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.392+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:>>
>> >>
>> 8
>>
>>>>>> 2)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.393+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activ>>
>> >>
>> a
>>
>>>>>> tor.java:276)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.394+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> org.apache.felix.shell.remote.Shell.run(Shell.java:109)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at java.lang.Thread.run(Thread.java:637)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.395+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;|Caused by: javax.xml.ws.WebServiceException: Provider
>>>>>> com.sun.xml.ws.spi.ProviderImpl not found|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.397+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.398+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> javax.xml.ws.spi.Provider.provider(Provider.java:110)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at javax.xml.ws.Service.(Service.java:56)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> org.csapi.wsdl.parlayx.multimedia_messaging.send.v3_1.service.SendMessageSe>>
>> >>
>> r
>>
>>>>>> vice.(SendMessageService.java:42)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.399+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> de.fhg.fokus.ngni.odysseus.service.messaging.Messaging.sendMessage(Messagin>>
>> >>
>> g
>>
>>>>>> .java:45)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> de.fhg.fokus.ngni.odysseus.service.messaging.Activator.start(Activator.java>>
>> >>
>> :
>>
>>>>>> 54)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>>
>>>>>>
>> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.ja>>
>> >>
>> v
>>
>>>>>> a:589)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.400+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1458)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| ... 6 more|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;|Caused by: java.lang.ClassNotFoundException:
>>>>>> com.sun.xml.ws.spi.ProviderImpl|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> java.net.URLClassLoader$1.run(URLClassLoader.java:200)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at java.security.AccessController.doPrivileged(Native
>>>>>> Method)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.401+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> java.net.URLClassLoader.findClass(URLClassLoader.java:188)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:319)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:254)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| at
>>>>>> javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)|#]
>>>>>>
>>>>>>
>>>>>>
>> [#|2009-09-24T17:23:25.402+0200|SEVERE|glassfish|null|_ThreadID=16;_ThreadN>>
>> >>
>> a
>>
>>>>>> me=Thread-1;| ... 14 more|#]
>>>>>>
>>>>>>
>>>>>> Am 24.09.09 17:21 schrieb "Sahoo" unter :
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Likely a thread context class loader issue. Can you post the complete
>>>>>>> stack trace from server.log?
>>>>>>>
>>>>>>> Sahoo
>>>>>>>
>>>>>>> Alexander Blotny wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I am using GlassFish Server v3 Preview.
>>>>>>>>
>>>>>>>> When I try to use a Web Service Client created with jax-ws there is an
>>>>>>>> exception:
>>>>>>>>
>>>>>>>> javax.xml.ws.WebServiceException: Provider
>>>>>>>> com.sun.xml.ws.spi.ProviderImpl not found
>>>>>>>> at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:33)
>>>>>>>> at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:128)
>>>>>>>> at javax.xml.ws.spi.Provider.provider(Provider.java:110)
>>>>>>>> at javax.xml.ws.Service.(Service.java:56)
>>>>>>>>
>>>>>>>> I have looked in the modules and the webservice-osgi.jar includes this
>>>>>>>> class. Furthermore the bundle is resolved in the process of using the
>>>>>>>> client. Has anyone an explanation why this class can not be found?
>>>>>>>>
>>>>>>>> greetings,
>>>>>>>> Alex
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

[Archiv.zip]
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

It's a limitation of our JSP compiler that it's not able to locate OSGi
API classes. So, you are seeing the compilation failure. Please file a bug.

Thanks,
Sahoo

Alexander Blotny wrote:
> Hi,
>
> I am using GlassFish Server v3 Preview.
> I try to access org.osgi.framework.BundleContext from a jsp. Therefore
> I wrote a bundle that is storing the BundleContext (in the start
> method of BundleActivator).
> After starting the war file and accessing the jsp I get following error:
> ...
> PWC6199: Generated servlet error:
> string:///index2_jsp.java:7: package org.osgi.framework does not exist
>
> PWC6199: Generated servlet error:
> string:///index2_jsp.java:11: package org.osgi.framework does not exist
> ...
>
> It seems that the packages can not be loaded. My question is how I can
> make sure that this is happen.
> When I am accessing a package from a bundle I started in Felix there
> is no error. Are these packages private?
>
> greetings,
> Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net