users@glassfish.java.net

Re: Deployment of converged webapp as osgi bundle...

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 07 Apr 2010 06:28:58 +0530

Hi Erik,

You said you have EJBs in the bundle, yet I don't see any imports for
any of the javax APIs. So, I have a feeling because of the way you have
set up Bundle-ClassPath, your bundle overrides some javax APIs and that
means container can't detect your components, because it has different
definitions of those packages. Remove the javax APIs from
Bundle-ClassPath and give a try.

The manifest header Web-ContextPath is used to indicate a converged war.
As a side note, we like to refer to such a war as a hybrid war or WAB.
GlassFish community uses the word "converged" to mean a convergence of
Telco and Java EE technologies (see project sailfin).

Thanks,
Sahoo

Erik Brakkee wrote:
> Hi,
>
>
> I am trying to deploy a simple wicket application as a converged war
> with a web app and a local EJB together with its implementation.
> I have also configured the project to be an OSGI bundle. The manifest
> contains a Web-ContextPath attribute and the classpath also seems ok.
>
> Nevertheless, when deploying the application by copying it to the
> autodeploy/bundles directory, I get the following exception:
>
> [#|2010-04-06T22:07:33.812+0200|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=23;_ThreadName=Thread-1;|Exception
> while loading the app
> java.lang.RuntimeException: Unable to load EJB module.
> DeploymentContext does not contain any EJB Check archive to ensure
> correct packaging for /tmp/osgiapp8655262920282486946
> at
> org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:133)
> at
> org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
> at
> org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
> at
> org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
>
> at
> org.glassfish.osgiweb.JavaEEDeploymentRequest.deploy(JavaEEDeploymentRequest.java:158)
>
> at
> org.glassfish.osgiweb.JavaEEDeploymentRequest.execute(JavaEEDeploymentRequest.java:119)
>
> at
> org.glassfish.osgiweb.OSGiWebContainer.deployJavaEEArtifacts(OSGiWebContainer.java:147)
>
> at
> org.glassfish.osgiweb.OSGiWebContainer.deploy(OSGiWebContainer.java:111)
> at org.glassfish.osgiweb.WebExtender.deploy(WebExtender.java:166)
> at
> org.glassfish.osgiweb.WebExtender.bundleChanged(WebExtender.java:118)
> at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
>
> at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
>
> at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
>
> at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3576)
> at
> org.apache.felix.framework.Felix.activateBundle(Felix.java:1690)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:902)
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1027)
>
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1013)
>
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1006)
>
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:396)
>
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:206)
>
> |#]
>
>
> The manifest file I am using is this:
>
> Manifest-Version: 1.0
> Embed-Directory: WEB-INF/lib
> Bundle-ClassPath: WEB-INF/classes/,WEB-INF/lib/portlet-api-1.0.jar,WEB
> -INF/lib/slf4j-log4j12-1.4.2.jar,WEB-INF/lib/log4j-1.2.14.jar,WEB-INF
> /lib/javax.inject-1.jar,WEB-INF/lib/slf4j-api-1.5.8.jar,WEB-INF/lib/j
> sr250-api-1.0.jar,WEB-INF/lib/wicket-1.4.7.jar,WEB-INF/lib/weld-wicke
> t-1.0.1-Final.jar,WEB-INF/lib/cdi-api-1.0-SP1.jar,WEB-INF/lib/jboss-i
> nterceptor-api-1.1.jar
> Tool: Bnd-0.0.311
> Bundle-Name: quickstart
> Created-By: 1.6.0_18 (Sun Microsystems Inc.)
> Web-ContextPath: /hybridapp1
> Bundle-Version: 1.0.0.SNAPSHOT
> Bnd-LastModified: 1270584361166
> Embed-Transitive: true
> Bundle-ManifestVersion: 2
> Bundle-Activator: org.wamblee.OsgiIntegrator
> Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> Embed-StripGroup: true
> Bundle-SymbolicName: org.wamblee.wicket-cdi-test
> Embed-Dependency: *;scope=compile|runtime
>
> I know that I have probably included too many dependencies in the war
> right now but I think that is another problem.
>
> Do I need to add any special manifest entries for a converged war?
>
> Cheers
> Erik
>
>
>
>