> <dependency>
> <groupId>javax.xml</groupId>
> <artifactId>jaxb-api</artifactId>
> <version>2.1</version>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.0.3</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <version>2.0.3</version>
> </dependency>
>   </dependencies>

Umm...   jaxb-api is 2.1, but you are including 2.0.x versions of jaxb-impl 
and xjc....   That definitely won't work.

I would recommend 2.1 api jar and 2.1.7 versions for jaxb-impl and jaxb-xjc.  
(there are bugs in 2.1.8 that may prevent it from working with CXF)   Either 
that or remove those deps from your pom and let maven resolve them 
transitively from the cxf deps.  (and update to cxf 2.1.3 while you are at 
it)


Dan



On Tuesday 11 November 2008 4:17:28 pm Kent Närling wrote:
> Hi!
> I am trying to make a CXF webservice package in maven.
>
> But it seems SO darn difficult to get the right dependencies!
>
> Either classes are missing or I get stupid collissions...
>
> Anyone have tips what dependencies to declare to be able to deploy a CXF
> war file on a fresh installed tomcat (5.5.27)?
>
> Currently we have the following declared in a "webservices deps" POM
> project (which we then depend on):
> <properties>
> <cxf.version>2.1.1</cxf.version>
> </properties>
>
> <dependencies>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-core</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-simple</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-frontend-jaxws</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-databinding-aegis</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-local</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-http</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-http-jetty</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-transports-jms</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-management</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-common-utilities</artifactId>
> <version>${cxf.version}</version>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>2.4</version>
> </dependency>
> <dependency>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>jetty</artifactId>
> <version>6.1.11</version>
> </dependency>
> <dependency>
> <groupId>javax.xml</groupId>
> <artifactId>jaxb-api</artifactId>
> <version>2.1</version>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.0.3</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> <version>2.0.3</version>
> </dependency>
>   </dependencies>
>
>
> And with that I get the following error in tomcat:
> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
> Oddly enough, this class IS included in the war inside
> WEB-INF\lib\jaxb-impl-2.1.3.jar ??
>
> Anyone have ideas?
>
> Also, anyone have recommendations regarding what dependencies to bundle
> inside a war file?
>
> It seems you either include almost nothing (depend on the container) or you
> include all.
> Naturally, the latter leads to bigger WAR files... but that should be
> offset by simpler installs and easier to manage dependencies?



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to