You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Pierre Henry Perret <ph...@gmail.com> on 2011/01/19 12:28:55 UTC

NoClassDefFoundError

Scr try to instantiate a component at runtime.
This component try to create an instance of a proxy but the java runtime rt
package com.sun.xml.internal.ws.api.message is not found:



Here is the full trace:
_________________________________________
java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.message.Header
not found by org.myproject.pt.services.impl [6]
at $Proxy29.<clinit>(Unknown Source)
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.reflect.Proxy.newProxyInstance(Proxy.java:588)
at
com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:630)
at
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
at
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
at
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
at javax.xml.ws.Service.getPort(Service.java:92)
at
org.myproject.webservices.comp.HardwareMonitorService.getHardwareMonitorPort(HardwareMonitorService.java:64)
at
org.myproject.pt.services.impl.MonitorServiceImpl.<init>(MonitorServiceImpl.java:26)
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
org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
____________________________________

So I have added this property , as specified in osgi core 4  section 3.8.3
'parent delegation':

org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message.*

in the system properties.

But it still throws the stack...!

Any idea ?

Thanks

ps: I use iPOJO 1.6

Re: NoClassDefFoundError

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Wildcards do work, although foo.* won't match classes in foo, just foo's 
children packages.

-> richard

On 1/19/11 9:14, Per-Erik Svensson wrote:
> Did you try with setting the bootdelegation to precisely
> "com.sun.xml.internal.ws.api.message"? I'm not even sure that wild-cards
> work after reading
> http://felix.apache.org/site/apache-felix-framework-configuration-properties.html,
> wich states that it is a comma separated list of packages that should be
> (implicitly) available to all bundles. If you have tried this already, maybe
> you can try specifying
>
> org.osgi.framework.system.packages.extra
>
> instead.
>
> Regards,
> Per-Erik Svensson
>
>
> On Wed, Jan 19, 2011 at 1:19 PM, Pierre Henry Perret<ph...@gmail.com>wrote:
>
>> Thanks Per-Erik.
>>
>> Unfortunately the same error appears.
>> I have put the whome com.sun.* package in place ... without success.
>>
>>
>> Pierre
>>
>>
>>
>> 2011/1/19 Per-Erik Svensson<pe...@gmail.com>
>>
>>> Hi,
>>>
>>> Try removing the wild-card character and dot so that it reads:
>>>
>>> org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message
>>>
>>> If I remember correctly, the boot delegation is list of *packages* that
>>> need
>>> delegation to the boot class path. So,
>>>
>>> com.sun.xml.internal.ws.api.message.*
>>>
>>> would create a list with all sub-packages to
>>> "com.sun.xml.internal.ws.api.message" when what you really want is a list
>>> containing only that package, not its "children".
>>>
>>> Regards,
>>> Per-Erik Svensson
>>>
>>>
>>> On Wed, Jan 19, 2011 at 12:28 PM, Pierre Henry Perret<
>> phperret@gmail.com
>>>> wrote:
>>>> Scr try to instantiate a component at runtime.
>>>> This component try to create an instance of a proxy but the java
>> runtime
>>> rt
>>>> package com.sun.xml.internal.ws.api.message is not found:
>>>>
>>>>
>>>>
>>>> Here is the full trace:
>>>> _________________________________________
>>>> java.lang.NoClassDefFoundError:
>>> com.sun.xml.internal.ws.api.message.Header
>>>> not found by org.myproject.pt.services.impl [6]
>>>> at $Proxy29.<clinit>(Unknown Source)
>>>> 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.reflect.Proxy.newProxyInstance(Proxy.java:588)
>>>> at
>>>>
>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:630)
>>>> at
>>>>
>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
>>>> at
>>>>
>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
>>>> at
>>>>
>>>>
>> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
>>>> at javax.xml.ws.Service.getPort(Service.java:92)
>>>> at
>>>>
>>>>
>> org.myproject.webservices.comp.HardwareMonitorService.getHardwareMonitorPort(HardwareMonitorService.java:64)
>>>> at
>>>>
>>>>
>> org.myproject.pt.services.impl.MonitorServiceImpl.<init>(MonitorServiceImpl.java:26)
>>>> 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
>>>>
>>>>
>> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
>>>> ____________________________________
>>>>
>>>> So I have added this property , as specified in osgi core 4  section
>>> 3.8.3
>>>> 'parent delegation':
>>>>
>>>> org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message.*
>>>>
>>>> in the system properties.
>>>>
>>>> But it still throws the stack...!
>>>>
>>>> Any idea ?
>>>>
>>>> Thanks
>>>>
>>>> ps: I use iPOJO 1.6
>>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError

