Hi again,

Mario Prettner schrieb:
Hi Chris,

[EMAIL PROTECTED] 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:[EMAIL PROTECTED] Sent: Thursday, January 24, 2008 12:41 PM
To: [email protected]
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: [EMAIL PROTECTED]: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to