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

| Views: 2822
I've had the development team on my current project come to me with a peculiar issue. They were trying to deploy one of the web services and kept on getting an unresolved library reference error every time. This struck me as odd because we deploy these services all the time without any issues. I looked into this further and discovered that the team was using the Administration Console to deploy this service, instead of using the wldeploy ant task. This is where things got interesting.

I tried deploying this service myself and received the same error. Double checking the shared libraries confirmed that they were deployed as expected.

This was the kind of error being reported in the admin server log...
 Error
<Warning> <J2EE> <BEA-160188> <Unresolved WebApp library references defined in weblogic.xml, of module 'MyService.war' [Extension-Name: my.sharedlib1, Specification-Version: 1, Implementation-Version: 1.0.1, exact-match: true].>
<Error> <J2EE> <BEA-160228> <AppMerge failed to merge your application. If you are running AppMerge on the command-line, merge again with the -verbose option for more details. See the error message(s) below.>


The Administration Console was reporting a more cryptic error...
 Error
Unable to access the selected application.

unresolvedlib.png


Now this was odd, but I had a hunch. The shared libraries were targeted to my managed server. When I changed the targets to include both my managed server and the admin server, the deployment worked. However the odd thing was the screen that asked you where to target the deployed application only appeared after the point where the deployment was failing previously.



To me it looks like WebLogic is trying to resolve library references before actually deploying the application. Since the upload via the Console happens on the admin server which doesn't have these libraries targeted, the deployment fails.

This seems like a problem with WebLogic. There should not be a need to target the shared libraries to the admin server just to be able to deploy webapps that use them. Needless to say, I removed admin server targeting and suggested that wldeploy ant task is used instead.

-i

Have comments or feedback on what I wrote? Please share them below! Found this useful? Consider sending me a small tip.
comments powered by Disqus
Other posts you may like...