JBoss6 Classloading Jar Search Order - classloader

We are migrating a web application from JBoss 4.2.3 to JBoss 6. The application needs to control the order in which jars are searched for classes during classloading. This was achieved in JBoss 4.2.3 by hacking EARDeployer class in jboss.jar to add jars to the DeploymentInfo object in a specific order.
Is there a way to achieve the same result in JBoss 6?

Ales Justin over at JBoss was able to help me through this. Our conversation can be found here: Link

Related

Can Apache cxf 2.7.10 be integrated with Swagger?

I have developed Restful web service using Apache CXF 2.7.10. I am trying to integrate same with Swagger (and Swagger UI). I couldn't look up an example over the internet for the same. All the examples point to recent versions of Apache CXF.
Is the integration with Apache CXF 2.7.10 version possible? If so, can anyone please point to the steps or a working example for the same?
Note: My application is regular maven based project.
Thanks!
Why not upgrading to CXF 3? Everything is implemented there and easy to use: http://cxf.apache.org/docs/swagger2feature.html
Should be possible to backport the stuff to 2.7.x. You would need to add swagger-jaxrs dependency and customize the ApiListingResource (https://github.com/swagger-api/swagger-core/wiki/swagger-core-jax-rs-project-setup-1.5.x). I guess upgrading to CXF 3 would be much easier...

WSO2 IS 5.2.0 : CXF based JAX-RS Client in a custom PIP not working

I am trying to implement a PIP extension for WSO2 Identity Server 5.2.0, which uses a CXF baseed JAX-RS client. Unfortunately I am still getting ClassNotFound Exception, e.g.:
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.client.WebClient cannot be found by com.example.wso2.pip_1.0.0_1.0.0
In my understanding the CXF runtime einvironment is loaded through the definition in "webapp-classloading.xml". Am I missing s.th.?
Although it is for sure not the best solution, I ended up putting the CXF dependecies into the PIP bundle itself.
My hope was that this is not necessary. My code runs now, but appreciate if someone is able to point me to the preferred solution without having the CXF jars in the bundle.

jax-ws in Weblogic 10.3.5: IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions

We have a test web application deployed In Weblogic 10.3.5. The web application contains a servlet which uses jax-ws to call a web service deployed in the same weblogic.
Accessing the servlet throws the following exception:
Two classes have the same XML type name "address". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
I copied the logic of the servlet into a common java class, and ran it. The test succeeded. So the problem should lie in the web application.
I have tried many ways, modify weblogic-application.xml to add prefer-application-packages section like below, but still doesn't work.
<prefer-application-packages>
<package-name>javax.xml.ws.*</package-name>
<package-name>javax.xml.bind.*</package-name>
<package-name>javax.jws.*</package-name>
<package-name>javax.namespace.xml.*</package-name>
<package-name>javax.xml.soap.*</package-name>
<package-name>org.apache.xerces.*</package-name>
<package-name>org.apache.commons.*</package-name>
<package-name>com.sun.xml.*</package-name>
</prefer-application-packages>
Anyone can help me on this, spent several days on this bug, no progress at all.
Thanks a million for your reply in advance.
Update 1
In the web application, we don't want to use metro, just use jax-ws downloaded from java.net, and put put jaxws-rt.jar, jaxws-api.jar, jaxb and other related jars in the ear/APP-INF/lib.
WebLogic Classloader Analysis Tool (wls-cat) tells there are some classes conflict, and suggests to add prefer-application-packages in weblogic-application.xml.
So We add prefer-application-packages to tell weblogic load them from from our application, not from weblogic jax-ws/metro implmentation.
But still doesn't work.
The problem might come from the fact that you want to use Metro JaxWs in Weblogic which has it's own implementation called Oracle JaxWS (based on Metro).
Here is a link where is explained how use Metro with Weblogic :
http://metro.java.net/guide/ch02.html#weblogic-10
If you don;t use Metro and rely on Oracle JaxWS you do not have to used preferred libs or any special packaging.

Websphere 6.1 jar needed for WebService annotation

I'm using WebSphere 6.1 with the EBJ3 Feature Pack installed. Does anyone know what jar I need to include in my project from the AppServer folder of my WebSphere installation in order to be able to use the #WebService annoation? I cannot seem to find it. Thanks.
You will require either:
The webservice Feature Pack for Websphere 6.1 http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21264563
A JAXWS implementation, such the Reference Implementation http://jax-ws.java.net/
Pay attention to the order of installation of the Websphere Feature Packs
WAS_HOME/lib/j2ee.jar
Note that in WAS 7.0+, all JARs needed for development are located in WAS_HOME/dev/.
WAS_HOME/plugins/ - com.ibm.jaxws.tools_6.1.0.jar
You may also need to include com.ibm.jaxb.tools, com.ibm.ws.runtime and org.apache.axis2 jars too.

Need to run Seam Webservice on Weblogic

HI,
I am having a webservice running successfully on JBoss App Server. However, when I try deploying the webservice example on Weblogic 10.0 MP1 after making the necessary changes I get the message that "No business interface, component interface or web service endpoint interface found for Session Bean". In the generated EAR file there is no WSDL file created as well.
Is anyone able to deploy Seam Webservice on Weblogic successfully?
Thanks & Regards,
Hamid
Here are some resources that might be helpful:
From the Seam 2.0.1 GA documentation: Chapter 27. Seam on BEA's Weblogic
From the Seam 2.1.1 documentation: Chapter 39. Seam on BEA's Weblogic
From the SeamFramework knowledge base: Running Seam examples with BEA WebLogic
From the blog In relation to...: Weblogic 10, Seam, and EJB3
From the blog In relation to...: Seam Reference Guide Updated for WebLogic 10.3
Maybe you could provide more details about the steps you followed, the full stacktrace, etc.
I think this is the answer (you need have a explicity interface)