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

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...
<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...
Unable to access the selected application.


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.


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.