You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2009/11/21 09:50:59 UTC

ee apps in trunk

I've played with the welcome app servers a bit and found that the next  
significant problem is that we aren't setting the Bundle-ClassPath  
manifest header in our car bundles.  This shouldn't be an obstacle for  
ejb jars, but is for anything else.

My plan is to solve this as part of GERONIMO-4911 by storing all the  
manifest info in the ConfigurationData.  Perhaps this can replace some  
of the info in the environment field, although that is also used to  
figure out which plugins need to be started before the current one.

comments welcome...

thanks
david jencks


Re: ee apps in trunk

Posted by David Jencks <da...@yahoo.com>.
On Nov 23, 2009, at 12:12 AM, Delos wrote:

> My two cents:
>
> Seems EAR is a complicated case.I think "Fragment Bundle" in OSGI  
> may help. A fragment don't have its own classloader except that of  
> host bundle.If so, EAR may be a host bundle, while ejb jars and WARs  
> are all fragments.

I'm not sure how that would help.  We have no problem constructing a  
single bundle with everything from the ear inside it  -- we already  
unpack ears to this format, we'd just need to add more entries to the  
bundle classpath for the wars.  The problem is how to have several  
bundles each with its own classloader for the individual wars.  I  
suspect we'll have to just set up more than one bundle from such an ear.

thanks
david jencks

>
> Thanks!
>
> 2009/11/23 David Jencks <da...@yahoo.com>
>
> On Nov 22, 2009, at 6:01 PM, Ivan wrote:
>
>> For a EJB/WAR, I could see what Bundle-ClassPath contains. But for  
>> an EAR package, what does it contain, all the jar files in the  
>> libraries, ejb jars and web related classes ? I am just thinking  
>> what the classloader structure of an EE application, especially for  
>> an EAR application. In the classic environment, for an EAR contains  
>> libraries and webapplications, we usually create a parent  
>> classloader for the EAR, and create a classloader for WAR package.   
>> Then, in the OSGI environment, how should it be ?
>> If only a bundle classloader is created and the bundle-classpath  
>> contains all the embedded jar files/classes, will it break the EE  
>> rules ? How about dividing the ear package into more than one  
>> bundle ?
>> Thanks !
>
>
> There are two issues I know of:
>
> 1. osgi allows only one level of nesting of jars, whereas ee allows  
> 2 (jars inside rars and wars).  This isn't really a problem for us  
> since we repackage the ear anyway so we can (continue to) unpack as  
> many nesting levels as we want (as we do now).
>
> 2. Currently wars are set up as semi-independent configurations.  I  
> guess we will want to have them as additional bundles.  I haven't  
> figured out a good plan for this yet.  We've thought about deploying  
> ejb modules and rar modules as separate configurations also, perhaps  
> this will turn out to be an easy thing to do.
>
> Right now I'm concentrating on getting a single war or rar to  
> deploy.... then we can think more about ears.
>
> BTW at the moment I'm putting the osgi info into the Environment  
> object and generating the manifest from that.
>
> thanks
> david jencks
>
>>
>>
>> 2009/11/21 David Jencks <da...@yahoo.com>
>> I've played with the welcome app servers a bit and found that the  
>> next significant problem is that we aren't setting the Bundle- 
>> ClassPath manifest header in our car bundles.  This shouldn't be an  
>> obstacle for ejb jars, but is for anything else.
>>
>> My plan is to solve this as part of GERONIMO-4911 by storing all  
>> the manifest info in the ConfigurationData.  Perhaps this can  
>> replace some of the info in the environment field, although that is  
>> also used to figure out which plugins need to be started before the  
>> current one.
>>
>> comments welcome...
>>
>> thanks
>> david jencks
>>
>>
>>
>>
>> -- 
>> Ivan
>
>
>
>
> -- 
> Best Regards,
>
> Delos


Re: ee apps in trunk

Posted by Delos <da...@gmail.com>.
My two cents:

Seems EAR is a complicated case.I think "Fragment Bundle" in OSGI may help.
A fragment don't have its own classloader except that of host bundle.If so,
EAR may be a host bundle, while ejb jars and WARs are all fragments.

Thanks!

2009/11/23 David Jencks <da...@yahoo.com>

