You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Mario Prettner <pr...@gmx.at> on 2008/01/24 12:41:17 UTC

Axis2 OSGi Deployment - Problem using SOAPProvider

Hello everyone,

I have serious problems deploying axis2 in an osgi environment.

My intention was to write some osgi services which should also be made 
available via webservices using the SOAPProvider Interface
(and further the 
org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl 
service*) provided by the muse (corona) package.

I've nearly tried every deployment scenario I could believe.

The first deployment-scenario was based on the muse 2.2.0 release. I 
created a new eclipse project (using eclipse 3.3.1.1) then
added all the osgi-plugins from the release to the "Plug-in 
Development"->"Target Platform".
I also added
   - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
   - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
   - org.mortbay.jetty (5.1.11.v200706111724)
   - and it's dependencies

Then I created a new "OSGi Framework" runtime configuration, activating 
all the plugins.

Starting the OSGi Framework gives me following output

--snip--
osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle 
org.eclipse.corona.axis2.util
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom
...
--snip--
{org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, Name=Axis, 
MinorVersion=0, service.id=26}
 Registered by bundle: 
initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initial/plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/ 
[12]
...
--snip--

Then starting my simple plugin, which retrieves the SOAPProvider 
service, and deploys my simple service:

--snip--
               SOAPProvider sp = (SOAPProvider) srv;
               try {
                   sp.deployService("srv1", HelloService.class, 
helloServiceTracker.getService(), null);
               } catch (Exception e) {
                   e.printStackTrace();
               }
}
--snips--

ends up with the following exception:

--snip--
java.lang.NoClassDefFoundError: org/apache/ws/java2wsdl/SchemaGenerator
   at 
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
   at 
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRPCService(AdminServiceImpl.java:148) 

   at 
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployService(AdminServiceImpl.java:159) 

   at ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
   at 
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1064) 

   at 
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:926) 

   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
   at ws1.Activator.start(Activator.java:37)
   at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) 

   at java.security.AccessController.doPrivileged(Native Method)
   at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) 

   at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) 

   at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) 

   at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350) 

   at 
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118) 

   at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634) 

   at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) 

   at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282) 

   at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468) 

   at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) 

   at 
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297) 

Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.java2wsdl.SchemaGenerator
   at java.lang.ClassLoader.findClass(ClassLoader.java:358)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429) 

   at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) 

   at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) 

   at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) 

   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   ... 22 more
--snip--


I tried to get newer bundles from muse, corona, ... cvs/svn trunk 
repositories, deploying those plugins, ..
(newer bundles require declarative services, ...)
tried to bundle axis2 on my own ... (... also packing all the required 
jars into it's bundle directly ...)
... solving the Exception above, but getting another in the next source 
lines ...
... never working ;(

So hopefully someone could give me an advice, which bundle releases 
already do work,
what to do getting SOAPProvider service working properly (letting me 
deploy service objects as axis2 webservices which are accessible via eg. 
SOAP 1.1 protocol).

As I searched for similar problems using axis2 (soapprovider) in an osgi 
environment, I could not find any answers to my problems. Isn't there 
anybody using the releases in such a deployment scenario?

Or what am I doing bad? I want to give it another try.

Regards,
Mario


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


RE: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by Ch...@swisscom.com.
Hiya,

Yep, 

 org.apache.neethi;bundle-version="2.0.0";visibility:=reexport,
 org.apache.ws.commons.schema,

The spec (3.13.1) says "Only packages that are marked exported by the
required bundles
are visible to the requiring bundle." so you still need to add that
package to the imports list.

cheers,
Chris

PS (I'm no language lawyer but I've had that spec pdf open now for a
week :-)

-----Original Message-----
From: Mario Prettner [mailto:prettner@gmx.at] 
Sent: Thursday, January 24, 2008 1:35 PM
To: muse-user@ws.apache.org
Subject: Re: Axis2 OSGi Deployment - Problem using SOAPProvider

Hi again,

Mario Prettner schrieb:
> Hi Chris,
>
> Chris.Twiner@swisscom.com schrieb:
>> Hi Mario,
>>
>> Forgive me if I'm off track here but do you have the bundle:
>>
>>  org.apache.ws.java2wsdl
>>   
> yes it is installed (from muse 2.2.0 release)
>
> 4    ACTIVE      org.apache.ws.java2wsdl_1.1.0
>> and does your bundle (were you are trying to run this code) have an 
>> entry like this?
>>
>> Import-Package: org.apache.ws.java2wsdl,
>>
>>   
> I use the org.apache.axis2 (1.1.0) plugin (where the exception 
> appears), but looking into it's MANIFEST.MF there's only
> - org.apache.ws.java2wsdl.utils
> package imported.
>
i added the following line to the bundle-manifest of axis2 plugin:
- org.apache.ws.java2wsdl,
before the already existing entry:
- org.apache.ws.java2wsdl.utils

now getting the following error:

--snip--
java.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/XmlSchemaObject
    at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
    at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRP
CService(AdminServiceImpl.java:148)
    at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploySe
rvice(AdminServiceImpl.java:159)
    at ws1.Activator$SoapServiceTracker.addingService(Activator.java:67)
    at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
java:1064)
    at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Servic
eTracker.java:926)
    at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
    at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
    at ws1.Activator.start(Activator.java:38)
    at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
