Hi,
My comment inline
On 2009-7-3, at 下午11:59, TheWinch wrote:
>
> Hello all,
>
> I followed the excellent tutorial from
>
http://cwiki.apache.org/SMX4/creating-an-osgi-bundle-for-deploying-jbi-endpoints.html> here . I managed to run the tutorial to end, which means that I can
> deploy
> ServiceMix::File and ServiceMix::Bean service units using OSGi.
>
> I used the same process to expose a ServiceMix::HTTP provider SU
> (find code
> below).
> When I deploy my bundle, I get the following error:
>
>
>
>> Unable to create application context for
>> [eu.diva.tis.messaging.organizations.soap-connector], unsatisfied
>> dependencies: none
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> Failed to
>> load type: org.apache.servicemix.http.endpoints.HttpProviderEndpoint.
>> Reason: java.lang.ClassNotFoundException:
>> org.apache.servicemix.http.endpoints.HttpProviderEndpoint; nested
>> exception is java.lang.ClassNotFoundException:
>> org.apache.servicemix.http.endpoints.HttpProviderEndpoint
>>
>
> I thought this was because my pom.xml only specified
> org.apache.servicemix.http in the Import-Package section, so I added
> ...http.endpoints. But then I get this exception :
>
>
>
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> 165:
>> package; (package=org.apache.servicemix.http.endpoint)
>>
>
> I guess the solution is either to embed servicemix-http in the
> bundle, or
> try a way to get the ....http.ednpoint package imported. But I can't
> find
> how. Does someone have a solution ?
>
> POM.xml:
>
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns="
http://maven.apache.org/POM/4.0.0"
>> xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0>>
http://maven.apache.org/maven-v4_0_0.xsd">
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>eu.diva.tis.messaging.organizations</groupId>
>> <artifactId>soap-connector</artifactId>
>> <packaging>bundle</packaging>
>> <name>DiVA :: Messaging :: Organizations SOAP Connector</name>
>> <version>0.0.1-SNAPSHOT</version>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.servicemix</groupId>
>> <artifactId>servicemix-http</artifactId>
>> <version>2009.01</version>
>> </dependency>
>> </dependencies>
>> <build>
>> <resources>
>> <resource>
>> <directory>src/main/resources</directory>
>> <includes>
>> <include>**/*</include>
>> </includes>
>> </resource>
>> </resources>
>> <plugins>
>> <!-- configure the bundle plugin with some additional imports
>> -->
>> <plugin>
>> <groupId>org.apache.felix</groupId>
>> <artifactId>maven-bundle-plugin</artifactId>
>> <version>2.0.0</version>
>> <extensions>true</extensions>
>> <configuration>
>> <instructions>
>>
>> <Import-
>> Package
>> >
>> org
>> .apache
>> .servicemix
>> .http
>> ,org
>> .apache
>> .servicemix
>> .http
>> .endpoint
>> ,org.apache.servicemix.bean,org.apache.servicemix.common.osgi,*</
>> Import-Package>
it should be ...http.endpoints but not ...http.endpoint
--
Freeman Fang
------------------------
Open Source SOA:
http://fusesource.com