>
> On Nov 22, 2009, at 6:01 PM, Ivan wrote:
>
> For a EJB/WAR, I could see what Bundle-ClassPath contains. But for an EAR
> package, what does it contain, all the jar files in the libraries, ejb jars
> and web related classes ? I am just thinking what the classloader structure
> of an EE application, especially for an EAR application. In the classic
> environment, for an EAR contains libraries and webapplications, we usually
> create a parent classloader for the EAR, and create a classloader for WAR
> package.  Then, in the OSGI environment, how should it be ?
> If only a bundle classloader is created and the bundle-classpath contains
> all the embedded jar files/classes, will it break the EE rules ? How about
> dividing the ear package into more than one bundle ?
> Thanks !
>
>
>
> There are two issues I know of:
>
> 1. osgi allows only one level of nesting of jars, whereas ee allows 2 (jars
> inside rars and wars).  This isn't really a problem for us since we
> repackage the ear anyway so we can (continue to) unpack as many nesting
> levels as we want (as we do now).
>
> 2. Currently wars are set up as semi-independent configurations.  I guess
> we will want to have them as additional bundles.  I haven't figured out a
> good plan for this yet.  We've thought about deploying ejb modules and rar
> modules as separate configurations also, perhaps this will turn out to be an
> easy thing to do.
>
> Right now I'm concentrating on getting a single war or rar to deploy....
> then we can think more about ears.
>
> BTW at the moment I'm putting the osgi info into the Environment object and
> generating the manifest from that.
>
> thanks
> david jencks
>
>
>
> 2009/11/21 David Jencks <da...@yahoo.com>
>
>> I've played with the welcome app servers a bit and found that the next
>> significant problem is that we aren't setting the Bundle-ClassPath manifest
>> header in our car bundles.  This shouldn't be an obstacle for ejb jars, but
>> is for anything else.
>>
>> My plan is to solve this as part of GERONIMO-4911<https://issues.apache.org/jira/browse/GERONIMO-4911>
>>  by storing all the manifest info in the ConfigurationData.  Perhaps this
>> can replace some of the info in the environment field, although that is also
>> used to figure out which plugins need to be started before the current one.
>>
>> comments welcome...
>>
>> thanks
>> david jencks
>>
>>
>
>
> --
> Ivan
>
>
>


-- 
Best Regards,

Delos

Re: ee apps in trunk

Posted by Forrest Xia <fo...@gmail.com>.
On Thu, Nov 26, 2009 at 12:59 PM, Jarek Gawor <jg...@gmail.com> wrote:

> You can try running rm -rf var/cache in the assembly directory before
> starting the server.
>
> Jarek
>
> On Wed, Nov 25, 2009 at 8:20 PM, Forrest Xia <fo...@gmail.com> wrote:
> > Hi Jarek,
> >
> > These WARNs just happen when starting up the server, not when building
> the
> > assembly.
> >
> > Today I will give some tries on:
> > 1. welcome-tomcat-server
>
Tomcat server start failed with an ERROR msg decribed in another post. So by
the time, the tomcat osgi-ed assembly does not work.


> > 2. another simple sample built with car-maven-plugin
>

Succeed with another sample app cviewer by building it as
welcome-jetty-server did. One question is why we need to pre-compile the JSP
files when build time. If you don't do that, an exception will throws when
accessing a jsp in browser.

HTTP ERROR 503

Problem accessing /cviewer/jsp/viewclass.jsp. Reason:

    java.lang.ClassCastException:
org.apache.geronimo.kernel.osgi.BundleClassLoader cannot be cast to
java.net.URLClassLoader

Caused by:

javax.servlet.UnavailableException: java.lang.ClassCastException:
org.apache.geronimo.kernel.osgi.BundleClassLoader cannot be cast to
java.net.URLClassLoader
    at
org.eclipse.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:407)
    at
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:452)
    at
org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:258)
    at
org.apache.geronimo.jetty8.GeronimoServletHolder.doStart(GeronimoServletHolder.java:66)
    at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
    at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:725)
    at
org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1109)
    at
org.eclipse.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1165)
    at
org.eclipse.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:847)
    at
org.apache.geronimo.jetty8.WebAppContextWrapper.registerServletHolder(WebAppContextWrapper.java:460)
    at
org.apache.geronimo.jetty8.ServletHolderWrapper.<init>(ServletHolderWrapper.java:82)
    at
