users@glassfish.java.net

Re: OSGI Web bundle

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 21 Oct 2009 23:03:27 +0530

Is that all? Has org.springframework.osgi.core actually been resolved?

Thanks,
Sahoo

Pavel Kuzin wrote:
> INFO: Error while starting bundle:
> /usr/local/glassfish/glassfish/domains/domain1/autodeploy/bundles/7_RemotePayments-0.0.2.jar:
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> ndx.billing.RemotePayments [269]: module;
> (&(bundle-symbolic-name=org.springframework.osgi.core)(version=2.0.0.M1))
> Oct 21, 2009 9:18:47 PM
> INFO: org.osgi.framework.BundleException: Unresolved constraint in
> bundle ndx.billing.RemotePayments [269]: module;
> (&(bundle-symbolic-name=org.springframework.osgi.core)(version=2.0.0.M1))
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.framework.Felix.resolveBundle(Felix.java:3268)
> Oct 21, 2009 9:18:47 PM
> INFO: at org.apache.felix.framework.Felix.startBundle(Felix.java:1596)
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:890)
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:877)
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:823)
>
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:657)
>
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:392)
>
> Oct 21, 2009 9:18:47 PM
> INFO: at
> org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)
>
>
>
>
> Sahoo пишет:
>> I don't think version number is an issue. Can you send us the
>> exception details? If those bundles don't get resolved in Felix,
>> continue using Equinox with some work around until I address issue
>> #10439 which I am going to do pretty soon.
>>
>> Sahoo
>>
>> Pavel Kuzin wrote:
>>> Hello!
>>>
>>> Felix have strange errors on resolving Spring Bundles.
>>> It just does not see them.
>>>
>>> Errors like unsatisfied dependency.
>>>
>>> Spring bundles have versions like 3.0.0.RC1 or 3.0.0.M1
>>>
>>> Equinox is loading those bundles fine.
>>>
>>> Sahoo пишет:
>>>> While I am looking into it, can you try using Felix instead of
>>>> Equinox?
>>>>
>>>> Thanks,
>>>> Sahoo
>>>>
>>>> Pavel Kuzin wrote:
>>>>> Now i have another problem.
>>>>>
>>>>> osgi-web-container does not starting with server startup.
>>>>>
>>>>> When i`m starting glassfish, deploing my apps and
>>>>> osgi-web-container to autodeploy/bundles
>>>>> It starts ok, and starts webapp from OSGI bundles.
>>>>>
>>>>> I`m trying to restart glassfish.
>>>>> glassfish is came up.
>>>>> osgi-web-container is deployed but it stays in RESOLVED state.
>>>>>
>>>>> 269 RESOLVED
>>>>> org.glassfish.web.osgi-web-container_3.0.0.SNAPSHOT
>>>>>
>>>>> when i`m conecting to Equinox and give him command to start bundle
>>>>> (start 269).
>>>>> osgi-web-container starting and working ok.
>>>>> 269 ACTIVE
>>>>> org.glassfish.web.osgi-web-container_3.0.0.SNAPSHOT
>>>>>
>>>>>
>>>>> Sahoo пишет:
>>>>>> Hi Pavel,
>>>>>>
>>>>>> I have changed OSGi Web Container in GlassFish to set
>>>>>> osgi-bundlecontext attribute in ServletContext before the web app
>>>>>> initialization event is fired [1], so hopefully Spring context
>>>>>> listener can now function as long as it is looking for the
>>>>>> attribute named osgi-bundlecontext. This attribute is named as
>>>>>> per OSGi rfc #66.
>>>>>>
>>>>>> Thanks,
>>>>>> Sahoo
>>>>>>
>>>>>> [1] https://glassfish.dev.java.net/issues/show_bug.cgi?id=10439
>>>>>>
>>>>>> Pavel Kuzin wrote:
>>>>>>> Hello!
>>>>>>>
>>>>>>> In this time glassfish do this:
>>>>>>>
>>>>>>>
>>>>>>> 1. Catching new bundle by autodeploy (autodeploy/bundles)
>>>>>>> INFO: Installed
>>>>>>> /usr/local/glassfish/glassfish/domains/domain1/autodeploy/bundles/RemotePayments-0.0.2.jar
>>>>>>>
>>>>>>> 2. Resolving it. -> RESOLVED STATE
>>>>>>> 3. bundle->start -> STARTING STATE
>>>>>>> 4. osgi-web-container installing webapp to container and tries
>>>>>>> initialise ServletContext.
>>>>>>> Webapp initialise Spring WebApplication context without OSGI.
>>>>>>> 5. get error because webapp needs
>>>>>>> OsgiBundleXmlWebApplicationContext
>>>>>>> java.lang.Exception: java.lang.IllegalStateException:
>>>>>>> ContainerBase.addChild: start:
>>>>>>> org.apache.catalina.LifecycleException:
>>>>>>> java.lang.IllegalArgumentException: bundle context should be set
>>>>>>> before refreshing the application context
>>>>>>> at
>>>>>>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:118)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
>>>>>>> at
>>>>>>> org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:219)
>>>>>>> at
>>>>>>> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:240)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:308)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.JavaEEDeploymentRequest.deploy(JavaEEDeploymentRequest.java:167)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.JavaEEDeploymentRequest.execute(JavaEEDeploymentRequest.java:119)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.OSGiWebContainer.deployJavaEEArtifacts(OSGiWebContainer.java:141)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.OSGiWebContainer.deploy(OSGiWebContainer.java:106)
>>>>>>>
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.WebExtender.deploy(WebExtender.java:158)
>>>>>>> at
>>>>>>> org.glassfish.web.osgi.WebExtender.bundleChanged(WebExtender.java:110)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1350)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1301)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:338)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:823)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.felix.fileinstall.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:844)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:401)
>>>>>>>
>>>>>>> at
>>>>>>> org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:123)
>>>>>>>
>>>>>>>
>>>>>>> 6. bundle goes to STARTED STATE
>>>>>>> 7. extender starts Spring and OsgiBundleXmlApplicationContext
>>>>>>> INFO: Application context successfully refreshed
>>>>>>> (OsgiBundleXmlApplicationContext(bundle=ndx.billing.RemotePayments,
>>>>>>> config=osgibundle:/META-INF/spring/*.xml))
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>