One Star

How to run cxf-wsn feature in offline mode

Dear all,
I am having currently some trouble with running talend ESB in an offline mode when using the cxf-wsn and cxf-wsn-api features.
BACKGROUND: Since I am developing an application which is going to be deployed within a restricted, corporate network, I am not able to download resources dynamically, on demand from the network. Therefore I was hoping, that I can run talend ESB also in a complete offline mode.
The following describes the test setup, that I prepared:
(1) I've setup a single virtual machine based on Red Hat 4.1.2-52, which is the target platform where the application is going to be deployed.
(2) I opened the tar ball of the talend ESB.
(3) To simulate the closed network, I detached the virtual machine from the network and
(4) started the ESB.
(5) To test the offline installation now, I installed cxf-wsn and cxf-wsn-api features via the command line interface.
Unfortunately I received the following error message:
java.lang.RuntimeException: URL  could not be resolved.
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
at java.net.URL.openStream(URL.java:1010)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installBundleIfNeeded(FeaturesServiceImpl.java:650)
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:478)
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:456)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:295)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:283)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:279)
at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)
at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:221)
at java.lang.Thread.run(Thread.java:662)
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.doRun(ShellFactoryImpl.java:142)
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4$1.run(ShellFactoryImpl.java:133)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:337)
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.run(ShellFactoryImpl.java:131)
20:19:53,097 | ERROR | rint Extender: 2 | ntainer.BlueprintContainerImpl$1 293 | 9 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint container for bundle sam-server due to unresolved dependencies
java.util.concurrent.TimeoutException
at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

It seems that karaf can not resolve the maven coordinates. Than I started figuring out, why it might be that maven URI can not be resolved.
(1) Taking a look into
<TALEND_HOME>/container/system/org/apache/cxf/services/

reviles that there is only the STS service bundled with the CXF component. This seems to be confusing to me, since the CXF sources contain in 2.5.2 also the WSN components as a service and I wonder why I could not find it
(2) On the other hand, when I look into
<TALEND_HOME>/lib/

I can find both libraries:
cxf-services-wsn-api-2.5.2.jar and
cxf-services-wsn-core-2.5.2.jar
Do I actually need to copy those files manually somewhere to make this working? Is there an alternative way to get this working by doing any configurations, e.g. karaf features.xml?
Many thanks and kind regards,
Christoph
5 REPLIES
One Star

Re: How to run cxf-wsn feature in offline mode

Just as a little more information. If I connect the machine to the network, the installation of cxf-wsn seems to be working:
20:57:09,581 | INFO  | Thread-8         | res.internal.FeaturesServiceImpl  421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf-wsn 2.5.2
20:57:09,583 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature activemq 5.5.0
20:57:09,584 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf-wsn-api 2.5.2
20:57:09,584 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf 2.5.2
20:57:09,807 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 693 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing bundle mvn:org.apache.cxf.services.wsn/cxf-services-wsn-api/2.5.2
20:57:10,316 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 693 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing bundle mvn:org.apache.cxf.services.wsn/cxf-services-wsn-core/2.5.2
20:57:10,369 | INFO | Thread-8 | res.internal.FeaturesServiceImpl 323 | 16 - org.apache.karaf.features.core - 2.2.5 | Bundles to refresh:
20:57:10,789 | INFO | JMX connector | q.broker.jmx.ManagementContext$1 99 | 149 - org.apache.activemq.activemq-core - 5.5.0 | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
20:57:10,842 | INFO | rint Extender: 1 | mq.store.kahadb.plist.PListStore 288 | 149 - org.apache.activemq.activemq-core - 5.5.0 | PListStore:activemq-data/localhost/tmp_storage started
20:57:10,844 | INFO | rint Extender: 1 | he.activemq.broker.BrokerService 489 | 149 - org.apache.activemq.activemq-core - 5.5.0 | Using Persistence Adapter: KahaDBPersistenceAdapter
20:57:11,177 | INFO | rint Extender: 1 | he.activemq.broker.BrokerService 763 | 149 - org.apache.activemq.activemq-core - 5.5.0 | ActiveMQ 5.5.0 JMS Message Broker (localhost) is starting
20:57:11,177 | INFO | rint Extender: 1 | he.activemq.broker.BrokerService 765 | 149 - org.apache.activemq.activemq-core - 5.5.0 | For help or more information please see: http://activemq.apache.org/
20:57:11,311 | INFO | rint Extender: 1 | he.activemq.broker.BrokerService 532 | 149 - org.apache.activemq.activemq-core - 5.5.0 | ActiveMQ JMS Message Broker (localhost, ID:localhost.localdomain-52363-1334084231189
-0:1) started
20:57:11,314 | INFO | rint Extender: 1 | tivemq.broker.TransportConnector 258 | 149 - org.apache.activemq.activemq-core - 5.5.0 | Connector vm://localhost Started