org.apache.geronimo.jetty8.JspServletHolderWrapper.<init>(JspServletHolderWrapper.java:51)
    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
org.apache.xbean.recipe.ReflectionUtil$ConstructorFactory.create(ReflectionUtil.java:952)
    at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
    at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
    at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
    at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:917)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
    at
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:530)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:110)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:145)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:119)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:175)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:253)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:295)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
    at
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:530)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:110)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:145)
    at
org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:119)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:175)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
    at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:253)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:295)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
    at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
    at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:544)
    at
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:385)
    at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:461)
    at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:223)
    at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:715)
    at
org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:149)
    at
org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:81)
    at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:109)
    at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
    at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:32)

> >
> > I will post what I get.
> >
> > Thanks!
> > Forrest
> >
>

Forrest

Re: ee apps in trunk

Posted by Jarek Gawor <jg...@gmail.com>.
You can try running rm -rf var/cache in the assembly directory before
starting the server.

Jarek

On Wed, Nov 25, 2009 at 8:20 PM, Forrest Xia <fo...@gmail.com> wrote:
> Hi Jarek,
>
> These WARNs just happen when starting up the server, not when building the
> assembly.
>
> Today I will give some tries on:
> 1. welcome-tomcat-server
> 2. another simple sample built with car-maven-plugin
>
> I will post what I get.
>
> Thanks!
> Forrest
>

Re: ee apps in trunk

Posted by Forrest Xia <fo...@gmail.com>.
Hi Jarek,

These WARNs just happen when starting up the server, not when building the
assembly.

Today I will give some tries on:
1. welcome-tomcat-server
2. another simple sample built with car-maven-plugin

I will post what I get.

Thanks!
Forrest

Re: ee apps in trunk

Posted by Jarek Gawor <jg...@gmail.com>.
Are you getting these errors when starting up the server or when
building the assembly?

I sometimes see these errors too (I haven't been able to track the
cause yet) in car-maven-plugin but I just recompile the plugins and
things usually just work fine the second time.

Jarek

On Wed, Nov 25, 2009 at 10:33 AM, Forrest Xia <fo...@gmail.com> wrote:
> I double checked those bundles and they are in the assembly's repository. I
> think they should be installed and activated before installing
> jetty8-deployer bundle, isn't it?
>
> Forrest
>

Re: ee apps in trunk

Posted by Forrest Xia <fo...@gmail.com>.
I double checked those bundles and they are in the assembly's repository. I
think they should be installed and activated before installing
jetty8-deployer bundle, isn't it?

Forrest

Re: ee apps in trunk

Posted by Forrest Xia <fo...@gmail.com>.
Hi David,

What I did is building a geronimo-jetty8-minimal assembly, starting it, and
then installing and activating welcome-jetty car bundle on it.

The build order of geronimo-jetty8-minimal assembly as follows:
framework->plugins->plugingroups/web-jetty(disable some
modules)->assemblies/geronimo-jetty8-minimal

When first starting the assembly, jetty8-deployer bundle seems not activated
correctly, and it suspends the server boot.

Exceptions as below:
 WARN  [DependencyManager] Could not install bundle for artifact:
org.apache.geronimo.configs/connector-deployer-1_6//car
org.osgi.framework.BundleException: Unable to cache bundle:
mvn:org.apache.geronimo.configs/connector-deployer-1_6/null/car
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2321)
...
Caused by: java.lang.RuntimeException: URL
[mvn:org.apache.geronimo.configs/connector-deployer-1_6/null/car] could not
be resolved.

WARN  [DependencyManager] Could not install bundle for artifact:
org.apache.geronimo.configs/jetty8//car
org.osgi.framework.BundleException: Unable to cache bundle:
mvn:org.apache.geronimo.configs/jetty8/null/car
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2321)
...
Caused by: java.lang.RuntimeException: URL
[mvn:org.apache.geronimo.configs/jetty8/null/car] could not be resolved.

 WARN  [DependencyManager] Could not install bundle for artifact:
org.apache.geronimo.configs/j2ee-deployer//car
org.osgi.framework.BundleException: Unable to cache bundle:
mvn:org.apache.geronimo.configs/j2ee-deployer/null/car
...
Caused by: java.lang.RuntimeException: URL
[mvn:org.apache.geronimo.configs/j2ee-deployer/null/car] could not be
resolved.

 WARN  [DependencyManager] Could not install bundle for artifact:
org.apache.geronimo.modules/geronimo-web-2.5-builder//jar
org.osgi.framework.BundleException: Unable to cache bundle:
mvn:org.apache.geronimo.modules/geronimo-web-2.5-builder/null
...
Caused by: java.lang.RuntimeException: URL
[mvn:org.apache.geronimo.modules/geronimo-web-2.5-builder/null] could not be
resolved.

 Startup failed
org.apache.geronimo.kernel.config.LifecycleException: load of
org.apache.geronimo.configs/jetty8-deployer/3.0-SNAPSHOT/car failed
    at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:305)
    at
org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:145)
    at
org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:81)
    at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:109)
    at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
    at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:32)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle org.apache.geronimo.configs.jetty8-deployer [125]: package;
(package=org.apache.geronimo.jetty8.deployment)
    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
    at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:300)
    ... 5 more

Seems we need to adjust the module dependencies of web-jetty to ensure the
necessary dependent bundles installed and activate.

Please share your thoughts about why it does not work if doing like that.
thanks!

Forrest

Re: ee apps in trunk

Posted by David Jencks <da...@yahoo.com>.
Hi Forrest,

How did you try to install the welcome-jetty.car plugin?

After working for a few days and committing I remembered my welcome  
servers... :-)

I just tried building plugins/welcome and then running welcome-jetty- 
server.  It started up with a ClassCastException from jasper but seems  
to be actually started.

While http://localhost:8080/ gives me a 404 error http://localhost:8080/index.jsp 
  appears to give me the welcome page.  Maybe welcome-file processing  
isn't working right in jetty 8 at the moment.

I haven't tried the welcome-tomcat-server yet.

thanks
david jencks

On Nov 24, 2009, at 11:03 PM, Forrest Xia wrote:

> Hi David,
>
> After synced your latest changes, I made a geronimo-jetty8-minimal  
> assembly, and tried to install welcome-jetty car to the server, but  
> seems it does not work. No welcome page shows up at url http://localhost:8080/ 
> .
>
> Upon welcome-jetty car bundle installation, no error; Upon starting  
> the bundle, no error. However, just can not see the expected page at  
> the url above.
>
> After restarting the server, I noticed several bundle activation  
> exceptions like this:
>
> karaf@root> ERROR: Error starting mvn:org.apache.geronimo.configs/ 
> jetty8-deployer/3.0-SNAPSHOT/car  
> (org.osgi.framework.BundleException: Activator start error in bundle  
> org.apache.geronimo.configs.jetty8-deployer [123].)
> java.lang.NullPointerException: Specified service reference cannot  
> be null.
>     at  
> org 
> .apache 
> .felix.framework.BundleContextImpl.getService(BundleContextImpl.java: 
> 320)
>     at  
> org 
> .apache 
> .geronimo 
> .kernel 
> .osgi.ConfigurationActivator.start(ConfigurationActivator.java:50)
>     at  
> org 
> .apache 
> .felix.framework.util.SecureAction.startActivator(SecureAction.java: 
> 640)
>     at org.apache.felix.framework.Felix.activateBundle(Felix.java: 
> 1700)
>     at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
>     at  
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>     at  
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>     at java.lang.Thread.run(Thread.java:619)
> ERROR: Error starting file:/home/forrestxm/localbuild/rsaws/g30/ 
> plugins/welcome/welcome-jetty/target/welcome-jetty-3.0-SNAPSHOT.car  
> (org.osgi.framework.BundleException: Activator start error in bundle  
> org.apache.geronimo.configs.welcome-jetty [143].)
> java.lang.NullPointerException: Specified service reference cannot  
> be null.
>     at  
> org 
> .apache 
> .felix.framework.BundleContextImpl.getService(BundleContextImpl.java: 
> 320)
>     at  
> org 
> .apache 
> .geronimo 
> .kernel 
> .osgi.ConfigurationActivator.start(ConfigurationActivator.java:50)
>     at  
> org 
> .apache 
> .felix.framework.util.SecureAction.startActivator(SecureAction.java: 
> 640)
>     at org.apache.felix.framework.Felix.activateBundle(Felix.java: 
> 1700)
>     at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
>     at  
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
>     at  
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>     at java.lang.Thread.run(Thread.java:619)
>
>
> Anyway, the jetty server does boot and serve on port 8080. It's good  
> to see that :) thanks!
>
> Forrest
>
>


