JNDI Error

View: New views
11 Messages — Rating Filter:   Alert me  

JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have everything active now, but the first time I load my felix  
framework things appear to work correctly, but when I stop and start  
felix every subsequent time felix starts the following error occurs:

3/25/09 10:42:56 AM (W) ContainerJNDIResolver.addJNDIName : Data  
already set for JNDIData[name=profileManager, beanName=ProfileManager]  
for the container URL bundle://11.0:0/.
3/25/09 10:42:56 AM (S) NamingManager.createEnvironmentContext :  
Cannot lookup UserTransaction.
javax.naming.NameNotFoundException: javax.transaction.UserTransaction  
[Root exception is java.rmi.NotBoundException:  
javax.transaction.UserTransaction]
        at  
org
ow2
carol
jndi
registry
AbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:99)
        at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:142)
        at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:152)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at org.ow2.carol.jndi.spi.MultiContext.lookup(MultiContext.java:117)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at  
org
ow2
easybeans
naming.NamingManager.createEnvironmentContext(NamingManager.java:121)
        at  
org
ow2
easybeans
deployment.helper.JavaContextHelper.build(JavaContextHelper.java:76)
        at  
org
ow2
easybeans.container.JContainer3.createBeanFactories(JContainer3.java:
425)
        at org.ow2.easybeans.container.JContainer3.start(JContainer3.java:340)
        at  
org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
147)
        at  
org
ow2
easybeans
osgi
ejbjar
EmbeddedServiceListener.serviceChanged(EmbeddedServiceListener.java:67)
        at  
org
apache
felix
framework
util
EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
        at  
org
apache
felix
framework
util.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
        at  
org
apache
felix
framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:
609)
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
        at org.apache.felix.framework.Felix.access$200(Felix.java:38)
        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:841)
        at  
org
apache
felix
framework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
        at  
org
apache
felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:
81)
        at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
        at  
org
apache
felix
framework.BundleContextImpl.registerService(BundleContextImpl.java:252)
        at  
org
apache
felix
framework.BundleContextImpl.registerService(BundleContextImpl.java:230)
        at  
org.ow2.easybeans.osgi.core.EZBCoreService.start(EZBCoreService.java:
138)
        at  
org
ow2.easybeans.osgi.core.EZBCoreService.activate(EZBCoreService.java:
187)
        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:585)
        at  
org
apache
felix
scr
impl
ImmediateComponentManager
createImplementationObject(ImmediateComponentManager.java:226)
        at  
org
apache
felix
scr
impl
ImmediateComponentManager
createComponent(ImmediateComponentManager.java:133)
        at  
org
apache
felix
scr
impl
AbstractComponentManager
activateInternal(AbstractComponentManager.java:476)
        at org.apache.felix.scr.impl.AbstractComponentManager.access
$100(AbstractComponentManager.java:36)
        at org.apache.felix.scr.impl.AbstractComponentManager
$2.run(AbstractComponentManager.java:142)
        at  
org
apache
felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
Caused by: java.rmi.NotBoundException: javax.transaction.UserTransaction
        at  
org
ow2
carol
jndi.registry.jrmp.ManageableRegistry.lookup(ManageableRegistry.java:
126)
        at  
org
ow2
carol
jndi
registry
AbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:97)
        ... 34 more
3/25/09 10:42:56 AM (S) ContextImpl.unbind : CompNamingContext nothing  
to unbind
INFO - 10:42:56 AM [S: null] - ServiceEvent REGISTERED.
INFO - 10:42:56 AM [S: org.ow2.easybeans.core] - ServiceEvent  
REGISTERED.

Does anyone have any ideas what would cause this? I am wonding if my  
EJB jars are getting started before the EasyBean Agent??

Thanks,
-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: JNDI Error

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's probably an ordering problem.
Try to use startlevels to set your ejbjars to a higher startlevel, so
that they have better chance to come after the core + components have
been started.

--G

Skinner Chad a écrit :

