[JBoss Seam] - Re: Removing jaxws in ejb3-all jar
by daleth
Sure thing. This is bundled up as a war for deployment in any ol' servlet container. Our customer happens to be using Tomcat.
| META-INF/
| META-INF/MANIFEST.MF
| WEB-INF/
| WEB-INF/classes/
| WEB-INF/lib/
| images/
| layout/
| stylesheet/
| AdvancedSearch.xhtml
| AdvancedSearchResults.xhtml
| BasicSearch.xhtml
| BasicSearchResult.xhtml
| SearchResult.xhtml
| WEB-INF/classes/messages_en.properties
| WEB-INF/components.xml
| WEB-INF/faces-config.xml
| WEB-INF/lib/jrobin-1.4.0.jar
| WEB-INF/lib/mc-conf.jar
| WEB-INF/lib/portal.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-beanutils-1.7.0.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-codec-1.3.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-collections-3.1.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-digester-1.6.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-el-1.0.jar
| WEB-INF/lib/seam-1.1.0.GA-commons-lang-2.1.jar
| WEB-INF/lib/seam-1.1.0.GA-debug.jar
| WEB-INF/lib/seam-1.1.0.GA-el-api.jar
| WEB-INF/lib/seam-1.1.0.GA-el-ri.jar
| WEB-INF/lib/seam-1.1.0.GA-hibernate-all.jar
| WEB-INF/lib/seam-1.1.0.GA-httpclient-3.0.1.jar
| WEB-INF/lib/seam-1.1.0.GA-jboss-aop-jdk50.jar
| WEB-INF/lib/seam-1.1.0.GA-jboss-cache-jdk50.jar
| WEB-INF/lib/seam-1.1.0.GA-jboss-ejb3-all.bak
| WEB-INF/lib/seam-1.1.0.GA-jboss-ejb3.jar
| WEB-INF/lib/seam-1.1.0.GA-jbpm-3.1.2.jar
| WEB-INF/lib/seam-1.1.0.GA-jgroups.jar
| WEB-INF/lib/seam-1.1.0.GA-jsf-facelets.jar
| WEB-INF/lib/seam-1.1.0.GA-jstl-1.1.0.jar
| WEB-INF/lib/seam-1.1.0.GA-myfaces-api-1.1.4.jar
| WEB-INF/lib/seam-1.1.0.GA-myfaces-impl-1.1.4.jar
| WEB-INF/lib/seam-1.1.0.GA-thirdparty-all.jar
| WEB-INF/lib/seam-1.1.0.GA-ui.jar
| WEB-INF/lib/seam-1.1.0.GA.jar
| WEB-INF/lib/tomahawk-1.1.3.jar
| WEB-INF/lib/xfire-1.2.3-activation-1.1.jar
| WEB-INF/lib/xfire-1.2.3-jaxb-api-2.0.jar
| WEB-INF/lib/xfire-1.2.3-jaxb-impl-2.0.1.jar
| WEB-INF/lib/xfire-1.2.3-jaxb-xjc-2.0.1.jar
| WEB-INF/lib/xfire-1.2.3-jaxws-api-2.0.jar
| WEB-INF/lib/xfire-1.2.3-jdom-1.0.jar
| WEB-INF/lib/xfire-1.2.3-jsr181-api-1.0-M1.jar
| WEB-INF/lib/xfire-1.2.3-logging-1.0.4.jar
| WEB-INF/lib/xfire-1.2.3-stax-api-1.0.1.jar
| WEB-INF/lib/xfire-1.2.3-wsdl4j-1.5.2.jar
| WEB-INF/lib/xfire-1.2.3-wstx-asl-3.0.1.jar
| WEB-INF/lib/xfire-all-1.2.3.jar
| WEB-INF/navigation.xml
| WEB-INF/web.xml
| .... web pages ....
|
The xfire-1.2.3-jsr181.api-1.0-M1.jar is the jar that contains the WebService annotation that conflicts with the one in the EJB3 jar. Specifically I get the following error:
| Exception in thread "main" java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String;
| at org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations.getWebServiceAnnotation(Jsr181WebAnnotations.java:55)
| at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:173)
| at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:356)
| at gov.nih.nci.cagrid.portal.indexService.IndexServiceClient.createServiceDescriptor(IndexServiceClient.java:145)
| at gov.nih.nci.cagrid.portal.indexService.IndexServiceClient.<init>(IndexServiceClient.java:83)
| at gov.nih.nci.cagrid.portal.indexService.IndexServiceClientExample.main(IndexServiceClientExample.java:17)
|
This occurs if both jars are on the classpath and the EJB3 jar appears first. Unforuantely the EJB3 jar does not contain all the necessary annotations that XFire require. Here's the contents of the jsr181 jar from XFire:
| META-INF/
| META-INF/MANIFEST.MF
| javax/
| javax/jws/
| javax/jws/soap/
| javax/jws/HandlerChain.class
| javax/jws/Oneway.class
| javax/jws/WebMethod.class
| javax/jws/WebParam$Mode.class
| javax/jws/WebParam.class
| javax/jws/WebResult.class
| javax/jws/WebService.class
| javax/jws/soap/InitParam.class
| javax/jws/soap/SOAPBinding$ParameterStyle.class
| javax/jws/soap/SOAPBinding$Style.class
| javax/jws/soap/SOAPBinding$Use.class
| javax/jws/soap/SOAPBinding.class
| javax/jws/soap/SOAPMessageHandler.class
| javax/jws/soap/SOAPMessageHandlers.class
|
While I completely agree with what you've said, I'm not as worried as I might otherwise be. The EJB3 jar seems to have an incomplete version of these annotations. For example, JEE5 specifies the javax.jws.soap package which the EJB3 jar is missing (and XFire needs).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995910#3995910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995910
19 years, 4 months
[JBoss Seam] - Re: Removing jaxws in ejb3-all jar
by norman.richards@jboss.com
In general, you should not count on being able to replace/override core Java EE classes in your application. I don't know anything about XFire, but I do know that code that is intended to be run in a Java EE server should NOT have their own copy of the annotations.
So, don't add the annotation classes to your application. If there is a version compatibility between the annotations you need to either find the correct version of XFire for the Java EE version in JBoss or update jbossws.sar in JBoss to a version that works with XFire.
However, in saying that, I really find it hard to believe that they are using incompatible versions of the annotations. Are you sure the problem wasn't simply that you were providing an equivalent class with your application, causing some classloader confusion?
There are still some classloading tricks that might make this work, but it's better not to go there. Could you show your packaging so we can make sure the problem isn't just a simple packaging problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995907#3995907
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995907
19 years, 4 months