Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Web Services
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Web Services
Missing CXF plugins??
sam White
Ranch Hand
Posts: 229
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have written a simple CXF2 web service application based on CXF2 and spring 3, glassfish3.1 using
maven
2.
However I encountered the following error during the deployment process:
Root WebApplicationContext: initialization started INFO: Refreshing Root WebApplicationContext: startup date [Thu Aug 18 13:45:58 EST 2011]; root of context hierarchy INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/beans.xml] INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] ERROR: Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-soap.xml] Offending resource: ServletContext resource [/WEB-INF/beans.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-soap.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-soap.xml] cannot be opened because it does not exist
My beans.xml file is shown as below:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <jaxws:endpoint id="orderProcess" implementor="ix.service.order.service.OrderProcessImpl" wsdlLocation="wsdl/orderprocess.wsdl" address="/orderprocess"> <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature" /> </jaxws:features> </jaxws:endpoint> </beans>
pom.xml file:
<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>ix.service</groupId> <artifactId>order-ws</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <properties> <cxf.version>2.1.1</cxf.version> <servlet-api.version>2.5</servlet-api.version> <portlet-api.version>2.0</portlet-api.version> <jstl.version>1.1.2</jstl.version> <spring.version>3.0.5.RELEASE</spring.version> <aspectj.version>1.6.6</aspectj.version> <commons-logging.version>1.1</commons-logging.version> <commons-io.version>1.3</commons-io.version> <commons-fileupload.version>1.2</commons-fileupload.version> <log4j.version>1.2.14</log4j.version> <liferay.version>5.2.8</liferay.version> <liferay.home>${env.HOME}/ixsystems/msp/workspace/bundles</liferay.home> <catalina.base>${liferay.home}/tomcat</catalina.base> <liferay.deploy.dir>${liferay.home}/deploy</liferay.deploy.dir> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc-portlet</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>1.8.0.10</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.3.1.GA</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>javax.transaction</groupId> <artifactId>transaction-api</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle-jaxrs</artifactId> <!-- 2.3.5 or 2.4.1 --> <version>2.4.1</version> <exclusions> <exclusion> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-server</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration> <workingDirectory>src/main/webapp</workingDirectory> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-java2ws-plugin</artifactId> <version>${cxf.version}</version> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> </dependencies> <executions> <execution> <id>generate-test-sources</id> <phase>generate-test-sources</phase> <configuration> <className>ix.service.order.service.OrderProcess</className> <genWsdl>true</genWsdl> <verbose>true</verbose> </configuration> <goals> <goal>java2ws</goal> </goals> </execution> </executions> </plugin>
web.xml file:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>order-cxf-ws</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <servlet> <description>Order Apache CXF Endpoint</description> <display-name>cxf</display-name> <servlet-name>cxf</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cxf</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <session-config> <session-timeout>60</session-timeout> </session-config> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/beans.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app>
You suggestion is very appreciated.
Sam
sam White
Ranch Hand
Posts: 229
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello
After put in more CXF dependencies in the pom.xml file, I am able to pass it and failed with the following error:
Caused by: java.io.FileNotFoundException: C:\Users\sam\.netbeans\7.0rc2\config\GF3\domain1\wsdl\OrderProcess.wsdl (系统找不到指定的路径。)
I've looked at the following Glassfish path:
C:\Users\sam\.netbeans\7.0rc2\config\GF3\domain1
the wsdl\ folder is not there.
What should I configure my project (eg. web.xml or pom.xml ) so that I can also deploy wsdl\OrderProcess.wsdl to glassfish server?
Thanks a lot
Sam
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Where is my wsdl path?
Could not resolve dependencies
Could not resolve dependencies for maven project
Incorrect hibernate version or maven ignore and didn't download hibernate jar file.
How to change jetty binding port number in maven.
More...