> I have everything active now, but the first time I load my felix
> framework things appear to work correctly, but when I stop and start
> felix every subsequent time felix starts the following error occurs:
>
> 3/25/09 10:42:56 AM (W) ContainerJNDIResolver.addJNDIName : Data
> already set for JNDIData[name=profileManager, beanName=ProfileManager]
> for the container URL bundle://11.0:0/.
> 3/25/09 10:42:56 AM (S) NamingManager.createEnvironmentContext :
> Cannot lookup UserTransaction.
> javax.naming.NameNotFoundException: javax.transaction.UserTransaction
> [Root exception is java.rmi.NotBoundException:
> javax.transaction.UserTransaction]
>     at
> orgow2caroljndiregistryAbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:99)
>
>     at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:142)
>     at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:152)
>     at javax.naming.InitialContext.lookup(InitialContext.java:351)
>     at org.ow2.carol.jndi.spi.MultiContext.lookup(MultiContext.java:117)
>     at javax.naming.InitialContext.lookup(InitialContext.java:351)
>     at
> orgow2easybeansnaming.NamingManager.createEnvironmentContext(NamingManager.java:121)
>
>     at
> orgow2easybeansdeployment.helper.JavaContextHelper.build(JavaContextHelper.java:76)
>
>     at
> orgow2easybeans.container.JContainer3.createBeanFactories(JContainer3.java:425)
>
>     at
> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:340)
>     at
> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
>
>     at
> orgow2easybeansosgiejbjarEmbeddedServiceListener.serviceChanged(EmbeddedServiceListener.java:67)
>
>     at
> orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
>
>     at
> orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>
>     at
> orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>
>     at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
>     at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>     at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:841)
>     at
> orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>
>     at
> orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>
>     at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
>     at
> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>
>     at
> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:230)
>
>     at
> org.ow2.easybeans.osgi.core.EZBCoreService.start(EZBCoreService.java:138)
>     at
> orgow2.easybeans.osgi.core.EZBCoreService.activate(EZBCoreService.java:187)
>
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>     at
> sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at
> orgapachefelixscrimplImmediateComponentManagercreateImplementationObject(ImmediateComponentManager.java:226)
>
>     at
> orgapachefelixscrimplImmediateComponentManagercreateComponent(ImmediateComponentManager.java:133)
>
>     at
> orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:476)
>
>     at
> org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
>
>     at
> org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
>
>     at
> orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>
> Caused by: java.rmi.NotBoundException: javax.transaction.UserTransaction
>     at
> orgow2caroljndi.registry.jrmp.ManageableRegistry.lookup(ManageableRegistry.java:126)
>
>     at
> orgow2caroljndiregistryAbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:97)
>
>     ... 34 more
> 3/25/09 10:42:56 AM (S) ContextImpl.unbind : CompNamingContext nothing
> to unbind
> INFO - 10:42:56 AM [S: null] - ServiceEvent REGISTERED.
> INFO - 10:42:56 AM [S: org.ow2.easybeans.core] - ServiceEvent REGISTERED.
>
> Does anyone have any ideas what would cause this? I am wonding if my
> EJB jars are getting started before the EasyBean Agent??
>
> Thanks,
> -- Chad
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I sent this to the Felix list thinking the exact same thing... that  
there is a problem with the start order. However, I have my bundles in  
different startlevels and don't know what I am doing wrong:

Can anyone tell me how the start levels affect the automatic start of  
bundles?

I have the bundles setup as the following:

felix.auto.start.1 = <core osgi and felix bundles>
felix.auto.install.2 = <easybean bundles>
felix.auto.start.2=<ow2 logging bundle> <easybeans agent>
felix.auto.start.3 = <fileinstall bundle>

felix.startlevel.bundle = 4
org.osgi.framework.startlevel=4

The firsttime I start felix (clean cache) this appears to load in the  
proper order and if I drop my custom bundles into the directory for  
file install they are loaded as well. Every subsequent time I start  
felix it appears that my custom bundles in startlevel4 are being  
started before easybeans and I get some JNDI errors.

Should the bundles not start in order (1, 2, 3, 4 ....)?

Thanks,
-- Chad


On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:

> It's probably an ordering problem.
> Try to use startlevels to set your ejbjars to a higher startlevel,  
> so that they have better chance to come after the core + components  
> have been started.
>
> --G
>
> Skinner Chad a écrit :
>> I have everything active now, but the first time I load my felix  
>> framework things appear to work correctly, but when I stop and  
>> start felix every subsequent time felix starts the following error  
>> occurs:
>>
>> 3/25/09 10:42:56 AM (W) ContainerJNDIResolver.addJNDIName : Data  
>> already set for JNDIData[name=profileManager,  
>> beanName=ProfileManager] for the container URL bundle://11.0:0/.
>> 3/25/09 10:42:56 AM (S) NamingManager.createEnvironmentContext :  
>> Cannot lookup UserTransaction.
>> javax.naming.NameNotFoundException:  
>> javax.transaction.UserTransaction [Root exception is  
>> java.rmi.NotBoundException: javax.transaction.UserTransaction]
>>    at  
>> orgow2caroljndiregistryAbsRegistryWrapperContext
>> .lookup(AbsRegistryWrapperContext.java:99)
>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:142)
>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:152)
>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>    at org.ow2.carol.jndi.spi.MultiContext.lookup(MultiContext.java:
>> 117)
>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>    at  
>> orgow2easybeansnaming
>> .NamingManager.createEnvironmentContext(NamingManager.java:121)
>>    at  
>> orgow2easybeansdeployment
>> .helper.JavaContextHelper.build(JavaContextHelper.java:76)
>>    at  
>> orgow2easybeans
>> .container.JContainer3.createBeanFactories(JContainer3.java:425)
>>    at  
>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:340)
>>    at  
>> org
>> .ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
>> 147)
>>    at  
>> orgow2easybeansosgiejbjarEmbeddedServiceListener
>> .serviceChanged(EmbeddedServiceListener.java:67)
>>    at  
>> orgapachefelixframeworkutilEventDispatcher
>> .invokeServiceListenerCallback(EventDispatcher.java:820)
>>    at  
>> orgapachefelixframeworkutil
>> .EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>    at  
>> orgapachefelixframework
>> .util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:
>> 3640)
>>    at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>    at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:  
>> 841)
>>    at  
>> orgapachefelixframework
>> .ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>    at  
>> orgapachefelix
>> .framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>    at org.apache.felix.framework.Felix.registerService(Felix.java:
>> 2773)
>>    at  
>> orgapachefelixframework
>> .BundleContextImpl.registerService(BundleContextImpl.java:252)
>>    at  
>> orgapachefelixframework
>> .BundleContextImpl.registerService(BundleContextImpl.java:230)
>>    at  
>> org
>> .ow2.easybeans.osgi.core.EZBCoreService.start(EZBCoreService.java:
>> 138)
>>    at  
>> orgow2
>> .easybeans.osgi.core.EZBCoreService.activate(EZBCoreService.java:187)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at  
>> sunreflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at  
>> sunreflectDelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:585)
>>    at  
>> orgapachefelixscrimplImmediateComponentManagercreateImplementationObject
>> (ImmediateComponentManager.java:226)
>>    at  
>> orgapachefelixscrimplImmediateComponentManagercreateComponent
>> (ImmediateComponentManager.java:133)
>>    at  
>> orgapachefelixscrimplAbstractComponentManageractivateInternal
>> (AbstractComponentManager.java:476)
>>    at org.apache.felix.scr.impl.AbstractComponentManager.access
>> $100(AbstractComponentManager.java:36)
>>    at org.apache.felix.scr.impl.AbstractComponentManager
>> $2.run(AbstractComponentManager.java:142)
>>    at  
>> orgapachefelix
>> .scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>> Caused by: java.rmi.NotBoundException:  
>> javax.transaction.UserTransaction
>>    at  
>> orgow2caroljndi
>> .registry.jrmp.ManageableRegistry.lookup(ManageableRegistry.java:126)
>>    at  
>> orgow2caroljndiregistryAbsRegistryWrapperContext
>> .lookup(AbsRegistryWrapperContext.java:97)
>>    ... 34 more
>> 3/25/09 10:42:56 AM (S) ContextImpl.unbind : CompNamingContext  
>> nothing to unbind
>> INFO - 10:42:56 AM [S: null] - ServiceEvent REGISTERED.
>> INFO - 10:42:56 AM [S: org.ow2.easybeans.core] - ServiceEvent  
>> REGISTERED.
>>
>> Does anyone have any ideas what would cause this? I am wonding if  
>> my EJB jars are getting started before the EasyBean Agent??
>>
>> Thanks,
>> -- Chad
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>> MAY BE UNLAWFUL.
>>
>>
>
> <Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guillaume,

I don't know if this problem is ordering or not, but while looking  
into the problem and searching on Google I ran across a post you  
responded to that will cause me problems as well. (http://mail.objectweb.org/easybeans/2008-11/msg00040.html 
) This post deals with JNDI lookups and needing to set the  
ContextClassLoader. You had created a naming bundle that would allow  
for the InitialContext to be registered as a service that could be  
utilized by other bundles. Do you know if this functionality is  
included in the Easy Beans bundles or
is their a packaged bundle that one can use?

Also, is this still the recommended way to perform JNDI lookups.

-- Chad


On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:

> It's probably an ordering problem.
> Try to use startlevels to set your ejbjars to a higher startlevel,  
> so that they have better chance to come after the core + components  
> have been started.
>
> --G
>
> Skinner Chad a écrit :
>> I have everything active now, but the first time I load my felix  
>> framework things appear to work correctly, but when I stop and  
>> start felix every subsequent time felix starts the following error  
>> occurs:
>>
>> 3/25/09 10:42:56 AM (W) ContainerJNDIResolver.addJNDIName : Data  
>> already set for JNDIData[name=profileManager,  
>> beanName=ProfileManager] for the container URL bundle://11.0:0/.
>> 3/25/09 10:42:56 AM (S) NamingManager.createEnvironmentContext :  
>> Cannot lookup UserTransaction.
>> javax.naming.NameNotFoundException:  
>> javax.transaction.UserTransaction [Root exception is  
>> java.rmi.NotBoundException: javax.transaction.UserTransaction]
>>    at  
>> orgow2caroljndiregistryAbsRegistryWrapperContext
>> .lookup(AbsRegistryWrapperContext.java:99)
>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:142)
>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:152)
>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>    at org.ow2.carol.jndi.spi.MultiContext.lookup(MultiContext.java:
>> 117)
>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>    at  
>> orgow2easybeansnaming
>> .NamingManager.createEnvironmentContext(NamingManager.java:121)
>>    at  
>> orgow2easybeansdeployment
>> .helper.JavaContextHelper.build(JavaContextHelper.java:76)
>>    at  
>> orgow2easybeans
>> .container.JContainer3.createBeanFactories(JContainer3.java:425)
>>    at  
>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:340)
>>    at  
>> org
>> .ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:
>> 147)
>>    at  
>> orgow2easybeansosgiejbjarEmbeddedServiceListener
>> .serviceChanged(EmbeddedServiceListener.java:67)
>>    at  
>> orgapachefelixframeworkutilEventDispatcher
>> .invokeServiceListenerCallback(EventDispatcher.java:820)
>>    at  
>> orgapachefelixframeworkutil
>> .EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>    at  
>> orgapachefelixframework
>> .util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:
>> 3640)
>>    at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>    at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:  
>> 841)
>>    at  
>> orgapachefelixframework
>> .ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>    at  
>> orgapachefelix
>> .framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>    at org.apache.felix.framework.Felix.registerService(Felix.java:
>> 2773)
>>    at  
>> orgapachefelixframework
>> .BundleContextImpl.registerService(BundleContextImpl.java:252)
>>    at  
>> orgapachefelixframework
>> .BundleContextImpl.registerService(BundleContextImpl.java:230)
>>    at  
>> org
>> .ow2.easybeans.osgi.core.EZBCoreService.start(EZBCoreService.java:
>> 138)
>>    at  
>> orgow2
>> .easybeans.osgi.core.EZBCoreService.activate(EZBCoreService.java:187)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at  
>> sunreflect
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at  
>> sunreflectDelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:585)
>>    at  
>> orgapachefelixscrimplImmediateComponentManagercreateImplementationObject
>> (ImmediateComponentManager.java:226)
>>    at  
>> orgapachefelixscrimplImmediateComponentManagercreateComponent
>> (ImmediateComponentManager.java:133)
>>    at  
>> orgapachefelixscrimplAbstractComponentManageractivateInternal
>> (AbstractComponentManager.java:476)
>>    at org.apache.felix.scr.impl.AbstractComponentManager.access
>> $100(AbstractComponentManager.java:36)
>>    at org.apache.felix.scr.impl.AbstractComponentManager
>> $2.run(AbstractComponentManager.java:142)
>>    at  
>> orgapachefelix
>> .scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>> Caused by: java.rmi.NotBoundException:  
>> javax.transaction.UserTransaction
>>    at  
>> orgow2caroljndi
>> .registry.jrmp.ManageableRegistry.lookup(ManageableRegistry.java:126)
>>    at  
>> orgow2caroljndiregistryAbsRegistryWrapperContext
>> .lookup(AbsRegistryWrapperContext.java:97)
>>    ... 34 more
>> 3/25/09 10:42:56 AM (S) ContextImpl.unbind : CompNamingContext  
>> nothing to unbind
>> INFO - 10:42:56 AM [S: null] - ServiceEvent REGISTERED.
>> INFO - 10:42:56 AM [S: org.ow2.easybeans.core] - ServiceEvent  
>> REGISTERED.
>>
>> Does anyone have any ideas what would cause this? I am wonding if  
>> my EJB jars are getting started before the EasyBean Agent??
>>
>> Thanks,
>> -- Chad
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>> MAY BE UNLAWFUL.
>>
>>
>
> <Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:

> It's probably an ordering problem.
> Try to use startlevels to set your ejbjars to a higher startlevel,  
> so that they have better chance to come after the core + components  
> have been started.
>

I received a response from the Felix list and the startup process for  
felix occurs in a single thread and the start levels only guarantee  
that the bundles in each run level are called before the next  
runlevel. This means that if the startup process for any of the ejb  
jars starts other threads then my bundles could be trying to start  
before easybeans is finished. I am assuming this is the situatation  
ekke is describing in his blog entry on the EasybeansServiceTracker (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html 
) The problem is that I don't understand how to delay the deployment  
of my bundle until the easybeans components are started. Likewise in a  
followup post on declarative services, I can see how if you were  
defining a service you could use the references to require the other  
services to be there before the service is started, but how would this  
work for easybeans. .. I know that I am probably overlooking simple,  
but after doing a lot of reading I am still confused on how to get all  
of these services started properly.

-- Chad
THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: JNDI Error

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, this bundle was just droped there to see if it helps when doing JNDI
usage in an OSGi environment.
It will helps with ClassNotFoundException thrown during a lookup() or a
new InitialContext().

In your case, I'm not sure that it will helps.

I think that the issue comes from that the startup is not sequential.
I mean, the bundle starting list is ordered, and bundles are started one
after the other. But that don't means that services will be started when
the hosting bundle is started.

In fact, services creation is driven by the agent (started as the last
bundle), that creates Configuration object (of ConfigAdmin), that in
turns drives the serviecs/component activation. But this activation is
performed within an other Thread. So it is possible (and probably the
case for you) that 2 Threads are starting 2 services in parallel where
one of the service should be started after the first...


Can you show me the full traces you have when starting your framework a
second time ? (Please use http://paste2.org, traces send by emails are
pretty much unreadable :) )

Skinner Chad a écrit :