ontextImpl.java:999)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:993)
    at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:974)
    at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:346)
    at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:350)
    at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1118)
    at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:634)
    at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:508)
    at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:282)
    at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:468)
    at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:195)
    at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:297)
Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.commons.schema.XmlSchemaObject
    at java.lang.ClassLoader.findClass(ClassLoader.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
BundleLoader.java:429)
    at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:369)
    at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:357)
    at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
ltClassLoader.java:83)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 22 more

--snip--

when calling the soapprovider.deployService(..) method.
Having the bundle:
- 23    ACTIVE      org.apache.ws.commons.schema_1.2.0
installed as required by the manifest:

Require-Bundle: org.apache.xerces,
 org.apache.axiom.api;bundle-version="1.2.0";visibility:=reexport,
 org.apache.neethi;bundle-version="2.0.0";visibility:=reexport,
 org.apache.ws.commons.schema,


Any idea?

Regards,
Mario

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


Re: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by Mario Prettner <pr...@gmx.at>.
Hi again,

Mario Prettner schrieb:
> Hi Chris,
>
> Chris.Twiner@swisscom.com schrieb:
>> Hi Mario,
>>
>> Forgive me if I'm off track here but do you have the bundle:
>>
>>  org.apache.ws.java2wsdl
>>   
> yes it is installed (from muse 2.2.0 release)
>
> 4    ACTIVE      org.apache.ws.java2wsdl_1.1.0
>> and does your bundle (were you are trying to run this code) have an
>> entry like this?
>>
>> Import-Package: org.apache.ws.java2wsdl,
>>
>>   
> I use the org.apache.axis2 (1.1.0) plugin (where the exception appears),
> but looking into it's MANIFEST.MF there's only
> - org.apache.ws.java2wsdl.utils
> package imported.
>
i added the following line to the bundle-manifest of axis2 plugin:
- org.apache.ws.java2wsdl,
before the already existing entry:
- org.apache.ws.java2wsdl.utils

now getting the following error:

--snip--
java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchemaObject
    at 
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
    at 
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRPCService(AdminServiceImpl.java:148)
    at 
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployService(AdminServiceImpl.java:159)
    at ws1.Activator$SoapServiceTracker.addingService(Activator.java:67)
    at 
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1064)
    at 
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:926)
    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
    at ws1.Activator.start(Activator.java:38)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
    at java.security.AccessController.doPrivileged(Native Method)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
    at 
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
    at 
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
    at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
    at 
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
    at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
    at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
    at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
    at 
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
    at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
    at 
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.commons.schema.XmlSchemaObject
    at java.lang.ClassLoader.findClass(ClassLoader.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
    at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
    at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
    at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 22 more

--snip--

when calling the soapprovider.deployService(..) method.
Having the bundle:
- 23    ACTIVE      org.apache.ws.commons.schema_1.2.0
installed as required by the manifest:

Require-Bundle: org.apache.xerces,
 org.apache.axiom.api;bundle-version="1.2.0";visibility:=reexport,
 org.apache.neethi;bundle-version="2.0.0";visibility:=reexport,
 org.apache.ws.commons.schema,


Any idea?

Regards,
Mario

> Might it be a problem within the released bundle?
>
> That was it why I also tried to bundle all the axis2 stuff into a 
> plugin of my own - took me a while ... without success.
> Cause using the most recent version of axis2 (2.1.3) and API changes 
> within the deployer API the SOAPProvider implementation seems to be no 
> more compatible with it :(
>
> Thought it would be easier using the released bundles. Perhaps there 
> is a newer release of axis2 osgi port I haven't seen right now?
>
>> In OSGi you must import all the packages you use (just had a rough week
>> of learning this OSGi stuff myself :-)
>>   
> I see, but having all those required bundles installed (from 
> distributed release) I thought I could use the offered osgi services 
> (SOAPProvider or 
> org.eclipse.corona.soa.webservice.IWebServiceDeployer) without 
> modification,
> or is one of the bundle-manifests buggy
> or do I still miss something?
>
> Hm, perhaps you have another hint for me what I could do getting the 
> released bundles into work?
>
> Thanks a lot,
> Mario
>> cheers,
>> Chris
>>
>> -----Original Message-----
>> From: Mario Prettner [mailto:prettner@gmx.at] Sent: Thursday, January 
>> 24, 2008 12:41 PM
>> To: muse-user@ws.apache.org
>> Cc: Mario Prettner
>> Subject: Axis2 OSGi Deployment - Problem using SOAPProvider
>>
>> Hello everyone,
>>
>> I have serious problems deploying axis2 in an osgi environment.
>>
>> My intention was to write some osgi services which should also be made
>> available via webservices using the SOAPProvider Interface (and further
>> the org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl
>> service*) provided by the muse (corona) package.
>>
>> I've nearly tried every deployment scenario I could believe.
>>
>> The first deployment-scenario was based on the muse 2.2.0 release. I
>> created a new eclipse project (using eclipse 3.3.1.1) then added all the
>> osgi-plugins from the release to the "Plug-in Development"->"Target
>> Platform".
>> I also added
>>    - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
>>    - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
>>    - org.mortbay.jetty (5.1.11.v200706111724)
>>    - and it's dependencies
>>
>> Then I created a new "OSGi Framework" runtime configuration, activating
>> all the plugins.
>>
>> Starting the OSGi Framework gives me following output
>>
>> --snip--
>> osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle
>> org.eclipse.corona.axis2.util
>> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl
>> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom
>> ...
>> --snip--
>> {org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, Name=Axis,
>> MinorVersion=0, service.id=26}  Registered by bundle: 
>> initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initial/
>> plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/
>> [12]
>> ...
>> --snip--
>>
>> Then starting my simple plugin, which retrieves the SOAPProvider
>> service, and deploys my simple service:
>>
>> --snip--
>>                SOAPProvider sp = (SOAPProvider) srv;
>>                try {
>>                    sp.deployService("srv1", HelloService.class,
>> helloServiceTracker.getService(), null);
>>                } catch (Exception e) {
>>                    e.printStackTrace();
>>                }
>> }
>> --snips--
>>
>> ends up with the following exception:
>>
>> --snip--
>> java.lang.NoClassDefFoundError: org/apache/ws/java2wsdl/SchemaGenerator
>>    at
>> org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
>>    at
>> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRP
>> CService(AdminServiceImpl.java:148)
>>    at
>> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploySe
>> rvice(AdminServiceImpl.java:159)
>>    at ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
>>    at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
>> java:1064)
>>    at
>> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Servic
>> eTracker.java:926)
>>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
>>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
>>    at ws1.Activator.start(Activator.java:37)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
>> ontextImpl.java:999)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
>> r(BundleContextImpl.java:993)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
>> ontextImpl.java:974)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
>> st.java:346)
>>    at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
>> undle.java:350)
>>    at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
>> k.java:1118)
>>    at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
>> (StartLevelManager.java:634)
>>    at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
>> LevelManager.java:508)
>>    at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
>> el(StartLevelManager.java:282)
>>    at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
>> (StartLevelManager.java:468)
>>    at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
>> ger.java:195)
>>    at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
>> nager.java:297)
>> Caused by: java.lang.ClassNotFoundException: 
>> org.apache.ws.java2wsdl.SchemaGenerator
>>    at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
>> BundleLoader.java:429)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
>> ader.java:369)
>>    at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
>> ader.java:357)
>>    at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
>> ltClassLoader.java:83)
>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>    ... 22 more
>> --snip--
>>
>>
>> I tried to get newer bundles from muse, corona, ... cvs/svn trunk
>> repositories, deploying those plugins, ..
>> (newer bundles require declarative services, ...) tried to bundle axis2
>> on my own ... (... also packing all the required jars into it's bundle
>> directly ...) ... solving the Exception above, but getting another in
>> the next source lines ...
>> ... never working ;(
>>
>> So hopefully someone could give me an advice, which bundle releases
>> already do work, what to do getting SOAPProvider service working
>> properly (letting me deploy service objects as axis2 webservices which
>> are accessible via eg. SOAP 1.1 protocol).
>>
>> As I searched for similar problems using axis2 (soapprovider) in an osgi
>> environment, I could not find any answers to my problems. Isn't there
>> anybody using the releases in such a deployment scenario?
>>
>> Or what am I doing bad? I want to give it another try.
>>
>> Regards,
>> Mario
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>>
>>
>>   
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>



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


RE: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by Ch...@swisscom.com.
Hi Mario, 

its about at my limit in knowledge I'm afraid; but yes I think that
import should be in the axis bundle (as its loaded from there, didn't
check that before fully - sorry).

If you are using eclipse you can just import that bundle and add it to
the manifest.  I think it should at least get rid of that problem, I'm
sure there will be others.

I've had alot of those in the past week (not muse related),
commons-logging in osgi problems (from a custom embedded Axis 1.4) and
many other issues.  OSGi seems perfect but it makes you fight for it :<
I've found that, at least for the class not found errors, eclipses PDE
works really well for "easy" deployment and fixes.

cheers,
Chris

-----Original Message-----
From: Mario Prettner [mailto:prettner@gmx.at] 
Sent: Thursday, January 24, 2008 1:23 PM
To: muse-user@ws.apache.org
Subject: Re: Axis2 OSGi Deployment - Problem using SOAPProvider

Hi Chris,

Chris.Twiner@swisscom.com schrieb:
> Hi Mario,
>
> Forgive me if I'm off track here but do you have the bundle:
>
>  org.apache.ws.java2wsdl
>   
yes it is installed (from muse 2.2.0 release)

4    ACTIVE      org.apache.ws.java2wsdl_1.1.0
> and does your bundle (were you are trying to run this code) have an 
> entry like this?
>
> Import-Package: org.apache.ws.java2wsdl,
>
>   
I use the org.apache.axis2 (1.1.0) plugin (where the exception appears),
but looking into it's MANIFEST.MF there's only
- org.apache.ws.java2wsdl.utils
package imported.

Might it be a problem within the released bundle?

That was it why I also tried to bundle all the axis2 stuff into a plugin
of my own - took me a while ... without success.
Cause using the most recent version of axis2 (2.1.3) and API changes
within the deployer API the SOAPProvider implementation seems to be no
more compatible with it :(

Thought it would be easier using the released bundles. Perhaps there is
a newer release of axis2 osgi port I haven't seen right now?

> In OSGi you must import all the packages you use (just had a rough 
> week of learning this OSGi stuff myself :-)
>   
I see, but having all those required bundles installed (from distributed
release) I thought I could use the offered osgi services (SOAPProvider
or org.eclipse.corona.soa.webservice.IWebServiceDeployer) without
modification, or is one of the bundle-manifests buggy or do I still miss
something?

Hm, perhaps you have another hint for me what I could do getting the
released bundles into work?

Thanks a lot,
Mario
> cheers,
> Chris
>
> -----Original Message-----
> From: Mario Prettner [mailto:prettner@gmx.at]
> Sent: Thursday, January 24, 2008 12:41 PM
> To: muse-user@ws.apache.org
> Cc: Mario Prettner
> Subject: Axis2 OSGi Deployment - Problem using SOAPProvider
>
> Hello everyone,
>
> I have serious problems deploying axis2 in an osgi environment.
>
> My intention was to write some osgi services which should also be made

> available via webservices using the SOAPProvider Interface (and 
> further the 
> org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl
> service*) provided by the muse (corona) package.
>
> I've nearly tried every deployment scenario I could believe.
>
> The first deployment-scenario was based on the muse 2.2.0 release. I 
> created a new eclipse project (using eclipse 3.3.1.1) then added all 
> the osgi-plugins from the release to the "Plug-in 
> Development"->"Target Platform".
> I also added
>    - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
>    - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
>    - org.mortbay.jetty (5.1.11.v200706111724)
>    - and it's dependencies
>
> Then I created a new "OSGi Framework" runtime configuration, 
> activating all the plugins.
>
> Starting the OSGi Framework gives me following output
>
> --snip--
> osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle
> org.eclipse.corona.axis2.util
> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl

> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom 
> ...
> --snip--
> {org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, 
> Name=Axis, MinorVersion=0, service.id=26}  Registered by bundle:
> initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initia
> l/ plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/
> [12]
> ...
> --snip--
>
> Then starting my simple plugin, which retrieves the SOAPProvider 
> service, and deploys my simple service:
>
> --snip--
>                SOAPProvider sp = (SOAPProvider) srv;
>                try {
>                    sp.deployService("srv1", HelloService.class, 
> helloServiceTracker.getService(), null);
>                } catch (Exception e) {
>                    e.printStackTrace();
>                }
> }
> --snips--
>
> ends up with the following exception:
>
> --snip--
> java.lang.NoClassDefFoundError:
org/apache/ws/java2wsdl/SchemaGenerator
>    at
> org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
>    at
> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploy
> RP
> CService(AdminServiceImpl.java:148)
>
>    at
> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploy
> Se
> rvice(AdminServiceImpl.java:159)
>
>    at
ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
>    at
>
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
> java:1064)
>
>    at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Serv
> ic
> eTracker.java:926)
>
>    at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
>    at
org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
>    at ws1.Activator.start(Activator.java:37)
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bundl
> eC
> ontextImpl.java:999)
>
>    at java.security.AccessController.doPrivileged(Native Method)
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiva
> to
> r(BundleContextImpl.java:993)
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bundl
> eC
> ontextImpl.java:974)
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundle
> Ho
> st.java:346)
>
>    at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(Abstrac
> tB
> undle.java:350)
>
>    at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framew
> or
> k.java:1118)
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundl
> es
> (StartLevelManager.java:634)
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Sta
> rt
> LevelManager.java:508)
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartL
> ev
> el(StartLevelManager.java:282)
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEve
> nt
> (StartLevelManager.java:468)
>
>    at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMa
> na
> ger.java:195)
>
>    at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(Event
> Ma
> nager.java:297)
>
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.ws.java2wsdl.SchemaGenerator
>    at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInterna
> l(
> BundleLoader.java:429)
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Bundle
> Lo
> ader.java:369)
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Bundle
> Lo
> ader.java:357)
>
>    at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Def
> au
> ltClassLoader.java:83)
>
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>    ... 22 more
> --snip--
>
>
> I tried to get newer bundles from muse, corona, ... cvs/svn trunk 
> repositories, deploying those plugins, ..
> (newer bundles require declarative services, ...) tried to bundle 
> axis2 on my own ... (... also packing all the required jars into it's 
> bundle directly ...) ... solving the Exception above, but getting 
> another in the next source lines ...
> ... never working ;(
>
> So hopefully someone could give me an advice, which bundle releases 
> already do work, what to do getting SOAPProvider service working 
> properly (letting me deploy service objects as axis2 webservices which

> are accessible via eg.
> SOAP 1.1 protocol).
>
> As I searched for similar problems using axis2 (soapprovider) in an 
> osgi environment, I could not find any answers to my problems. Isn't 
> there anybody using the releases in such a deployment scenario?
>
> Or what am I doing bad? I want to give it another try.
>
> Regards,
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>
>   



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


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


Re: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by Mario Prettner <pr...@gmx.at>.
Hi Chris,

Chris.Twiner@swisscom.com schrieb:
> Hi Mario,
>
> Forgive me if I'm off track here but do you have the bundle:
>
>  org.apache.ws.java2wsdl
>   
yes it is installed (from muse 2.2.0 release)

4    ACTIVE      org.apache.ws.java2wsdl_1.1.0
> and does your bundle (were you are trying to run this code) have an
> entry like this?
>
> Import-Package: org.apache.ws.java2wsdl,
>
>   
I use the org.apache.axis2 (1.1.0) plugin (where the exception appears),
but looking into it's MANIFEST.MF there's only
- org.apache.ws.java2wsdl.utils
package imported.

Might it be a problem within the released bundle?

That was it why I also tried to bundle all the axis2 stuff into a plugin 
of my own - took me a while ... without success.
Cause using the most recent version of axis2 (2.1.3) and API changes 
within the deployer API the SOAPProvider implementation seems to be no 
more compatible with it :(

Thought it would be easier using the released bundles. Perhaps there is 
a newer release of axis2 osgi port I haven't seen right now?

> In OSGi you must import all the packages you use (just had a rough week
> of learning this OSGi stuff myself :-)
>   
I see, but having all those required bundles installed (from distributed 
release) I thought I could use the offered osgi services (SOAPProvider 
or org.eclipse.corona.soa.webservice.IWebServiceDeployer) without 
modification,
or is one of the bundle-manifests buggy
or do I still miss something?

Hm, perhaps you have another hint for me what I could do getting the 
released bundles into work?

Thanks a lot,
Mario
> cheers,
> Chris
>
> -----Original Message-----
> From: Mario Prettner [mailto:prettner@gmx.at] 
> Sent: Thursday, January 24, 2008 12:41 PM
> To: muse-user@ws.apache.org
> Cc: Mario Prettner
> Subject: Axis2 OSGi Deployment - Problem using SOAPProvider
>
> Hello everyone,
>
> I have serious problems deploying axis2 in an osgi environment.
>
> My intention was to write some osgi services which should also be made
> available via webservices using the SOAPProvider Interface (and further
> the org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl
> service*) provided by the muse (corona) package.
>
> I've nearly tried every deployment scenario I could believe.
>
> The first deployment-scenario was based on the muse 2.2.0 release. I
> created a new eclipse project (using eclipse 3.3.1.1) then added all the
> osgi-plugins from the release to the "Plug-in Development"->"Target
> Platform".
> I also added
>    - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
>    - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
>    - org.mortbay.jetty (5.1.11.v200706111724)
>    - and it's dependencies
>
> Then I created a new "OSGi Framework" runtime configuration, activating
> all the plugins.
>
> Starting the OSGi Framework gives me following output
>
> --snip--
> osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle
> org.eclipse.corona.axis2.util
> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl
> Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom
> ...
> --snip--
> {org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, Name=Axis,
> MinorVersion=0, service.id=26}  Registered by bundle: 
> initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initial/
> plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/
> [12]
> ...
> --snip--
>
> Then starting my simple plugin, which retrieves the SOAPProvider
> service, and deploys my simple service:
>
> --snip--
>                SOAPProvider sp = (SOAPProvider) srv;
>                try {
>                    sp.deployService("srv1", HelloService.class,
> helloServiceTracker.getService(), null);
>                } catch (Exception e) {
>                    e.printStackTrace();
>                }
> }
> --snips--
>
> ends up with the following exception:
>
> --snip--
> java.lang.NoClassDefFoundError: org/apache/ws/java2wsdl/SchemaGenerator
>    at
> org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
>    at
> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRP
> CService(AdminServiceImpl.java:148) 
>
>    at
> org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploySe
> rvice(AdminServiceImpl.java:159) 
>
>    at ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
>    at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
> java:1064) 
>
>    at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Servic
> eTracker.java:926) 
>
>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
>    at ws1.Activator.start(Activator.java:37)
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
> ontextImpl.java:999) 
>
>    at java.security.AccessController.doPrivileged(Native Method)
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
> r(BundleContextImpl.java:993) 
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
> ontextImpl.java:974) 
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
> st.java:346) 
>
>    at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
> undle.java:350) 
>
>    at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
> k.java:1118) 
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
> (StartLevelManager.java:634) 
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
> LevelManager.java:508) 
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
> el(StartLevelManager.java:282) 
>
>    at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
> (StartLevelManager.java:468) 
>
>    at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
> ger.java:195) 
>
>    at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
> nager.java:297) 
>
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.ws.java2wsdl.SchemaGenerator
>    at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
> BundleLoader.java:429) 
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
> ader.java:369) 
>
>    at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
> ader.java:357) 
>
>    at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
> ltClassLoader.java:83) 
>
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>    ... 22 more
> --snip--
>
>
> I tried to get newer bundles from muse, corona, ... cvs/svn trunk
> repositories, deploying those plugins, ..
> (newer bundles require declarative services, ...) tried to bundle axis2
> on my own ... (... also packing all the required jars into it's bundle
> directly ...) ... solving the Exception above, but getting another in
> the next source lines ...
> ... never working ;(
>
> So hopefully someone could give me an advice, which bundle releases
> already do work, what to do getting SOAPProvider service working
> properly (letting me deploy service objects as axis2 webservices which
> are accessible via eg. 
> SOAP 1.1 protocol).
>
> As I searched for similar problems using axis2 (soapprovider) in an osgi
> environment, I could not find any answers to my problems. Isn't there
> anybody using the releases in such a deployment scenario?
>
> Or what am I doing bad? I want to give it another try.
>
> Regards,
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
>
>   



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


RE: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by Ch...@swisscom.com.
Hi Mario,

Forgive me if I'm off track here but do you have the bundle:

 org.apache.ws.java2wsdl

and does your bundle (were you are trying to run this code) have an
entry like this?

Import-Package: org.apache.ws.java2wsdl,

In OSGi you must import all the packages you use (just had a rough week
of learning this OSGi stuff myself :-)

cheers,
Chris

-----Original Message-----
From: Mario Prettner [mailto:prettner@gmx.at] 
Sent: Thursday, January 24, 2008 12:41 PM
To: muse-user@ws.apache.org
Cc: Mario Prettner
Subject: Axis2 OSGi Deployment - Problem using SOAPProvider

Hello everyone,

I have serious problems deploying axis2 in an osgi environment.

My intention was to write some osgi services which should also be made
available via webservices using the SOAPProvider Interface (and further
the org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl
service*) provided by the muse (corona) package.

I've nearly tried every deployment scenario I could believe.

The first deployment-scenario was based on the muse 2.2.0 release. I
created a new eclipse project (using eclipse 3.3.1.1) then added all the
osgi-plugins from the release to the "Plug-in Development"->"Target
Platform".
I also added
   - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
   - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
   - org.mortbay.jetty (5.1.11.v200706111724)
   - and it's dependencies

Then I created a new "OSGi Framework" runtime configuration, activating
all the plugins.

Starting the OSGi Framework gives me following output

--snip--
osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle
org.eclipse.corona.axis2.util
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom
...
--snip--
{org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, Name=Axis,
MinorVersion=0, service.id=26}  Registered by bundle: 
initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initial/
plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/
[12]
...
--snip--

Then starting my simple plugin, which retrieves the SOAPProvider
service, and deploys my simple service:

--snip--
               SOAPProvider sp = (SOAPProvider) srv;
               try {
                   sp.deployService("srv1", HelloService.class,
helloServiceTracker.getService(), null);
               } catch (Exception e) {
                   e.printStackTrace();
               }
}
--snips--