Nevertheless, even an online installation throws an initial error
20:57:16,375 | ERROR | rint Extender: 1 | lueprint.container.ServiceRecipe  302 | 9 - org.apache.aries.blueprint - 0.3.1 | Error retrieving service from ServiceRecipe
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean notificationBroker
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
at org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:370)
at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:278)
at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:248)
at org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:140)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider org.apache.cxf.jaxws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:229)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:220)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:229)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
at javax.xml.ws.spi.Provider.provider(Provider.java:43)
at javax.xml.ws.Endpoint.create(Endpoint.java:41)
at javax.xml.ws.Endpoint.create(Endpoint.java:37)
at org.apache.cxf.wsn.services.JaxwsEndpointManager.register(JaxwsEndpointManager.java:33)
at org.apache.cxf.wsn.AbstractEndpoint.register(AbstractEndpoint.java:50)
at org.apache.cxf.wsn.AbstractNotificationBroker.init(AbstractNotificationBroker.java:103)
at org.apache.cxf.wsn.jms.JmsNotificationBroker.init(JmsNotificationBroker.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
... 25 more
20:57:16,383 | ERROR | rint Extender: 1 | container.BlueprintContainerImpl 358 | 9 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint container for bundle org.apache.cxf.services.wsn.cxf-services-wsn-core
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean notificationBroker
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
at org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:370)
at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:278)
at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:248)
at org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:140)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider org.apache.cxf.jaxws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:229)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:220)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:229)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
at javax.xml.ws.spi.Provider.provider(Provider.java:43)
at javax.xml.ws.Endpoint.create(Endpoint.java:41)
at javax.xml.ws.Endpoint.create(Endpoint.java:37)
at org.apache.cxf.wsn.services.JaxwsEndpointManager.register(JaxwsEndpointManager.java:33)
at org.apache.cxf.wsn.AbstractEndpoint.register(AbstractEndpoint.java:50)
at org.apache.cxf.wsn.AbstractNotificationBroker.init(AbstractNotificationBroker.java:103)
at org.apache.cxf.wsn.jms.JmsNotificationBroker.init(JmsNotificationBroker.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
... 25 more
One Star

Re: How to run cxf-wsn feature in offline mode

Finally I made some progress on the installation topic. As I assumed initially the required libraries
cxf-services-wsn-api-2.5.2.jar
cxf-services-wsn-core-2.5.2.jar
must be copied over to the folder <TALEND_HOME>/container/system/ to be able starting the WSN service in a detached network. Please see below the folder structure for <TALEND_HOME>/container/system/org/apache/cxf/
$ tree
.
|-- cxf-bundle
| `-- 2.5.2
| `-- cxf-bundle-2.5.2.jar
|-- dosgi
| `-- cxf-dosgi-ri-discovery-distributed-zookeeper-server
| `-- 1.2
| `-- cxf-dosgi-ri-discovery-distributed-zookeeper-server-1.2.jar
|-- karaf
| |-- apache-cxf
| | |-- 2.4.6
| | | `-- apache-cxf-2.4.6-features.xml
| | `-- 2.5.2
| | `-- apache-cxf-2.5.2-features.xml
| `-- cxf-karaf-commands
| `-- 2.5.2
| `-- cxf-karaf-commands-2.5.2.jar
`-- services
|-- sts
| `-- cxf-services-sts-core
| `-- 2.5.2
| `-- cxf-services-sts-core-2.5.2.jar
`-- wsn
|-- cxf-services-wsn-api
| `-- 2.5.2
| `-- cxf-services-wsn-api-2.5.2.jar
`-- cxf-services-wsn-core
`-- 2.5.2
`-- cxf-services-wsn-core-2.5.2.jar
20 directories, 8 files

For me it seems that this should be already in place with the ESB distribution, since there might be several deployment scenarios, especially in an enterprise environment that requires this offline capability.
2012-04-11 12:06:03,766 | INFO  | Thread-27        | FeaturesServiceImpl              | res.internal.FeaturesServiceImpl  421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf-wsn 2.5.2
2012-04-11 12:06:03,768 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature activemq 5.5.0
2012-04-11 12:06:03,768 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf-wsn-api 2.5.2
2012-04-11 12:06:03,768 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 421 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing feature cxf 2.5.2
2012-04-11 12:06:03,771 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 693 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing bundle mvn:org.apache.cxf.services.wsn/cxf-services-wsn-api/2.5.2
2012-04-11 12:06:03,783 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 693 | 16 - org.apache.karaf.features.core - 2.2.5 | Installing bundle mvn:org.apache.cxf.services.wsn/cxf-services-wsn-core/2.5.2
2012-04-11 12:06:03,785 | INFO | Thread-27 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 323 | 16 - org.apache.karaf.features.core - 2.2.5 | Bundles to refresh:
2012-04-11 12:06:04,119 | INFO | JMX connector | ManagementContext | q.broker.jmx.ManagementContext$1 99 | 149 - org.apache.activemq.activemq-core - 5.5.0 | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
2012-04-11 12:06:04,168 | INFO | rint Extender: 1 | PListStore | mq.store.kahadb.plist.PListStore 288 | 149 - org.apache.activemq.activemq-core - 5.5.0 | PListStore:activemq-data/localhost/tmp_storage started
2012-04-11 12:06:04,170 | INFO | rint Extender: 1 | BrokerService | he.activemq.broker.BrokerService 489 | 149 - org.apache.activemq.activemq-core - 5.5.0 | Using Persistence Adapter: KahaDBPersistenceAdapter
2012-04-11 12:06:04,257 | INFO | rint Extender: 1 | BrokerService | he.activemq.broker.BrokerService 763 | 149 - org.apache.activemq.activemq-core - 5.5.0 | ActiveMQ 5.5.0 JMS Message Broker (localhost) is starting
2012-04-11 12:06:04,258 | INFO | rint Extender: 1 | BrokerService | he.activemq.broker.BrokerService 765 | 149 - org.apache.activemq.activemq-core - 5.5.0 | For help or more information please see: http://activemq.apache.org/
2012-04-11 12:06:04,391 | INFO | rint Extender: 1 | BrokerService | he.activemq.broker.BrokerService 532 | 149 - org.apache.activemq.activemq-core - 5.5.0 | ActiveMQ JMS Message Broker (localhost, ID:localhost.localdomain-39408-1334138764270-0:1) started
2012-04-11 12:06:04,394 | INFO | rint Extender: 1 | TransportConnector | tivemq.broker.TransportConnector 258 | 149 - org.apache.activemq.activemq-core - 5.5.0 | Connector vm://localhost Started
2012-04-11 12:06:04,469 | INFO | rint Extender: 1 | ReflectionServiceFactoryBean | ory.ReflectionServiceFactoryBean 412 | - - | Creating Service {http://docs.oasis-open.org/wsn/brw-2}NotificationBroker from class org.oasis_open.docs.wsn.brw_2.NotificationBroker

The next point I figured is, that this installation does also not run through smoothly and throws a new error. It looks like there is no local WS catalog defined that contains the WSN spec files. Has anyone a quick fix for this issue?
2012-04-11 12:06:04,894 | ERROR | rint Extender: 1 | ServiceRecipe                    | lueprint.container.ServiceRecipe  302 | 9 - org.apache.aries.blueprint - 0.3.1 | Error retrieving service from ServiceRecipe
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean notificationBroker
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
at org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:370)
at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:278)
at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:248)
at org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:140)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.ws.WebServiceException: org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'schema4.xsd'.
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:353)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:242)
at org.apache.cxf.wsn.services.JaxwsEndpointManager.register(JaxwsEndpointManager.java:34)
at org.apache.cxf.wsn.AbstractEndpoint.register(AbstractEndpoint.java:50)
at org.apache.cxf.wsn.AbstractNotificationBroker.init(AbstractNotificationBroker.java:103)
at org.apache.cxf.wsn.jms.JmsNotificationBroker.init(JmsNotificationBroker.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
... 25 more
Caused by: org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'schema4.xsd'.
at org.apache.cxf.catalog.CatalogXmlSchemaURIResolver.resolveEntity(CatalogXmlSchemaURIResolver.java:76)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:684)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538)
at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:659)
at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:157)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:499)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:485)
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:133)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:190)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:93)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:350)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:445)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:508)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:207)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:438)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:325)
... 37 more
2012-04-11 12:06:04,924 | ERROR | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 358 | 9 - org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint container for bundle org.apache.cxf.services.wsn.cxf-services-wsn-core
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean notificationBroker
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
at org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:370)
at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:278)
at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:248)
at org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:140)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.ws.WebServiceException: org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'schema4.xsd'.
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:353)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:242)
at org.apache.cxf.wsn.services.JaxwsEndpointManager.register(JaxwsEndpointManager.java:34)
at org.apache.cxf.wsn.AbstractEndpoint.register(AbstractEndpoint.java:50)
at org.apache.cxf.wsn.AbstractNotificationBroker.init(AbstractNotificationBroker.java:103)
at org.apache.cxf.wsn.jms.JmsNotificationBroker.init(JmsNotificationBroker.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
... 25 more
Caused by: org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'schema4.xsd'.
at org.apache.cxf.catalog.CatalogXmlSchemaURIResolver.resolveEntity(CatalogXmlSchemaURIResolver.java:76)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:684)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538)
at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:659)
at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:157)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:499)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:485)
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:133)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:190)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:93)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:350)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:445)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:508)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:242)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:207)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:438)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:325)
... 37 more
Employee zbe
Employee

Re: How to run cxf-wsn feature in offline mode

Christoph,
you are right, in the 5.0.2 the corresponding wsn bundles are missing in the system repository. This is an issue, because our aim is to support operation of the container in off-line mode. The good news is in the upcomming 5.1.0 the required bundles are all included, the bad news is I still see the problem with the ws-addressing schema you described in the log file and wsn-core fails to start. I added a jira for this: http://jira.talendforge.org/browse/TESB-5524. Later this day I will also file a CXF issue for this problem as like you wrote a local copy of the schema and a corresponding catalog entry is missing in the corresponding bundle.
Regards,
Zsolt
One Star

Re: How to run cxf-wsn feature in offline mode

Hi Zsolt,
good news, that you are aware of this issue and thanks for opening the Jira ;-)
I have just tried to poke a little around on this issue and did the following:
1) I was adding a new file called "jax-ws-catalog.xml" under the wsn-core feature of the CXF WSN service.
2) Added some redirecting information to the catalog file:
<?xml version="1.0"?>
<!DOCTYPE catalog
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
<rewriteSystem systemIdStartString="http://www.w3.org/2006/03/addressing" rewritePrefix="classpath:/org/apache/cxf/wsn/wsdl"/>
<rewriteSystem systemIdStartString="http://www.w3.org/2005/08/addressing" rewritePrefix="classpath:/org/apache/cxf/wsn/wsdl"/>
</catalog>

Where the class-path entry points to the wsn-api package containing the spec files.
3) Adjusted the wsn-code component pom.xml to import the wsn-api package
<Import-Package>
org.apache.cxf.wsn.util.*;version=${project.version},
!org.apache.cxf.wsn*,
!org.apache.activemq*,
javax.xml.bind*;version="[0.0,3)",
javax.jws*;version="[0.0,3)",
javax.xml.ws*;version="[0.0,3)",
org.apache.cxf*;version=${project.version},
org.apache.cxf.wsn.wsdl,
*
</Import-Package>

4) Ran a rebuild and tried to change the packages
Unfortunately without success. Some debugging of the startup behavior reviled that the catalog seems not to be resolved. I am still pointing to the "schema4.xsd" if I look into the base field of the OASISCatalogManagerHelper class that tries to resolve the URI at startup.
Did you managed to get any further with this topic?
Many thanks and kind regards,
Christoph
Employee zbe
Employee

Re: How to run cxf-wsn feature in offline mode

Just had a look into the wsdls and schemas provided with CXF WSN component. At first glance it is not obvious to me why the resolver tries get the ws-addressing scheme from the internet. It is included and referenced from the requiring schemas. Filed an isue for CXF (https://issues.apache.org/jira/browse/CXF-4240), so someone from the CXF team can also have alook into.