View Full Version : Anyone have the echo ws example working on osgi?
mebigfatguy
Apr 20th, 2008, 08:14 AM
I've been struggling for over a week to get the echo ws project working on osgi with no luck. Has anyone gotten this to work who'd be willing to post how it is done? Something that relies on this much magic should be easier to do. It is really quite frustrating. It would seem that my next step is to have to debug thru the spring-ws and osgi code to see what is happening. Seems like these frameworks should ease development, not make them more difficult. Arggg.
Costin Leau
Apr 20th, 2008, 05:13 PM
I understand your frustration and I will try to integrate the two but not in the very near future since I'm really swamped in work.
My advice is to try to take it step by step - in many cases the problems occurs due to incorrect class loading.
mebigfatguy
Apr 20th, 2008, 08:47 PM
Ok, i'm debugging in the web deployer, and it gets to
org.springframework.osgi.web.extender.deployer.int ernal.util
Utils.createServerServiceProxy
and it tries to do
return proxyFB.getObject();
at which point it takes a nap (for 5 seconds i guess) and then throws an exception
org.springframework.osgi.service.ServiceUnavailabl eException: service matching filter=[(&(org.springframework.osgi.bean.name=tomcat-server)(objectClass=org.apache.catalina.startup.Em bedded))] unavailable
at org.springframework.osgi.service.importer.internal .aop.ServiceDynamicInterceptor.getTarget(ServiceDy namicInterceptor.java:330)
at org.springframework.osgi.service.importer.internal .aop.ServiceDynamicInterceptor.afterPropertiesSet( ServiceDynamicInterceptor.java:366)
at org.springframework.osgi.service.importer.support. OsgiServiceProxyFactoryBean.createProxy(OsgiServic eProxyFactoryBean.java:117)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.getObject(Abs tractOsgiServiceImportFactoryBean.java:90)
at org.springframework.osgi.web.extender.deployer.int ernal.util.Utils.createServerServiceProxy(Utils.ja va:125)
at org.springframework.osgi.web.extender.deployer.tom cat.TomcatWarDeployer.afterPropertiesSet(TomcatWar Deployer.java:54)
at org.springframework.osgi.web.extender.internal.War ListenerConfiguration.createDefaultWarDeployer(War ListenerConfiguration.java:150)
at org.springframework.osgi.web.extender.internal.War ListenerConfiguration.<init>(WarListenerConfiguration.java:82)
at org.springframework.osgi.web.extender.internal.War LoaderListener.start(WarLoaderListener.java:251)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:993 )
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework .resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.doSetStartLevel(StartLevelManager.java:28 2)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.d ispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$E ventThread.run(EventManager.java:297)
org.springframework.osgi.service.ServiceUnavailabl eException: service matching filter=[(&(org.springframework.osgi.bean.name=tomcat-server)(objectClass=org.apache.catalina.startup.Em bedded))] unavailable
at org.springframework.osgi.service.importer.internal .aop.ServiceDynamicInterceptor.getTarget(ServiceDy namicInterceptor.java:330)
at org.springframework.osgi.service.importer.internal .aop.ServiceDynamicInterceptor.afterPropertiesSet( ServiceDynamicInterceptor.java:366)
at org.springframework.osgi.service.importer.support. OsgiServiceProxyFactoryBean.createProxy(OsgiServic eProxyFactoryBean.java:117)
at org.springframework.osgi.service.importer.support. AbstractOsgiServiceImportFactoryBean.getObject(Abs tractOsgiServiceImportFactoryBean.java:90)
at org.springframework.osgi.web.extender.deployer.int ernal.util.Utils.createServerServiceProxy(Utils.ja va:125)
at org.springframework.osgi.web.extender.deployer.tom cat.TomcatWarDeployer.afterPropertiesSet(TomcatWar Deployer.java:54)
at org.springframework.osgi.web.extender.internal.War ListenerConfiguration.createDefaultWarDeployer(War ListenerConfiguration.java:150)
at org.springframework.osgi.web.extender.internal.War ListenerConfiguration.<init>(WarListenerConfiguration.java:82)
at org.springframework.osgi.web.extender.internal.War LoaderListener.start(WarLoaderListener.java:251)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:993 )
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework .resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.doSetStartLevel(StartLevelManager.java:28 2)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.d ispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$E ventThread.run(EventManager.java:297)
mebigfatguy
Apr 20th, 2008, 09:05 PM
To me that means, it couldn't find the catalina bundle. But here is my ss with both
org.springframework.osgi.catalina.osgi_6.0.16.SNAP SHOT
and
org.springframework.osgi.catalina.start.osgi_6.0.1 6
started
id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.2.R33x_v20080105
1 ACTIVE org.springframework.bundle.ws.oxm_1.5.1.SNAPSHOT
2 ACTIVE org.mortbay.jetty.util_6.1.9
3 ACTIVE org.springframework.bundle.spring.webmvc_2.5.2
4 ACTIVE org.springframework.osgi.servlet-api.osgi_2.5.0.SNAPSHOT
5 ACTIVE org.springframework.bundle.spring.context_2.5.2
6 ACTIVE org.springframework.bundle.spring.core_2.5.2
7 ACTIVE org.springframework.bundle.spring.web_2.5.2
8 ACTIVE org.springframework.bundle.spring.context.support_ 2.5.2
9 ACTIVE org.springframework.bundle.spring.aop_2.5.2
10 RESOLVED org.springframework.bundle.osgi.web_1.1.0.m1
11 ACTIVE org.apache.commons.logging_1.0.4.v200706111724
12 ACTIVE org.springframework.bundle.osgi.io_1.1.0.m1
13 ACTIVE org.springframework.bundle.osgi.extender_1.1.0.m1
14 ACTIVE org.springframework.bundle.osgi.core_1.1.0.m1
15 ACTIVE org.springframework.bundle.spring.beans_2.5.2
16 ACTIVE org.springframework.osgi.aopalliance.osgi_1.0.0.SN APSHOT
18 ACTIVE org.springframework.bundle.ws.core_1.5.1.SNAPSHOT
19 ACTIVE org.springframework.bundle.ws.xml_1.5.1.SNAPSHOT
21 ACTIVE org.mortbay.jetty.server_6.1.9
22 ACTIVE org.springframework.osgi.catalina.osgi_6.0.16.SNAP SHOT
23 ACTIVE org.springframework.osgi.jasper.osgi_5.5.23.SNAPSH OT
24 ACTIVE javax.servlet.jsp_2.0.0.v200706191603
25 ACTIVE org.eclipse.osgi.services_3.1.200.v20070605
27 ACTIVE org.springframework.osgi.catalina.start.osgi_6.0.1 6.SNAPSHOT
30 ACTIVE org.springframework.osgi.cglib-nodep.osgi_2.1.3.SNAPSHOT
35 INSTALLED com.primavera.echo_1.0.0
Costin Leau
Apr 21st, 2008, 01:42 AM
Try getting some diagnostics on the catalina start bundle - see if the service has been started or not. Also, don't use commons.logging but slf4j (see Spring-DM faq). As a last resort, you could install each bundle one step at a time to see if there is an exception.
Also, consider removing the equinox cache between reruns - quite a number of users experienced problems because of this.
Additionally, take a look at BaseWebIntegrationTest from the trunk to see the kind of setup we use for web integration tests.
P.S. Next time, please use the [ c o d e ] tags - it improves formatting and readability. Thanks.
Cheers,
mebigfatguy
Apr 21st, 2008, 05:56 PM
>> Try getting some diagnostics on the catalina start bundle - see if the service has been started or not.
27 ACTIVE org.springframework.osgi.catalina.start.osgi_6.0.1 6.SNAPSHOT
No errors when i do diag
>> Also, don't use commons.logging but slf4j (see Spring-DM faq).
OK I tried to do that, but when i added jcl104.over.slf4j, slfj4.api and slf4j.log4j12 from the lib directory of spring-osgi-1.1.0-m1, I get all kinds of 'A cycle was detected' errors in eclipse regarding slf and it doesn't build???
>>P.S. Next time, please use the [ c o d e ] tags - it improves formatting and readability. Thanks.
done
adreghiciu
Apr 21st, 2008, 07:31 PM
>> Try getting some diagnostics on the catalina start bundle - see if the service has been started or not.
27 ACTIVE org.springframework.osgi.catalina.start.osgi_6.0.1 6.SNAPSHOT
No errors when i do diag
From the state of the bundles from your second post, if you do a "start 10" do you get the same error?
>> Also, don't use commons.logging but slf4j (see Spring-DM faq).
OK I tried to do that, but when i added jcl104.over.slf4j, slfj4.api and slf4j.log4j12 from the lib directory of spring-osgi-1.1.0-m1, I get all kinds of 'A cycle was detected' errors in eclipse regarding slf and it doesn't build???
Most simple is to use Pax Logger instead.
mebigfatguy
Apr 21st, 2008, 10:10 PM
One problem that i don't know how to resolve is that if i diag my fragment, I get this:
initial@reference:file:O:/echo/ [106]
Constraints from the fragment conflict with the host: Import-Package: org.springframework.ws.server.endpoint; version="0.0.0"
Missing Constraint: Fragment-Host: org.springframework.bundle.osgi.web; bundle-version="0.0.0"
This appears to be because in my Import-Package: manifest entry i list
Import-Package: org.springframework.util,
org.springframework.ws.server.endpoint,
org.springframework.ws.server.endpoint.mapping,
org.springframework.xml.transform
If i try to remove these from my fragment, then the compiler chokes in EchoEndpoint in relationship to knowing about AbstractDomPayloadEndpoint
>> Most simple is to use Pax Logger instead.
Thanks i'll try that.
mebigfatguy
Apr 21st, 2008, 11:50 PM
Thanks! Pax Logging worked fine without issue.
Not that it shed any new light on my main problem, but i wasn't expected that.
I see there is a Pax Web extender as well. Does this work similarly? Perhaps i'll try that, as i'm at a lost what else to do with spring's.
Costin Leau
Apr 22nd, 2008, 02:23 AM
OK I tried to do that, but when i added jcl104.over.slf4j, slfj4.api and slf4j.log4j12 from the lib directory of spring-osgi-1.1.0-m1, I get all kinds of 'A cycle was detected' errors in eclipse regarding slf and it doesn't build???
The jars depend on each other - the correct order would be slf4j.api, slf4j.log4j12, log4j and then jcl104.over.slf4j. In general, when installing jars that depend on each other consider resolving then before starting.
Costin Leau
Apr 22nd, 2008, 02:28 AM
One problem that i don't know how to resolve is that if i diag my fragment, I get this:
Code:
initial@reference:file:O:/echo/ [106]
Constraints from the fragment conflict with the host: Import-Package: org.springframework.ws.server.endpoint; version="0.0.0"
Missing Constraint: Fragment-Host: org.springframework.bundle.osgi.web; bundle-version="0.0.0"
This appears to be because in my Import-Package: manifest entry i list
Code:
Import-Package: org.springframework.util,
org.springframework.ws.server.endpoint,
org.springframework.ws.server.endpoint.mapping,
org.springframework.xml.transform
If i try to remove these from my fragment, then the compiler chokes in EchoEndpoint in relationship to knowing about AbstractDomPayloadEndpoint
Why do you use a fragment in the first place?
In Spring-DM, the web extender deploys war bundles - those that have a web.xml file present under WEB-INF. You should use fragments only when configuring a deployer or other extender option but from your posts this doesn't seem to be the purpose.
Costin Leau
Apr 22nd, 2008, 02:31 AM
To me that means, it couldn't find the catalina bundle. But here is my ss with both
org.springframework.osgi.catalina.osgi_6.0.16.SNAP SHOT
and
org.springframework.osgi.catalina.start.osgi_6.0.1 6
To be correct, this means that the catalina service (Embedded) in this case, wasn't expose. You can try and simply deploy the catalina.osgi+starter and then do a diag or service on the starter bundle to see if indeed the service is being properly deployed.
I would suggest that you remove the jetty bundles as well, until things work our at least, since there might be a conflict between the two, in case they are both started, on the port.
mebigfatguy
Apr 22nd, 2008, 08:12 AM
The jars depend on each other - the correct order would be slf4j.api, slf4j.log4j12, log4j and then jcl104.over.slf4j. In general, when installing jars that depend on each other consider resolving then before starting.
Thanks, but i meant just compiling them. Eclipse sticks red marks everywhere because of the circular dependencies.
mebigfatguy
Apr 22nd, 2008, 08:15 AM
Why do you use a fragment in the first place?
In Spring-DM, the web extender deploys war bundles - those that have a web.xml file present under WEB-INF. You should use fragments only when configuring a deployer or other extender option but from your posts this doesn't seem to be the purpose.
Hmm. I was just trying to follow the instructions in 8.4. That's what i thought i had to do. I'll remove it and try that.
Costin Leau
Apr 22nd, 2008, 08:25 AM
Thanks, but i meant just compiling them. Eclipse sticks red marks everywhere because of the circular dependencies.
Why do you want to compile them? They are osgi bundles out of the box..
Additionally you could import them into the same project...
Costin Leau
Apr 22nd, 2008, 08:28 AM
Hmm. I was just trying to follow the instructions in 8.4. That's what i thought i had to do. I'll remove it and try that.
http://static.springframework.org/osgi/docs/current/reference/html/web.html#web:configuration
talks about configuring the web extender - i.e. modifying it's default behaviour.
Is this what you are trying to achieve?
If there is anything unclear/confusing in section 8.4, please just let me know or better yet, raise an issue on jira.
P.S. section 8.4 does mention usage of META-INF/spring folder which is incorrect.
Thanks,
mebigfatguy
Apr 22nd, 2008, 08:35 AM
Why do you want to compile them? They are osgi bundles out of the box..
Additionally you could import them into the same project...
Sorry, i guess i mispoke. Eclipse marks lots of the projects up with red errors because of this. So i assumed if eclipse was cranky about it, it wouldn't deploy them.
mebigfatguy
Apr 22nd, 2008, 08:39 AM
http://static.springframework.org/osgi/docs/current/reference/html/web.html#web:configuration
talks about configuring the web extender - i.e. modifying it's default behaviour.
Is this what you are trying to achieve?
If there is anything unclear/confusing in section 8.4, please just let me know or better yet, raise an issue on jira.
P.S. section 8.4 does mention usage of META-INF/spring folder which is incorrect.
Thanks,
Perhaps 8.4 is clear, and i am just dense. I read it to mean in order for the extender to connect me and the tomcat i needed to be a fragment. And yes i have a META-INF/spring folder with all of my tomcat-deployer.xml, and
an echo-context-osgi.xml that contains definitions of all the beans like payloadMapping, etc. Are you saying that this doesn't go there? Does it go in the WEB-INF directory instead?
mebigfatguy
Apr 22nd, 2008, 12:32 PM
Ok, it seems like i'm much further, i'm actually getting the echo service injected into my endpoint. But after adding a bunch of dependencies - in this case axis, i get errors. It appears that the Apache Axis bundle has a Requires-Bundle on commons-logging, which i suppose is in conflict with the pax logger, as i get this error. I guess i will try to remove that, and add Import-Package items for it.
Require-Bundle: org.apache.ant;bundle-version="[1.6.5,1.7.0)",org.apac
he.commons.httpclient;bundle-version="[3.0.0,4.0.0)";resolution:=opti
onal,org.apache.commons_logging;bundle-version="[1.0.4,1.1.0)",org.ap
ache.jakarta_log4j;bundle-version="[1.2.8,1.3.0)"
SEVERE: Allocate exception for servlet spring-ws
org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.LogFactoryImpl does not implement org.apache.commons.logging.LogFactory
at org.apache.commons.discovery.tools.ClassUtils.veri fyAncestory(ClassUtils.java:180)
at org.apache.commons.discovery.tools.SPInterface.ver ifyAncestory(SPInterface.java:201)
at org.apache.commons.discovery.tools.DefaultClassHol der.getDefaultClass(DefaultClassHolder.java:115)
at org.apache.commons.discovery.tools.DiscoverClass.f ind(DiscoverClass.java:390)
at org.apache.commons.discovery.tools.DiscoverClass.n ewInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSinglet on.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSinglet on.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run (LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLo gFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
at org.apache.axis.message.NodeImpl.<clinit>(NodeImpl.java:48)
at org.apache.axis.soap.MessageFactoryImpl.createMess age(MessageFactoryImpl.java:52)
at org.springframework.ws.soap.saaj.support.SaajUtils .isSaaj12(SaajUtils.java:100)
at org.springframework.ws.soap.saaj.support.SaajUtils .<clinit>(SaajUtils.java:65)
at org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory.afterPropertiesSet(SaajSoapMessageFactory.ja va:102)
at org.springframework.ws.support.DefaultStrategiesHe lper.instantiateBean(DefaultStrategiesHelper.java: 166)
at org.springframework.ws.support.DefaultStrategiesHe lper.getDefaultStrategies(DefaultStrategiesHelper. java:115)
at org.springframework.ws.support.DefaultStrategiesHe lper.getDefaultStrategy(DefaultStrategiesHelper.ja va:200)
at org.springframework.ws.transport.http.MessageDispa tcherServlet.initWebServiceMessageFactory(MessageD ispatcherServlet.java:269)
at org.springframework.ws.transport.http.MessageDispa tcherServlet.initMessageReceiverHandlerAdapter(Mes sageDispatcherServlet.java:254)
at org.springframework.ws.transport.http.MessageDispa tcherServlet.initFrameworkServlet(MessageDispatche rServlet.java:202)
at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:263)
at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.j ava:241)
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:806)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
mebigfatguy
Apr 22nd, 2008, 01:12 PM
Luckily Knopflerfish had an osgi axis bundle all ready.
Now i get
[SpringOsgiExtenderThread-2] ERROR org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext - Canceling refresh
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'echo' defined in URL [bundleentry://213/META-INF/spring/echo-context-osgi.xml]: Invocation of init method failed; nested exception is WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.:
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1302)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:463)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:375)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 63)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:170)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:260 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:184)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:163)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:430)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:268)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:142)
at java.lang.Thread.run(Thread.java:595)
Caused by: WSDLException: faultCode=CONFIGURATION_ERROR: No Java extensionType found to represent a '{http://www.w3.org/2001/XMLSchema}schema' element in the context of a 'javax.wsdl.Types'.:
at javax.wsdl.extensions.ExtensionRegistry.createExte nsion(Unknown Source)
at org.springframework.ws.wsdl.wsdl11.provider.Inlini ngXsdSchemaTypesProvider.addTypes(InliningXsdSchem aTypesProvider.java:102)
at org.springframework.ws.wsdl.wsdl11.ProviderBasedWs dl4jDefinition.afterPropertiesSet(ProviderBasedWsd l4jDefinition.java:233)
at org.springframework.ws.wsdl.wsdl11.DefaultWsdl11De finition.afterPropertiesSet(DefaultWsdl11Definitio n.java:166)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1333)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1299)
... 14 more
I have no idea what that means.
mebigfatguy
Apr 22nd, 2008, 07:52 PM
Hmm knopflerfish's wsdl4j jar was old. injecting a new jar fixed it.
Now i got commons-logging issues with axis. Will the carnage ever end?
org.osgi.framework.BundleException: Exception in org.knopflerfish.bundle.axis.Activator.start() of bundle org.knopflerfish:axis-osgi:0.1.0.
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:101 0)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.start(BundleContextImpl.java:966)
at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:317)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.resume(AbstractBundle.java:329)
at org.eclipse.osgi.framework.internal.core.Framework .resumeBundle(Framework.java:1046)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.resumeBundles(StartLevelManager.java:573)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.incFWSL(StartLevelManager.java:495)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.doSetStartLevel(StartLevelManager.java:27 5)
at org.eclipse.osgi.framework.internal.core.StartLeve lManager.dispatchEvent(StartLevelManager.java:455)
at org.eclipse.osgi.framework.eventmgr.EventManager.d ispatchEvent(EventManager.java:189)
at org.eclipse.osgi.framework.eventmgr.EventManager$E ventThread.run(EventManager.java:291)
Caused by: java.lang.ExceptionInInitializerError
at org.apache.axis.configuration.FileProvider.<clinit>(FileProvider.java:92)
at org.knopflerfish.bundle.axis.Activator.setupAxis(A ctivator.java:111)
at org.knopflerfish.bundle.axis.Activator.start(Activ ator.java:96)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl$2.run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleCon textImpl.startActivator(BundleContextImpl.java:985 )
... 10 more
Caused by: org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory
at org.apache.commons.discovery.tools.ClassUtils.veri fyAncestory(ClassUtils.java:176)
at org.apache.commons.discovery.tools.SPInterface.ver ifyAncestory(SPInterface.java:201)
at org.apache.commons.discovery.tools.SPInterface.new Instance(SPInterface.java:195)
at org.apache.commons.discovery.tools.DiscoverClass.n ewInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSinglet on.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSinglet on.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run (LogFactory.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLo gFactory(LogFactory.java:80)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:72)
... 16 more
Costin Leau
Apr 23rd, 2008, 08:30 AM
Perhaps 8.4 is clear, and i am just dense. I read it to mean in order for the extender to connect me and the tomcat i needed to be a fragment. And yes i have a META-INF/spring folder with all of my tomcat-deployer.xml, and
an echo-context-osgi.xml that contains definitions of all the beans like payloadMapping, etc. Are you saying that this doesn't go there? Does it go in the WEB-INF directory instead?
META-INF/spring should be used when the spring-dm extender manages the bundle - inside a web container this is not the case, it's the container that manages the appication so your configuration files should be in the classpath (WEB-INF/lib for example or whatever you specify inside your Bundle-Classpath).
This part of section 8.4 is mislead and has to be rectified.
Costin Leau
Apr 23rd, 2008, 08:35 AM
I'm glad to see you are making some progress.
The problem with Axis and commons-logging is an unfortunate one. You are probably using the one from Equinox repository which has a require bundle or something like that in. If I recall correctly, it needs commons-logging 1.0.4 which doesn't work very nicely inside OSGi - you could use the one from Equinox again but probably things will get worse.
I tried using commons-logging 1.0.4 and failed since it has a special way of dealing with the thread context classloader which cannot be disabled.
Things are different with commons-logging 1.1.x where you have more parameters to tweak and thus can disable this behaviour.
I'm not sure what logging factory you use but take a closer look at slf4j since it provides a bridge between commons-logging including the LogFactory api.
However, the problem in your case is commons-discovery which uses class loader assumptions to do some scanning and this is prone to fail inside OSGi.
Maybe there are some system properties you could use to overcome this problem.
Additionally, you could consider wrapping axis yourself to use only imports on commons-logging instead of class discovery - it might seem hard but it's a somewhat scoped effort that can pay off.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.