struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christina Kaskoura <christina.kasko...@eurodyn.com>
Subject Re: Using Struts2 OSGi plugin with GlassFish
Date Wed, 09 Jan 2013 07:15:50 GMT
Hi Lukasz,

Unfortunately the felix.jar contained in GlassFish does not include all 
the classes included in the felix-related jars declared as dependencies 
of the OSGi plugin. So if I exclude the felix main jar as you suggest I 
get the following error during deployment:

java.lang.Exception: java.lang.IllegalStateException: 
ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 
java.lang.NoClassDefFoundError: org/apache/felix/main/Main

I have also tried excluding the felix main jar and then manually 
including some or all of its dependencies in the hope of finding a 
combination that works but I haven't had any luck with that either.

Christina


On 09/01/2013 08:37, Lukasz Lenart wrote:
> 2013/1/8 Christina Kaskoura <christina.kaskoura@eurodyn.com>:
>> I am trying to use the Struts2 OSGi plugin and have tried creating a web
>> application containing the struts2-osgi-demo-bundle. All goes well when
>> deploying the application on Tomcat, however when I try deploying on
>> GlassFish (which has Felix included) I get a number of errors which I
>> understand are due to the fact that the plugin starts a new Felix instance
>> while another one is already running on GlassFish and that certain Felix
>> classes are present more than one times in the classpath (one from the Felix
>> jars included in the application as dependencies of the plugin and one from
>> the felix.jar already included in GlassFish). More details on the actual
>> errors are available in this stackoverflow post -
>> http://stackoverflow.com/questions/14200300/using-struts2-osgi-plugin-with-glassfish.
>>
>> My question is: is there any specific configuration I should make in order
>> to use the OSGi plugin in GlassFish (or any other container including Felix
>> for that matter)?
> As I understand, GlassFish already contains Felix container, if so
> simple exclude Felix dependency from the Struts2 OSGi plugin, when
> used with Maven it can be solved by:
>
> <dependency>
>      <groupId>org.apache.struts</groupId>
>      <artifactId>struts2-osgi-plugin</artifactId>
>      <version>2.3.1</version>
>      <exclusions>
>           <exclusion>
>              <groupId>org.apache.felix</groupId>
>              <artifactId>org.apache.felix.main</artifactId>
>           <exclusion>
>      </exclusions>
> </dependency>
>
>
> Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message