ends up with the following exception:

--snip--
java.lang.NoClassDefFoundError: org/apache/ws/java2wsdl/SchemaGenerator
   at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
   at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRP
CService(AdminServiceImpl.java:148) 

   at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploySe
rvice(AdminServiceImpl.java:159) 

   at ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
   at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
java:1064) 

   at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Servic
eTracker.java:926) 

   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
   at ws1.Activator.start(Activator.java:37)
   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
ontextImpl.java:999) 

   at java.security.AccessController.doPrivileged(Native Method)
   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:993) 

   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:974) 

   at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:346) 

   at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:350) 

   at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1118) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:634) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:508) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:282) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:468) 

   at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:195) 

   at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:297) 

Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.java2wsdl.SchemaGenerator
   at java.lang.ClassLoader.findClass(ClassLoader.java:358)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
BundleLoader.java:429) 

   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:369) 

   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:357) 

   at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
ltClassLoader.java:83) 

   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   ... 22 more
--snip--


I tried to get newer bundles from muse, corona, ... cvs/svn trunk
repositories, deploying those plugins, ..
(newer bundles require declarative services, ...) tried to bundle axis2
on my own ... (... also packing all the required jars into it's bundle
directly ...) ... solving the Exception above, but getting another in
the next source lines ...
... never working ;(

So hopefully someone could give me an advice, which bundle releases
already do work, what to do getting SOAPProvider service working
properly (letting me deploy service objects as axis2 webservices which
are accessible via eg. 
SOAP 1.1 protocol).

As I searched for similar problems using axis2 (soapprovider) in an osgi
environment, I could not find any answers to my problems. Isn't there
anybody using the releases in such a deployment scenario?

Or what am I doing bad? I want to give it another try.

Regards,
Mario


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


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


RE: Axis2 OSGi Deployment - Problem using SOAPProvider

Posted by La...@tietoenator.com.
Hi,

We ran into some problems with Axis2 that was resolved by using Buddy
classloading! But we are currently not using Muse (but OSGi / Equinox)
so I m not sure if our solution works for you.

We added the statement "Eclipse-BuddyPolicy: dependent" to the axis2
bundle manifest file
and Eclipse-RegisterBuddy: org.apache.axis2 in the services that
registeres web services.

Hope it helps

BR

Lars








-----Original Message-----
From: Mario Prettner [mailto:prettner@gmx.at] 
Sent: den 24 januari 2008 12:41
To: muse-user@ws.apache.org
Cc: Mario Prettner
Subject: Axis2 OSGi Deployment - Problem using SOAPProvider

Hello everyone,

I have serious problems deploying axis2 in an osgi environment.

My intention was to write some osgi services which should also be made
available via webservices using the SOAPProvider Interface (and further
the org.eclipse.corona.internal.soa.provider.*axis2*.*AdminServiceImpl
service*) provided by the muse (corona) package.

I've nearly tried every deployment scenario I could believe.

The first deployment-scenario was based on the muse 2.2.0 release. I
created a new eclipse project (using eclipse 3.3.1.1) then added all the
osgi-plugins from the release to the "Plug-in Development"->"Target
Platform".
I also added
   - org.eclipse.equinox.http.jetty (1.0.1.R33x_v20070816)
   - org.eclipse.equinox.http.servlet (1.0.1R33x_v20070816)
   - org.mortbay.jetty (5.1.11.v200706111724)
   - and it's dependencies

Then I created a new "OSGi Framework" runtime configuration, activating
all the plugins.

Starting the OSGi Framework gives me following output

--snip--
osgi> Host org.apache.axis2;bundle-version="1.1.0" Bundle
org.eclipse.corona.axis2.util
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.impl
Host org.apache.axiom.api;version="1.2.0" Bundle org.apache.axiom.dom
...
--snip--
{org.apache.muse.osgi.soa.core.SOAPProvider}={MajorVersion=2, Name=Axis,
MinorVersion=0, service.id=26}  Registered by bundle: 
initial@reference:file:../../../workspaces/da-extern/axis2-osgi-initial/
plugins/axis2-osgi/org.eclipse.corona.soa.provider.axis2/
[12]
...
--snip--

Then starting my simple plugin, which retrieves the SOAPProvider
service, and deploys my simple service:

--snip--
               SOAPProvider sp = (SOAPProvider) srv;
               try {
                   sp.deployService("srv1", HelloService.class,
helloServiceTracker.getService(), null);
               } catch (Exception e) {
                   e.printStackTrace();
               }
}
--snips--

