Ok... Here are my steps to resolve this under WL9.2. These may be similar to yours but I am going to list them out in detail. These steps allowed me to work with Axis2 + Hibernate 3.2 + WL 9.2 without encountering some of the linkage errors I experienced:

1. Build and pack up Axis2.war per Axis2 build instructions. This means building the Axis2 web app with the requisite ant task (create.war). 2. Explode the newly built Axis2.war file and modify some of the configuration settings appropriate for WL 9.x. These modifications include the following for the web app:
   - Add weblogic.xml containing "prefer-web-inf-classes" to Axis2/WEB-INF/
3. Create a new repository location to house Axis2 service archives and modules.
4. Modify Axis2's web.xml to point to the newly created repository location.
- Clean up by removing Axis2's predefined repository OR move predefined modules and services to your new location. - If predefined modules and services are moved, make sure to define the modules and services in their respective *.list file in the repository.
5. Create an EAR to house your modified Axis2 web application.
6. Add weblogic-application.xml containing classloader filters to the EARs deployment. My prefered package filters defined in weblogic-application.xml include the following:

<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90";>
 <prefer-application-packages>
   <package-name>com.ctc.wstx.*</package-name>
   <package-name>javax.xml.*</package-name>
   <package-name>org.apache.*</package-name>
   <package-name>org.xml.sax.*</package-name>
 </prefer-application-packages>
</weblogic-application>

I had to add org.xml.sax.* to get around linkage errors related to Class org/xml/sax/EntityResolver when parsing hibernate configurations. If there is a better solution, please advise!

7. Pack up your EAR and deploy it to a WL instance.

Assuming you've deployed your Axis2 EAR and everything starts up correctly, you should be able to see Axis' admin pages, etc... You can now build and deploy your new service archives and modules. Assuming you have a new service to deploy:

8. Copy your archive to the new repository location.
9. Modify your *.list file to add the new archive appropriately.

Note: I needed to deploy my service archive as exploded. This was the only way that some dependent libs were found. For example, Hibernate barked that it could not load proxies for my domain objects b/c it was unable to find net.sf.cglib.proxy.Enhancer.*. This caused ClassNotFoundException for net.sf.cglib.proxy.Enhancer$Enhancer Key. I don't mind deploying exploded service archives, but if there is a better approach, please advise!

10. Run your service.

So far, this seems to work out for me. I will continue to test. If I run into anything, I will note it. If anyone has any suggestions, please pass them on.

Thanks!

Al

Sunny44 wrote:
Al,

here is the solution

1> DO NOT define anything under classpath.
2> in web.xml modify the AxisServlet Mapping with 2 additional lines <param-name>axis2.repository.path</param-name>
<!-- For Local Environment -->
                <param-value><SERVER_LOCATION WHERE AXIS2 WAR DEployed>
\WEB-INF</param-value>
3> Under WEB-INF You should have Service and module folder
4> Modify the Service.list to include your AAR file (Should be on differen
lines)
5> Include all JAR files under lib directory.
6> Deploy exploded AXIS2.war file.

It is working for me now.

Good luck...









Alejandro Calbazana-2 wrote:
Hmmm, I understood the documentation to suggest a way to address the "lack of namespacing" on serialized items issue presented in WL9.0. It's not clear how/if this relates to the LinkageError exceptions we are getting back.


Sunny44 wrote:
Al,

I do agree with you.. But now i am getting confuse with Step 2 idetified in this article and i
believe that is what we want to is "Filtering Classloader"
http://ws.apache.org/axis2/1_2/app_server.html

How someone achieved it that is what i want to learn as well.

Sunny




Alejandro Calbazana-2 wrote:
Hey, I've been experiencing LinkageError exceptions under WL9.1 and WL9.2. Can anyone shed light on this? This is apparently a class loader issue, but I have all the "prefer-web-inf-classes" related settings in place. Wouldn't weblogic-application.xml apply only to EAR deployments?!

I get the following:

Caused by: java.lang.LinkageError: Class org/xml/sax/EntityResolver violates loader constraints
       at org.dom4j.io.SAXReader.read(SAXReader.java:447)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1366) at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
...

Any help is appreciated!

Al



Sunny44 wrote:
If anyone of you have added the weblogic-application.xml to the
axis2.war
file then please throws the instruction for the creation along with the
sample.

I am deploying an Axis2.war on 8.1 sp4 server i am able to see my
service
on
the UI able to browse the WSDL also but when i make the call to web
service
i get an error

java.lang.LinkageError: loader constraints violated when linking
javax/xml/stream/XMLStreamReader class

Which i believe is STAX conflict which can be resolved by
weblogi-application.xml.

If my undertanding is not correct and the solution is different then
advice
me otherwise please let me know where and HOW should i get the
weblogic-application.xml in WAR file.

thanks
Sunny
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to