mercredi 31 décembre 2014

osgi.wiring.package=com.bedas.ima missing requirement error in karaf


Vote count:

0




I want to make an application with using Apache Camel.I wrote the route in xml file.But Karaf container does not recognize the package that i wrote for beans.Here is my xml and pom.xml files:



<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://ift.tt/jtTJvY Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->

<!-- START SNIPPET: e1 -->
<beans xmlns="http://ift.tt/GArMu6"
xmlns:xsi="http://ift.tt/ra1lAU" xmlns:camel="http://ift.tt/TZ5qsO"
xmlns:cxf="http://ift.tt/1cLbWMF" xmlns:context="http://ift.tt/GArMu7"
xsi:schemaLocation="
http://ift.tt/GArMu6 http://ift.tt/1jdM0fG
http://ift.tt/GArMu7 http://ift.tt/1jdLYo7
http://ift.tt/TZ5qsO http://ift.tt/1apCv6i
http://ift.tt/1cLbWMF http://ift.tt/1i7BB3m">


<bean id="aysProcessor" class="com.bedas.ima.AysProcessor" />

<bean id="executor" class="java.util.concurrent.Executors"
factory-method="newFixedThreadPool">
<constructor-arg index="0" value="16" />
</bean>

<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616" />
<property name="userName" value="akin" />
<property name="password" value="akin123" />

</bean>


<!-- <import resource="classpath:META-INF/cxf/cxf.xml" /> -->


<!-- this is the CXF web service we use as the front end -->
<cxf:cxfEndpoint id="ima-okuma"
address="http://localhost:8168/sep/services/cxf/imaOkumaCxfService"
serviceName="s:ImaOkumaServiceImplService" wsdlURL="META-INF/wsdl/imaokuma.wsdl"
xmlns:s="http://ift.tt/1zxPiiT" />

<cxf:cxfEndpoint id="ays-service"
address="http://localhost:8080/ays/services/begisService"
serviceName="s:BegisServiceImplService" wsdlURL="META-INF/wsdl/aysBegis.wsdl"
serviceClass="com.bedas.ays.ws.service.BegisService"
xmlns:s="http://ift.tt/1zxPkr4" />

<!-- <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy"> -->
<!-- <constructor-arg value="com.bedas.sep.ws.cxf.service.ImaOkumaCxfService"/> -->
<!-- <constructor-arg value="true"/> -->
<!-- </bean> -->

<!-- <bean id="enrichBean" class="com.bedas.ays.ws.service.EnrichBean"/> -->


<!-- this is the Camel route which proxies the real web service and forwards
SOAP requests to it -->
<!-- <route errorHandlerRef="dlc" id="imaRoute2"> --><!-- <from uri="activemq:queue:imaokumaq?disableTimeToLive=true"/> --><!-- <to uri="http://ift.tt/1B6pezF"/> --><!-- </route> -->
<camelContext trace="false" errorHandlerRef="defaultEH" id="ImaOkuma" xmlns="http://ift.tt/TZ5qsO">

<errorHandler type="DefaultErrorHandler" id="defaultEH">
<redeliveryPolicy maximumRedeliveries="0" retryAttemptedLogLevel="WARN"/>
</errorHandler>
<errorHandler type="DeadLetterChannel" deadLetterUri="activemq:queue:imaOkumaERROR" useOriginalMessage="true" id="dlc">
<redeliveryPolicy maximumRedeliveries="0"/>
</errorHandler>
<dataFormats>
<jaxb id="myJaxb" prettyPrint="true" contextPath="com.bedas.sep.ws.cxf.service"/>
</dataFormats>
<route errorHandlerRef="dlc" id="imaRoute1">
<from uri="cxf:bean:ima-okuma?dataFormat=MESSAGE"/>
<wireTap uri="activemq:queue:aysq?jmsMessageType=Object"/>
<inOnly uri="activemq:queue:imaokumaq"/>
<to uri="velocity:response.vm"/>
<!-- <camel:transform><camel:constant>OK</camel:constant></camel:transform> -->
<!-- <to uri="cxf:bean:ays-service?dataFormat=POJO"/> -->