> Guillaume,
>
> I don't know if this problem is ordering or not, but while looking
> into the problem and searching on Google I ran across a post you
> responded to that will cause me problems as well.
> (http://mail.objectweb.org/easybeans/2008-11/msg00040.html) This post
> deals with JNDI lookups and needing to set the ContextClassLoader. You
> had created a naming bundle that would allow for the InitialContext to
> be registered as a service that could be utilized by other bundles. Do
> you know if this functionality is included in the Easy Beans bundles or
> is their a packaged bundle that one can use?
>
> Also, is this still the recommended way to perform JNDI lookups.
>
> -- Chad
>
>
> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>
>> It's probably an ordering problem.
>> Try to use startlevels to set your ejbjars to a higher startlevel, so
>> that they have better chance to come after the core + components have
>> been started.
>>
>> --G
>>
>> Skinner Chad a écrit :
>>> I have everything active now, but the first time I load my felix
>>> framework things appear to work correctly, but when I stop and start
>>> felix every subsequent time felix starts the following error occurs:
>>>
>>> 3/25/09 10:42:56 AM (W) ContainerJNDIResolver.addJNDIName : Data
>>> already set for JNDIData[name=profileManager,
>>> beanName=ProfileManager] for the container URL bundle://11.0:0/.
>>> 3/25/09 10:42:56 AM (S) NamingManager.createEnvironmentContext :
>>> Cannot lookup UserTransaction.
>>> javax.naming.NameNotFoundException:
>>> javax.transaction.UserTransaction [Root exception is
>>> java.rmi.NotBoundException: javax.transaction.UserTransaction]
>>>    at
>>> orgow2caroljndiregistryAbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:99)
>>>
>>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:142)
>>>    at org.ow2.carol.jndi.spi.AbsContext.lookup(AbsContext.java:152)
>>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>>    at org.ow2.carol.jndi.spi.MultiContext.lookup(MultiContext.java:117)
>>>    at javax.naming.InitialContext.lookup(InitialContext.java:351)
>>>    at
>>> orgow2easybeansnaming.NamingManager.createEnvironmentContext(NamingManager.java:121)
>>>
>>>    at
>>> orgow2easybeansdeployment.helper.JavaContextHelper.build(JavaContextHelper.java:76)
>>>
>>>    at
>>> orgow2easybeans.container.JContainer3.createBeanFactories(JContainer3.java:425)
>>>
>>>    at
>>> org.ow2.easybeans.container.JContainer3.start(JContainer3.java:340)
>>>    at
>>> org.ow2.easybeans.osgi.ejbjar.Activator.startContainer(Activator.java:147)
>>>
>>>    at
>>> orgow2easybeansosgiejbjarEmbeddedServiceListener.serviceChanged(EmbeddedServiceListener.java:67)
>>>
>>>    at
>>> orgapachefelixframeworkutilEventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:820)
>>>
>>>    at
>>> orgapachefelixframeworkutil.EventDispatcher.fireEventImmediately(EventDispatcher.java:678)
>>>
>>>    at
>>> orgapachefelixframework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:609)
>>>
>>>    at
>>> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3640)
>>>    at org.apache.felix.framework.Felix.access$200(Felix.java:38)
>>>    at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:
>>> ==20
>>> 841)
>>>    at
>>> orgapachefelixframework.ServiceRegistry.fireServiceChanged(ServiceRegistry.java:568)
>>>
>>>    at
>>> orgapachefelix.framework.ServiceRegistry.registerService(ServiceRegistry.java:81)
>>>
>>>    at org.apache.felix.framework.Felix.registerService(Felix.java:2773)
>>>    at
>>> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:252)
>>>
>>>    at
>>> orgapachefelixframework.BundleContextImpl.registerService(BundleContextImpl.java:230)
>>>
>>>    at
>>> org.ow2.easybeans.osgi.core.EZBCoreService.start(EZBCoreService.java:138)
>>>
>>>    at
>>> orgow2.easybeans.osgi.core.EZBCoreService.activate(EZBCoreService.java:187)
>>>
>>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>    at
>>> sunreflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>
>>>    at
>>> sunreflectDelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>>    at java.lang.reflect.Method.invoke(Method.java:585)
>>>    at
>>> orgapachefelixscrimplImmediateComponentManagercreateImplementationObject(ImmediateComponentManager.java:226)
>>>
>>>    at
>>> orgapachefelixscrimplImmediateComponentManagercreateComponent(ImmediateComponentManager.java:133)
>>>
>>>    at
>>> orgapachefelixscrimplAbstractComponentManageractivateInternal(AbstractComponentManager.java:476)
>>>
>>>    at
>>> org.apache.felix.scr.impl.AbstractComponentManager.access$100(AbstractComponentManager.java:36)
>>>
>>>    at
>>> org.apache.felix.scr.impl.AbstractComponentManager$2.run(AbstractComponentManager.java:142)
>>>
>>>    at
>>> orgapachefelix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)
>>>
>>> Caused by: java.rmi.NotBoundException:
>>> javax.transaction.UserTransaction
>>>    at
>>> orgow2caroljndi.registry.jrmp.ManageableRegistry.lookup(ManageableRegistry.java:126)
>>>
>>>    at
>>> orgow2caroljndiregistryAbsRegistryWrapperContext.lookup(AbsRegistryWrapperContext.java:97)
>>>
>>>    ... 34 more
>>> 3/25/09 10:42:56 AM (S) ContextImpl.unbind : CompNamingContext
>>> nothing to unbind
>>> INFO - 10:42:56 AM [S: null] - ServiceEvent REGISTERED.
>>> INFO - 10:42:56 AM [S: org.ow2.easybeans.core] - ServiceEvent
>>> REGISTERED.
>>>
>>> Does anyone have any ideas what would cause this? I am wonding if my
>>> EJB jars are getting started before the EasyBean Agent??
>>>
>>> Thanks,
>>> -- Chad
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS
>>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED
>>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>
>>>
>>
>> <Guillaume_Sauthier.vcf>
>
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: Re: JNDI Error