Re: ee apps in trunk

Posted by Forrest Xia <fo...@gmail.com>.
Hi David,

After synced your latest changes, I made a geronimo-jetty8-minimal assembly,
and tried to install welcome-jetty car to the server, but seems it does not
work. No welcome page shows up at url http://localhost:8080/.

Upon welcome-jetty car bundle installation, no error; Upon starting the
bundle, no error. However, just can not see the expected page at the url
above.

After restarting the server, I noticed several bundle activation exceptions
like this:

karaf@root> ERROR: Error starting
mvn:org.apache.geronimo.configs/jetty8-deployer/3.0-SNAPSHOT/car
(org.osgi.framework.BundleException: Activator start error in bundle
org.apache.geronimo.configs.jetty8-deployer [123].)
java.lang.NullPointerException: Specified service reference cannot be null.
    at
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:320)
    at
org.apache.geronimo.kernel.osgi.ConfigurationActivator.start(ConfigurationActivator.java:50)
    at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
    at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
    at java.lang.Thread.run(Thread.java:619)
ERROR: Error starting
file:/home/forrestxm/localbuild/rsaws/g30/plugins/welcome/welcome-jetty/target/welcome-jetty-3.0-SNAPSHOT.car
(org.osgi.framework.BundleException: Activator start error in bundle
org.apache.geronimo.configs.welcome-jetty [143].)
java.lang.NullPointerException: Specified service reference cannot be null.
    at
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:320)
    at
org.apache.geronimo.kernel.osgi.ConfigurationActivator.start(ConfigurationActivator.java:50)
    at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
    at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
    at java.lang.Thread.run(Thread.java:619)


Anyway, the jetty server does boot and serve on port 8080. It's good to see
that :) thanks!

Forrest

Re: ee apps in trunk

Posted by Jarek Gawor <jg...@gmail.com>.
David,

I just ran into this problem with system-database plugin and a rar
module. During deployment a right Bundle-Classpath entry was added for
the rar module to the car manifest entry. However, after deployment,
car-maven-plugin in archive-car goal overwrote the manifest entry with
its own data which did not include the Bundle-Classpath entry. I
committed a tiny fix for this problem but obviously we need to improve
how the car deployment is done or update the car-maven-plugin.

The good news is that with that tiny fix I was able to deploy the
system-database plugin and see that the derby database was created ok.
However, I'm not sure what happens if some other module tries to use
the system-database plugin.

Jarek

On Mon, Nov 23, 2009 at 3:03 AM, David Jencks <da...@yahoo.com> wrote:
>
> On Nov 22, 2009, at 6:01 PM, Ivan wrote:
>
> For a EJB/WAR, I could see what Bundle-ClassPath contains. But for an EAR
> package, what does it contain, all the jar files in the libraries, ejb jars
> and web related classes ? I am just thinking what the classloader structure
> of an EE application, especially for an EAR application. In the classic
> environment, for an EAR contains libraries and webapplications, we usually
> create a parent classloader for the EAR, and create a classloader for WAR
> package.  Then, in the OSGI environment, how should it be ?
> If only a bundle classloader is created and the bundle-classpath contains
> all the embedded jar files/classes, will it break the EE rules ? How about
> dividing the ear package into more than one bundle ?
> Thanks !
>
>
> There are two issues I know of:
> 1. osgi allows only one level of nesting of jars, whereas ee allows 2 (jars
> inside rars and wars).  This isn't really a problem for us since we
> repackage the ear anyway so we can (continue to) unpack as many nesting
> levels as we want (as we do now).
> 2. Currently wars are set up as semi-independent configurations.  I guess we
> will want to have them as additional bundles.  I haven't figured out a good
> plan for this yet.  We've thought about deploying ejb modules and rar
> modules as separate configurations also, perhaps this will turn out to be an
> easy thing to do.
> Right now I'm concentrating on getting a single war or rar to deploy....
> then we can think more about ears.
> BTW at the moment I'm putting the osgi info into the Environment object and
> generating the manifest from that.
> thanks
> david jencks
>
>
>
> 2009/11/21 David Jencks <da...@yahoo.com>
>>
>> I've played with the welcome app servers a bit and found that the next
>> significant problem is that we aren't setting the Bundle-ClassPath manifest
>> header in our car bundles.  This shouldn't be an obstacle for ejb jars, but
>> is for anything else.
>> My plan is to solve this as part of GERONIMO-4911 by storing all the
>> manifest info in the ConfigurationData.  Perhaps this can replace some of
>> the info in the environment field, although that is also used to figure out
>> which plugins need to be started before the current one.
>> comments welcome...
>> thanks
>> david jencks
>
>
>
> --
> Ivan
>
>