<!-- <convertBodyTo type="com.bedas.ays.ws.service.BegisModel"/> -->
<!-- <marshal> -->
<!-- <soapjaxb contextPath="com.bedas.sep.ws.cxf.service" version="1.1" elementNameStrategyRef="myNameStrategy"/> -->
<!-- </marshal> -->
<!-- <multicast parallelProcessing="true" executorServiceRef="executor" stopOnException="false"> -->
<!-- <inOnly uri="activemq:queue:imaokumaq"/> -->
<!-- <to uri="aysProcessor"/> -->
<!-- </multicast> -->
</route>
<route errorHandlerRef="dlc" id="imaRoute2">
<from uri="activemq:queue:aysq?jmsMessageType=Object"/>
<camel:log message="BURADAYIMMMM"></camel:log>
<to uri="aysProcessor"/>
<!-- <unmarshal> -->
<!-- <soapjaxb contextPath="com.bedas.sep.ws.cxf.service" version="1.1" elementNameStrategyRef="myNameStrategy"/> -->
<!-- </unmarshal> -->

<!-- <convertBodyTo type="com.bedas.ays.ws.service.BegisModel"/> -->
<!-- <from uri="aysProcessor"/> -->
<!-- <to uri="cxf:bean:ays-service?dataFormat=POJO"/> -->
</route>
</camelContext>

</beans>
<!-- END SNIPPET: e1 -->


When i make mvn:install and deploy it in fuse karaf container,it throws the exception in the question title.Here is my pom.xml file:



<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://ift.tt/jtTJvY Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<project xmlns="http://ift.tt/IH78KX" xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://ift.tt/IH78KX http://ift.tt/HBk9RF">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.camel</groupId>
<artifactId>examples</artifactId>
<version>2.12.3</version>
<relativePath></relativePath>
</parent>

<artifactId>ima-okuma</artifactId>
<name>Camel :: Example :: CXF :: Proxy</name>
<description>An example which uses Camel to proxy a web service</description>
<packaging>bundle</packaging>

<properties>
<camel.osgi.export.pkg>
com.bedas.sep.ws.cxf.service*
com.bedas.ays.ws.service*
com.bedas.ima*
</camel.osgi.export.pkg>
<camel.osgi.private.pkg>
com.bedas.sep.ws.cxf.service.imaokuma
com.bedas.ays.ws.service.begismodel
com.bedas.ima.AysProcessor
</camel.osgi.private.pkg>
<!-- to avoid us import bunch of cxf package -->
<camel.osgi.dynamic>*</camel.osgi.dynamic>
</properties>


<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<scope>provided</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.apache.camel</groupId> -->
<!-- <artifactId>camel-soap</artifactId> -->
<!-- </dependency> -->

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>

</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-soap</artifactId>
</dependency>

<dependency>

<groupId>org.apache.camel</groupId>
<artifactId>camel-velocity</artifactId>
<scope>provided</scope>

</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<scope>provided</scope>
</dependency>

<!-- cxf -->
<!-- used by the real web service -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf-version}</version>
<scope>provided</scope>
</dependency>
<!-- regular http transport -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf-version}</version>
<scope>provided</scope>
</dependency>

<!-- logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>provided</scope>
</dependency>

<!-- cxf web container for unit testing -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${cxf-version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>

</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>

<exclusions>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>

</dependency>

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>

</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<includePluginDependencies>false</includePluginDependencies>
</configuration>
</plugin>
<!-- CXF wsdl2java generator, will plugin to the compile goal -->
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/imaokuma.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
<execution>
<id>generate-sources1</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/aysBegis.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${project.version}</version>
</plugin>

<!-- <plugin> -->
<!-- <groupId>org.apache.felix</groupId> -->
<!-- <artifactId>maven-bundle-plugin</artifactId> -->
<!-- <extensions>true</extensions> -->
<!-- <configuration> -->
<!-- <instructions> -->
<!-- <Import-Package>*</Import-Package> -->
<!-- <EXPORT-PACKAGE>${camel.osgi.export.pkg}</EXPORT-PACKAGE> -->
<!-- <_failok>true</_failok> -->
<!-- </instructions> -->
<!-- </configuration> -->
<!-- </plugin> -->


</plugins>
</build>

</project>


asked 44 secs ago







osgi.wiring.package=com.bedas.ima missing requirement error in karaf

Aucun commentaire:

Enregistrer un commentaire