Posted by Per-Erik Svensson <pe...@gmail.com>.
Did you try with setting the bootdelegation to precisely
"com.sun.xml.internal.ws.api.message"? I'm not even sure that wild-cards
work after reading
http://felix.apache.org/site/apache-felix-framework-configuration-properties.html,
wich states that it is a comma separated list of packages that should be
(implicitly) available to all bundles. If you have tried this already, maybe
you can try specifying

org.osgi.framework.system.packages.extra

instead.

Regards,
Per-Erik Svensson


On Wed, Jan 19, 2011 at 1:19 PM, Pierre Henry Perret <ph...@gmail.com>wrote:

> Thanks Per-Erik.
>
> Unfortunately the same error appears.
> I have put the whome com.sun.* package in place ... without success.
>
>
> Pierre
>
>
>
> 2011/1/19 Per-Erik Svensson <pe...@gmail.com>
>
> > Hi,
> >
> > Try removing the wild-card character and dot so that it reads:
> >
> > org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message
> >
> > If I remember correctly, the boot delegation is list of *packages* that
> > need
> > delegation to the boot class path. So,
> >
> > com.sun.xml.internal.ws.api.message.*
> >
> > would create a list with all sub-packages to
> > "com.sun.xml.internal.ws.api.message" when what you really want is a list
> > containing only that package, not its "children".
> >
> > Regards,
> > Per-Erik Svensson
> >
> >
> > On Wed, Jan 19, 2011 at 12:28 PM, Pierre Henry Perret <
> phperret@gmail.com
> > >wrote:
> >
> > > Scr try to instantiate a component at runtime.
> > > This component try to create an instance of a proxy but the java
> runtime
> > rt
> > > package com.sun.xml.internal.ws.api.message is not found:
> > >
> > >
> > >
> > > Here is the full trace:
> > > _________________________________________
> > > java.lang.NoClassDefFoundError:
> > com.sun.xml.internal.ws.api.message.Header
> > > not found by org.myproject.pt.services.impl [6]
> > > at $Proxy29.<clinit>(Unknown Source)
> > > 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.reflect.Proxy.newProxyInstance(Proxy.java:588)
> > > at
> > >
> > >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:630)
> > > at
> > >
> > >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
> > > at
> > >
> > >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
> > > at
> > >
> > >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
> > > at javax.xml.ws.Service.getPort(Service.java:92)
> > > at
> > >
> > >
> >
> org.myproject.webservices.comp.HardwareMonitorService.getHardwareMonitorPort(HardwareMonitorService.java:64)
> > > at
> > >
> > >
> >
> org.myproject.pt.services.impl.MonitorServiceImpl.<init>(MonitorServiceImpl.java:26)
> > > 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
> > >
> > >
> >
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> > > ____________________________________
> > >
> > > So I have added this property , as specified in osgi core 4  section
> > 3.8.3
> > > 'parent delegation':
> > >
> > > org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message.*
> > >
> > > in the system properties.
> > >
> > > But it still throws the stack...!
> > >
> > > Any idea ?
> > >
> > > Thanks
> > >
> > > ps: I use iPOJO 1.6
> > >
> >
>

Re: NoClassDefFoundError

Posted by Pierre Henry Perret <ph...@gmail.com>.
Thanks Per-Erik.

Unfortunately the same error appears.
I have put the whome com.sun.* package in place ... without success.


