Hi,

I have a module which has an embedded library that needs to make use of
secure web-service calls, not something I can change.

My problem is that at runtime the module decides to
use org.glassfish.metro.webservices-api-osgi and that fails to
find com.sun.xml.ws.spi.ProviderImpl or
com.sun.xml.internal.ws.spi.ProviderImpl. I don't understand how this is
possible, surely that module must have to have access to that class? I'm
using glassfish 3.1.

I've read a million problems with ProviderImpl and even some with osgi and
ProviderImpl, but no clear answers as to how to fix this.

I know I have some embedded dependancies and custom maven dependencies that
I probably don't need, but I'm pretty sure that's not the problem and I can
worry about that later.

Any advice as to how to fix this are appreciated, I'm completely at a loss
for what to try next. I'm more than happy to provide any additional
information or answer any questions to get to the answer.

Thanks,

Douglas

My pom:


<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/xsd/maven-4.0.0.xsd";>
<modelVersion>4.0.0</modelVersion>

<groupId>uk.ac.ox.sddag.api.osgi</groupId>
<artifactId>sifOSGiModule</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>sifOSGiModule OSGi Bundle</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cxf.version>2.2.7</cxf.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.core</artifactId>
<version>1.4.0</version>
</dependency>
 <dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>java6-api</artifactId>
<version>sif-20110624</version>
</dependency>
 <dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>bcpg</artifactId>
<version>sif-20110624</version>
</dependency>

<dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>bcprov</artifactId>
<version>sif-20110624</version>
</dependency>
 <dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>commons-codec</artifactId>
<version>sif-20110624</version>
</dependency>

<dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>commons-httpclient</artifactId>
<version>sif-20110624</version>
</dependency>

<dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>commons-logging</artifactId>
<version>sif-20110624</version>
</dependency>

<dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>jakarta-slide-webdavlib</artifactId>
<version>sif-20110624</version>
</dependency>

<dependency>
<groupId>uk.ac.ox.sddag.api</groupId>
<artifactId>jdom</artifactId>
<version>sif-20110624</version>
</dependency>
 <dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-osgi</artifactId>
<version>2.1-20</version>
</dependency>

<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.1-20</version>
</dependency>

</dependencies>

<build>
 <plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.2.0</version>
<extensions>true</extensions>
 <configuration>
<instructions>
<Import-Package>*;resolution:=optional</Import-Package>
<Bundle-Activator>uk.ac.ox.sddag.api.osgi.Activator</Bundle-Activator>
<Export-Package>uk.ac.ox.sddag.api.osgi.service</Export-Package>
<Private-Package>uk.ac.ox.sddag.api.osgi.*</Private-Package>

<Embed-Dependency>java6-api,bcpg,bcprov,commons-codec,commons-httpclient,commons-logging,jakarta-slide-webdavlib,jdom;scope=compile|runtime</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
 </configuration>
</plugin>
 <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Xms512m -Xmx512m</argLine>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>build-for-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>3.0.7</version>
<scope>provided</scope>
</dependency>
                <!-- To include a shell:
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.gogo.shell</artifactId>
                    <version>0.6.1</version>
                </dependency>
                -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>compile</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath"/>
<map from="${project.build.directory}${file.separator}classes" to=""/>
</pathconvert>
<pathconvert pathsep=" " property="bundles">
<path path="${plugins.jars}"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="file:modules/*" casesensitive="no"/>
</chainedmapper>
</mapper>
</pathconvert>
<propertyfile file="${project.build.directory}/config.properties">
<entry key="felix.auto.start" value="${bundles}
file:modules/${project.build.finalName}.jar"/>
<entry key="org.osgi.framework.bootdelegation" value="*"/>
</propertyfile>
<copy
file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}"
tofile="${project.build.directory}/felix.jar"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>create-executable-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
</descriptors>
<finalName>${project.build.finalName}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-on-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>3.0.7</version>
<scope>provided</scope>
</dependency>
                <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1
useless from Maven since stdin is swallowed -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<configuration>
<target>
<property name="vm.args" value=""/>
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath"/>
<map from="${project.build.directory}${file.separator}classes" to=""/>
</pathconvert>
<makeurl property="urls" separator=" ">
<path path="${plugins.jars}"/>
<path location="${project.build.directory}/${project.build.finalName}.jar"/>
</makeurl>
<propertyfile file="${project.build.directory}/run.properties">
<entry key="felix.auto.start" value="${urls}"/>
<entry key="felix.auto.deploy.action"
value="uninstall,install,update,start"/>
<entry key="org.osgi.framework.storage"
value="${project.build.directory}${file.separator}felix-cache"/>
<entry key="org.osgi.framework.bootdelegation" value="*"/>
</propertyfile>
<makeurl property="run.properties.url"
file="${project.build.directory}/run.properties"/>
<java fork="true"
jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
<sysproperty key="felix.config.properties" value="${run.properties.url}"/>
<jvmarg line="${vm.args}"/>
</java>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to