ends up with the following exception:

--snip--
java.lang.NoClassDefFoundError: org/apache/ws/java2wsdl/SchemaGenerator
   at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272)
   at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deployRP
CService(AdminServiceImpl.java:148) 

   at
org.eclipse.corona.soa.provider.axis2.internal.AdminServiceImpl.deploySe
rvice(AdminServiceImpl.java:159) 

   at ws1.Activator$SoapServiceTracker.addingService(Activator.java:66)
   at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.
java:1064) 

   at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(Servic
eTracker.java:926) 

   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330)
   at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274)
   at ws1.Activator.start(Activator.java:37)
   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleC
ontextImpl.java:999) 

   at java.security.AccessController.doPrivileged(Native Method)
   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivato
r(BundleContextImpl.java:993) 

   at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleC
ontextImpl.java:974) 

   at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHo
st.java:346) 

   at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractB
undle.java:350) 

   at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framewor
k.java:1118) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles
(StartLevelManager.java:634) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(Start
LevelManager.java:508) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLev
el(StartLevelManager.java:282) 

   at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent
(StartLevelManager.java:468) 

   at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventMana
ger.java:195) 

   at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventMa
nager.java:297) 

Caused by: java.lang.ClassNotFoundException: 
org.apache.ws.java2wsdl.SchemaGenerator
   at java.lang.ClassLoader.findClass(ClassLoader.java:358)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
BundleLoader.java:429) 

   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:369) 

   at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLo
ader.java:357) 

   at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Defau
ltClassLoader.java:83) 

   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   ... 22 more
--snip--


I tried to get newer bundles from muse, corona, ... cvs/svn trunk
repositories, deploying those plugins, ..
(newer bundles require declarative services, ...) tried to bundle axis2
on my own ... (... also packing all the required jars into it's bundle
directly ...) ... solving the Exception above, but getting another in
the next source lines ...
... never working ;(

So hopefully someone could give me an advice, which bundle releases
already do work, what to do getting SOAPProvider service working
properly (letting me deploy service objects as axis2 webservices which
are accessible via eg. 
SOAP 1.1 protocol).

As I searched for similar problems using axis2 (soapprovider) in an osgi
environment, I could not find any answers to my problems. Isn't there
anybody using the releases in such a deployment scenario?

Or what am I doing bad? I want to give it another try.

Regards,
Mario


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


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