Pierre



2011/1/19 Per-Erik Svensson <pe...@gmail.com>

> Hi,
>
> Try removing the wild-card character and dot so that it reads:
>
> org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message
>
> If I remember correctly, the boot delegation is list of *packages* that
> need
> delegation to the boot class path. So,
>
> com.sun.xml.internal.ws.api.message.*
>
> would create a list with all sub-packages to
> "com.sun.xml.internal.ws.api.message" when what you really want is a list
> containing only that package, not its "children".
>
> Regards,
> Per-Erik Svensson
>
>
> On Wed, Jan 19, 2011 at 12:28 PM, Pierre Henry Perret <phperret@gmail.com
> >wrote:
>
> > Scr try to instantiate a component at runtime.
> > This component try to create an instance of a proxy but the java runtime
> rt
> > package com.sun.xml.internal.ws.api.message is not found:
> >
> >
> >
> > Here is the full trace:
> > _________________________________________
> > java.lang.NoClassDefFoundError:
> com.sun.xml.internal.ws.api.message.Header
> > not found by org.myproject.pt.services.impl [6]
> > at $Proxy29.<clinit>(Unknown Source)
> > 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.reflect.Proxy.newProxyInstance(Proxy.java:588)
> > at
> >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:630)
> > at
> >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
> > at
> >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
> > at
> >
> >
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
> > at javax.xml.ws.Service.getPort(Service.java:92)
> > at
> >
> >
> org.myproject.webservices.comp.HardwareMonitorService.getHardwareMonitorPort(HardwareMonitorService.java:64)
> > at
> >
> >
> org.myproject.pt.services.impl.MonitorServiceImpl.<init>(MonitorServiceImpl.java:26)
> > 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
> >
> >
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> > ____________________________________
> >
> > So I have added this property , as specified in osgi core 4  section
> 3.8.3
> > 'parent delegation':
> >
> > org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message.*
> >
> > in the system properties.
> >
> > But it still throws the stack...!
> >
> > Any idea ?
> >
> > Thanks
> >
> > ps: I use iPOJO 1.6
> >
>

Re: NoClassDefFoundError

Posted by Per-Erik Svensson <pe...@gmail.com>.
Hi,

Try removing the wild-card character and dot so that it reads:

org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message

If I remember correctly, the boot delegation is list of *packages* that need
delegation to the boot class path. So,

com.sun.xml.internal.ws.api.message.*

would create a list with all sub-packages to
"com.sun.xml.internal.ws.api.message" when what you really want is a list
containing only that package, not its "children".

Regards,
Per-Erik Svensson


On Wed, Jan 19, 2011 at 12:28 PM, Pierre Henry Perret <ph...@gmail.com>wrote:

> Scr try to instantiate a component at runtime.
> This component try to create an instance of a proxy but the java runtime rt
> package com.sun.xml.internal.ws.api.message is not found:
>
>
>
> Here is the full trace:
> _________________________________________
> java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.message.Header
> not found by org.myproject.pt.services.impl [6]
> at $Proxy29.<clinit>(Unknown Source)
> 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.reflect.Proxy.newProxyInstance(Proxy.java:588)
> at
>
> com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:630)
> at
>
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331)
> at
>
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
> at
>
> com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
> at javax.xml.ws.Service.getPort(Service.java:92)
> at
>
> org.myproject.webservices.comp.HardwareMonitorService.getHardwareMonitorPort(HardwareMonitorService.java:64)
> at
>
> org.myproject.pt.services.impl.MonitorServiceImpl.<init>(MonitorServiceImpl.java:26)
> 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
>
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:183)
> ____________________________________
>
> So I have added this property , as specified in osgi core 4  section 3.8.3
> 'parent delegation':
>
> org.osgi.framework.bootdelegation=com.sun.xml.internal.ws.api.message.*
>
> in the system properties.
>
> But it still throws the stack...!
>
> Any idea ?
>
> Thanks
>
> ps: I use iPOJO 1.6
>