Has anyone been able to successfully use the prefer-web-inf-classes setting to pickup the new QName.class from the qname.jar? This has not worked for me so I followed up with BEA support - below is the response I just got this morning: CASE_ID_NUM: 736484 CASE TITLE: Having a problems using the pref-web-inf-classes setting to true.
MESSAGE: Hi Mike, Further to our discussion, I found a CR related to this issue : CR306989 (WLS 8.1 sp 6 ) & CR136750 (WLS 8.1 sp 2) THis prooblem seems to be existing in all servicepacks of WLS 8.1 Here are the details of the CR : Observations: There are three scenarios 1. If you don't add the current version of the QName-class to your classpath, this is what happens: java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;) 2. If the qname.jar with the current version of QName is added to the lib directory of the web application and weblogic is instructed (prefer-web-inf-classes in weblogic.xml) to prefer the libs from the .WAR. Testing with the new prefixed QName constructor from the qname.jar in the lib of this .WAR Fails with: java.lang.LinkageError: loader constraints violated when linking javax/xml/namespace/QName class unless youput qname.jar AHEAD OF weblogic.jar in the classpath! Complete stacktrace: java.lang.LinkageError: loader 3. Now, because the given URL is invalid, the service can't be created. This is the proper exception when qname.jar is placed ahead of weblogic.jar in the classpath and qname is NOT being loaded from the .WAR Stacktrace=javax.xml.rpc.JAXRPCException: failed to create service at weblogic.webservice.core.rpc.ServiceImpl.getWebService(ServiceImpl.java:123) at weblogic.webservice.core.rpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:42) at * ch.suva.qnameservlet.QnameServlet.doGet(QnameServlet.java:44) at * javax.servlet.http.HttpServlet.service Reason : The javax.xml.namespace.QName class packaged in WLS 8.1SP3 "weblogic.jar" doesn't have a 3-arg constructor which is the reason behind the NoSuchMethodError. However in WLS 9.0 which is the next Release does have this 3-arg constructor, hence you shouldn't be hitting this issue there Resolution / workaround: The XMLBeans JAR files are using one version of the class, javax.xml.namespace.QName. However, WebLogic has its own _older_version of the same class in weblogic.jar. The older version is being used instead of the latest version. The only way to make sure WebLogic uses a newer QName is to make sure, a newer QName-Class is loaded ahead of weblogic.jar in the CLASSPATH. Please use the latest qname.jar ahead of Weblogic.jar in CLASSPATH If this is true, then the XFire should be updated to indicate that the only solution is to put the qname.jar at the front of the classpath. _________________________________________________________________ See what you’re getting into…before you go there http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_preview_0507
