Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

While I was experimenting with different ways of packaging our web services and shared libraries, I've come across a problem where WebLogic was reporting a status of 'This Web Service is not currently available'. This was happening for a web service that was clearly put into service (Active state). I could make calls to this service without any errors, yet the WebLogic Console was throwing a hissy fit.

In addition to this, the ?WSDL link was not being shown either.
wsunavailable2.png


Eventually I tracked this issue down and it had everything to do with my packaging. My EAR layout was like this:
 EAR layout
MyWebService.ear
+-- META-INF/
| +-- MANIFEST.MF
| +-- application.xml
| +-- weblogic-application.xml
+-- lib/
| +-- myotherlib.jar
| +-- anotherlib.jar
+-- MyWebService.war


and the WAR layout was like this:
 WAR layout
MyWebService.war
+-- META-INF/
| +-- MANIFEST.MF
+-- WEB-INF/
+-- web.xml
+-- weblogic.xml
+-- classes/*


Basically the EAR file contained all the additional JARs and the WAR file had just the code for the web service itself. Since the WAR file is a module of the EAR/Application, when looking at the Testing tab of this module I'm guessing the WebLogic Console had issues resolving the necessary classes loaded at the application level. The result was that the service was reported as unavailable incorrectly.



The fix for this was to move all the 3rd party JARs into the WAR file WEB-INF/lib directory instead.

The EAR file layout was now like this:
 EAR layout
MyWebService.ear
+-- META-INF/
| +-- MANIFEST.MF
| +-- application.xml
| +-- weblogic-application.xml
+-- MyWebService.war


The WAR file layout was not like this:
 WAR layout
MyWebService.war
+-- META-INF/
| +-- MANIFEST.MF
+-- WEB-INF/
+-- web.xml
+-- weblogic.xml
+-- classes/*
+-- lib/
+-- myotherlib.jar
+-- anotherlib.jar


Once this was redeployed, the WebLogic Console was showing all the correct information and the ?WSDL link returned.
wsunavailable3.png


-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.