Re: ee apps in trunk

Posted by David Jencks <da...@yahoo.com>.
On Nov 22, 2009, at 6:01 PM, Ivan wrote:

> For a EJB/WAR, I could see what Bundle-ClassPath contains. But for  
> an EAR package, what does it contain, all the jar files in the  
> libraries, ejb jars and web related classes ? I am just thinking  
> what the classloader structure of an EE application, especially for  
> an EAR application. In the classic environment, for an EAR contains  
> libraries and webapplications, we usually create a parent  
> classloader for the EAR, and create a classloader for WAR package.   
> Then, in the OSGI environment, how should it be ?
> If only a bundle classloader is created and the bundle-classpath  
> contains all the embedded jar files/classes, will it break the EE  
> rules ? How about dividing the ear package into more than one bundle ?
> Thanks !


There are two issues I know of:

1. osgi allows only one level of nesting of jars, whereas ee allows 2  
(jars inside rars and wars).  This isn't really a problem for us since  
we repackage the ear anyway so we can (continue to) unpack as many  
nesting levels as we want (as we do now).

2. Currently wars are set up as semi-independent configurations.  I  
guess we will want to have them as additional bundles.  I haven't  
figured out a good plan for this yet.  We've thought about deploying  
ejb modules and rar modules as separate configurations also, perhaps  
this will turn out to be an easy thing to do.

Right now I'm concentrating on getting a single war or rar to  
deploy.... then we can think more about ears.

BTW at the moment I'm putting the osgi info into the Environment  
object and generating the manifest from that.

thanks
david jencks
>
>
> 2009/11/21 David Jencks <da...@yahoo.com>
> I've played with the welcome app servers a bit and found that the  
> next significant problem is that we aren't setting the Bundle- 
> ClassPath manifest header in our car bundles.  This shouldn't be an  
> obstacle for ejb jars, but is for anything else.
>
> My plan is to solve this as part of GERONIMO-4911 by storing all the  
> manifest info in the ConfigurationData.  Perhaps this can replace  
> some of the info in the environment field, although that is also  
> used to figure out which plugins need to be started before the  
> current one.
>
> comments welcome...
>
> thanks
> david jencks
>
>
>
>
> -- 
> Ivan


Re: ee apps in trunk

Posted by Ivan <xh...@gmail.com>.
For a EJB/WAR, I could see what Bundle-ClassPath contains. But for an EAR
package, what does it contain, all the jar files in the libraries, ejb jars
and web related classes ? I am just thinking what the classloader structure
of an EE application, especially for an EAR application. In the classic
environment, for an EAR contains libraries and webapplications, we usually
create a parent classloader for the EAR, and create a classloader for WAR
package.  Then, in the OSGI environment, how should it be ?
If only a bundle classloader is created and the bundle-classpath contains
all the embedded jar files/classes, will it break the EE rules ? How about
dividing the ear package into more than one bundle ?
Thanks !


2009/11/21 David Jencks <da...@yahoo.com>

> I've played with the welcome app servers a bit and found that the next
> significant problem is that we aren't setting the Bundle-ClassPath manifest
> header in our car bundles.  This shouldn't be an obstacle for ejb jars, but
> is for anything else.
>
> My plan is to solve this as part of GERONIMO-4911<https://issues.apache.org/jira/browse/GERONIMO-4911>
>  by storing all the manifest info in the ConfigurationData.  Perhaps this
> can replace some of the info in the environment field, although that is also
> used to figure out which plugins need to be started before the current one.
>
> comments welcome...
>
> thanks
> david jencks
>
>


-- 
Ivan