by Guillaume Sauthier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, I think that ekke described exactly the problem you're facing.
So, the ServiceTracker seems a good idea.

--G

Skinner Chad a écrit :

>
> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>
>> It's probably an ordering problem.
>> Try to use startlevels to set your ejbjars to a higher startlevel, so
>> that they have better chance to come after the core + components have
>> been started.
>>
>
> I received a response from the Felix list and the startup process for
> felix occurs in a single thread and the start levels only guarantee
> that the bundles in each run level are called before the next
> runlevel. This means that if the startup process for any of the ejb
> jars starts other threads then my bundles could be trying to start
> before easybeans is finished. I am assuming this is the situatation
> ekke is describing in his blog entry on the EasybeansServiceTracker
> (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html)
> The problem is that I don't understand how to delay the deployment of
> my bundle until the easybeans components are started. Likewise in a
> followup post on declarative services, I can see how if you were
> defining a service you could use the references to require the other
> services to be there before the service is started, but how would this
> work for easybeans. .. I know that I am probably overlooking simple,
> but after doing a lot of reading I am still confused on how to get all
> of these services started properly.
>
> -- Chad
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>

[Guillaume_Sauthier.vcf]

begin:vcard
fn:Guillaume Sauthier
n:Sauthier;Guillaume
org:<a href="http://www.ow2.org"><img title="OW2" alt="OW2 Consortium" border="0" src="http://www.ow2.org/xwiki/bin/skin/XWiki/DefaultSkin/logoOW2.png" /></a>
adr:;;;;;;France
email;internet:guillaume.sauthier@...
title:<a href="http://jonas.ow2.org">JOnAS Application Server</a>
x-mozilla-html:TRUE
url:http://jonas.ow2.org
version:2.1
end:vcard



Re: Re: Re: Re: JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just tried this again and in order to get an initial clean start I  
deleted my cache folder and then started felix. It generated the same  
error. It appears that the only time it starts correctly is when I  
start felix and then later add the files to the file install directory.

I am certain that I am going to need to add some logic to delay the  
starting of my EJB bundles, but how would I do that using a service  
tracker? Does anyone have a good example of how this would be done? I  
am not certain how to delay the activation of the services using a  
ServiceTracker.

--Chad



On Mar 27, 2009, at 3:38 AM, Guillaume Sauthier wrote:

> Yeah, I think that ekke described exactly the problem you're facing.
> So, the ServiceTracker seems a good idea.
>
> --G
>
> Skinner Chad a écrit :
>>
>> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>>
>>> It's probably an ordering problem.
>>> Try to use startlevels to set your ejbjars to a higher startlevel,  
>>> so that they have better chance to come after the core +  
>>> components have been started.
>>>
>>
>> I received a response from the Felix list and the startup process  
>> for felix occurs in a single thread and the start levels only  
>> guarantee that the bundles in each run level are called before the  
>> next runlevel. This means that if the startup process for any of  
>> the ejb jars starts other threads then my bundles could be trying  
>> to start before easybeans is finished. I am assuming this is the  
>> situatation ekke is describing in his blog entry on the  
>> EasybeansServiceTracker (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html 
>> ) The problem is that I don't understand how to delay the  
>> deployment of my bundle until the easybeans components are started.  
>> Likewise in a followup post on declarative services, I can see how  
>> if you were defining a service you could use the references to  
>> require the other services to be there before the service is  
>> started, but how would this work for easybeans. .. I know that I am  
>> probably overlooking simple, but after doing a lot of reading I am  
>> still confused on how to get all of these services started properly.
>>
>> -- Chad
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>> MAY BE UNLAWFUL.
>>
>>
>
> <Guillaume_Sauthier.vcf>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: Re: Re: Re: Re: JNDI Error

by Florent BENOIT-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    Chad,

You can follow ekke's article:
   
http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server-ejb3.html

Regards,

Florent

Skinner Chad wrote:

> I just tried this again and in order to get an initial clean start I
> deleted my cache folder and then started felix. It generated the same
> error. It appears that the only time it starts correctly is when I
> start felix and then later add the files to the file install directory.
>
> I am certain that I am going to need to add some logic to delay the
> starting of my EJB bundles, but how would I do that using a service
> tracker? Does anyone have a good example of how this would be done? I
> am not certain how to delay the activation of the services using a
> ServiceTracker.
>
> --Chad
>
>
>
> On Mar 27, 2009, at 3:38 AM, Guillaume Sauthier wrote:
>
>> Yeah, I think that ekke described exactly the problem you're facing.
>> So, the ServiceTracker seems a good idea.
>>
>> --G
>>
>> Skinner Chad a écrit :
>>>
>>> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>>>
>>>> It's probably an ordering problem.
>>>> Try to use startlevels to set your ejbjars to a higher startlevel,
>>>> so that they have better chance to come after the core + components
>>>> have been started.
>>>>
>>>
>>> I received a response from the Felix list and the startup process
>>> for felix occurs in a single thread and the start levels only
>>> guarantee that the bundles in each run level are called before the
>>> next runlevel. This means that if the startup process for any of the
>>> ejb jars starts other threads then my bundles could be trying to
>>> start before easybeans is finished. I am assuming this is the
>>> situatation ekke is describing in his blog entry on the
>>> EasybeansServiceTracker
>>> (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html)
>>> The problem is that I don't understand how to delay the deployment
>>> of my bundle until the easybeans components are started. Likewise in
>>> a followup post on declarative services, I can see how if you were
>>> defining a service you could use the references to require the other
>>> services to be there before the service is started, but how would
>>> this work for easybeans. .. I know that I am probably overlooking
>>> simple, but after doing a lot of reading I am still confused on how
>>> to get all of these services started properly.
>>>
>>> -- Chad
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS
>>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED
>>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>
>>>
>>
>> <Guillaume_Sauthier.vcf>
>
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY
> BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY
> REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING,
> PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL
> MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>
>


Re: Re: Re: Re: Re: Re: JNDI Error

by chadws :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I know I am being a little slow here, but I have read this article  
numerous times and I am still not certain how it would be done. Should  
I create a custom Bundle Activator that starts the service tracker and  
then once all of the required services a registered call the EasyBeans  
Bundle activator passing in the bundle context? or is there a better  
way to watch for this initialization and activate the bundle?

For my services I know that I can call methods to register my services  
from the service tracker or declarative services, but I am just lost  
on how to do this when you have to call the easybeans activator.

Thanks,
-- Chad


On Mar 27, 2009, at 9:03 AM, Florent BENOIT wrote:

>   Chad,
>
> You can follow ekke's article:
>   http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server-ejb3.html
>
> Regards,
>
> Florent
>
> Skinner Chad wrote:
>> I just tried this again and in order to get an initial clean start  
>> I deleted my cache folder and then started felix. It generated the  
>> same error. It appears that the only time it starts correctly is  
>> when I start felix and then later add the files to the file install  
>> directory.
>>
>> I am certain that I am going to need to add some logic to delay the  
>> starting of my EJB bundles, but how would I do that using a service  
>> tracker? Does anyone have a good example of how this would be done?  
>> I am not certain how to delay the activation of the services using  
>> a ServiceTracker.
>>
>> --Chad
>>
>>
>>
>> On Mar 27, 2009, at 3:38 AM, Guillaume Sauthier wrote:
>>
>>> Yeah, I think that ekke described exactly the problem you're facing.
>>> So, the ServiceTracker seems a good idea.
>>>
>>> --G
>>>
>>> Skinner Chad a écrit :
>>>>
>>>> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>>>>
>>>>> It's probably an ordering problem.
>>>>> Try to use startlevels to set your ejbjars to a higher  
>>>>> startlevel, so that they have better chance to come after the  
>>>>> core + components have been started.
>>>>>
>>>>
>>>> I received a response from the Felix list and the startup process  
>>>> for felix occurs in a single thread and the start levels only  
>>>> guarantee that the bundles in each run level are called before  
>>>> the next runlevel. This means that if the startup process for any  
>>>> of the ejb jars starts other threads then my bundles could be  
>>>> trying to start before easybeans is finished. I am assuming this  
>>>> is the situatation ekke is describing in his blog entry on the  
>>>> EasybeansServiceTracker (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html 
>>>> ) The problem is that I don't understand how to delay the  
>>>> deployment of my bundle until the easybeans components are  
>>>> started. Likewise in a followup post on declarative services, I  
>>>> can see how if you were defining a service you could use the  
>>>> references to require the other services to be there before the  
>>>> service is started, but how would this work for easybeans. .. I  
>>>> know that I am probably overlooking simple, but after doing a lot  
>>>> of reading I am still confused on how to get all of these  
>>>> services started properly.
>>>>
>>>> -- Chad
>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>>>> MAY BE UNLAWFUL.
>>>>
>>>>
>>>
>>> <Guillaume_Sauthier.vcf>
>>
>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN  
>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE  
>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL  
>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING  
>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING  
>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND  
>> MAY BE UNLAWFUL.
>>
>>
>

THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.

Re: JNDI Error

by ekke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

have you solved your problem ?
I know its not easy

I was at eclipseCon and now I'm working on my session at JAX conference
(OSGI Experts day) where I'll talk about my osgi-equinox-easybeans server.
  after the JAX conference I'll have perhaps some time to answer in detail

ekke

Skinner Chad schrieb:

> I know I am being a little slow here, but I have read this article
> numerous times and I am still not certain how it would be done. Should I
> create a custom Bundle Activator that starts the service tracker and
> then once all of the required services a registered call the EasyBeans
> Bundle activator passing in the bundle context? or is there a better way
> to watch for this initialization and activate the bundle?
>
> For my services I know that I can call methods to register my services
> from the service tracker or declarative services, but I am just lost on
> how to do this when you have to call the easybeans activator.
>
> Thanks,
> -- Chad
>
>
> On Mar 27, 2009, at 9:03 AM, Florent BENOIT wrote:
>
>>   Chad,
>>
>> You can follow ekke's article:
>>  
>> http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server-ejb3.html 
>>
>>
>> Regards,
>>
>> Florent
>>
>> Skinner Chad wrote:
>>> I just tried this again and in order to get an initial clean start I
>>> deleted my cache folder and then started felix. It generated the same
>>> error. It appears that the only time it starts correctly is when I
>>> start felix and then later add the files to the file install directory.
>>>
>>> I am certain that I am going to need to add some logic to delay the
>>> starting of my EJB bundles, but how would I do that using a service
>>> tracker? Does anyone have a good example of how this would be done? I
>>> am not certain how to delay the activation of the services using a
>>> ServiceTracker.
>>>
>>> --Chad
>>>
>>>
>>>
>>> On Mar 27, 2009, at 3:38 AM, Guillaume Sauthier wrote:
>>>
>>>> Yeah, I think that ekke described exactly the problem you're facing.
>>>> So, the ServiceTracker seems a good idea.
>>>>
>>>> --G
>>>>
>>>> Skinner Chad a écrit :
>>>>>
>>>>> On Mar 25, 2009, at 11:16 AM, Guillaume Sauthier wrote:
>>>>>
>>>>>> It's probably an ordering problem.
>>>>>> Try to use startlevels to set your ejbjars to a higher startlevel,
>>>>>> so that they have better chance to come after the core +
>>>>>> components have been started.
>>>>>>
>>>>>
>>>>> I received a response from the Felix list and the startup process
>>>>> for felix occurs in a single thread and the start levels only
>>>>> guarantee that the bundles in each run level are called before the
>>>>> next runlevel. This means that if the startup process for any of
>>>>> the ejb jars starts other threads then my bundles could be trying
>>>>> to start before easybeans is finished. I am assuming this is the
>>>>> situatation ekke is describing in his blog entry on the
>>>>> EasybeansServiceTracker
>>>>> (http://ekkes-corner.blogspot.com/2008/11/howto-build-osgi-enterprise-server_21.html)
>>>>> The problem is that I don't understand how to delay the deployment
>>>>> of my bundle until the easybeans components are started. Likewise
>>>>> in a followup post on declarative services, I can see how if you
>>>>> were defining a service you could use the references to require the
>>>>> other services to be there before the service is started, but how
>>>>> would this work for easybeans. .. I know that I am probably
>>>>> overlooking simple, but after doing a lot of reading I am still
>>>>> confused on how to get all of these services started properly.
>>>>>
>>>>> -- Chad
>>>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL
>>>>> HAS MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING
>>>>> US OF THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  
>>>>> UNAUTHORIZED FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING
>>>>> THE INFORMATION IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND
>>>>> MAY BE UNLAWFUL.
>>>>>
>>>>>
>>>>
>>>> <Guillaume_Sauthier.vcf>
>>>
>>> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN
>>> TOPEKA, KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE
>>> INFORMATION CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS
>>> MISTAKENLY BEEN SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF
>>> THE ERROR BY REPLY EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED
>>> FORWARDING, PRINTING, COPYING, DISTRIBUTING OR USING THE INFORMATION
>>> IN THIS EMAIL MESSAGE IS STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>>>
>>>
>>
>
> THIS EMAIL MESSAGE IS FROM THE TOPEKA PUBLIC SCHOOLS USD501 IN TOPEKA,
> KANSAS AND IS INTENDED ONLY FOR THE ADDRESSEE.  THE INFORMATION
> CONTAINED HEREIN MAY BE CONFIDENTIAL.  IF THIS EMAIL HAS MISTAKENLY BEEN
> SENT TO YOU, PLEASE DELETE IT AFTER NOTIFYING US OF THE ERROR BY REPLY
> EMAIL OR BY CALLING 785-295-3000.  UNAUTHORIZED FORWARDING, PRINTING,
> COPYING, DISTRIBUTING OR USING THE INFORMATION IN THIS EMAIL MESSAGE IS
> STRICTLY PROHIBITED AND MAY BE UNLAWFUL.
>