0
  1. Application is a EAR file
  2. Shared Library where the third party jar are bundled and deployed to managed server as shared library.
  3. weblogic-application.xml file where library ref to shared library is made and present in EAR file(META-INF folder).
  4. Shared libraries are deployed to managed server as target and is successful.
  5. while deploying the EAR file, the selection of EAR from console deployment results in ClassNotFoundException of the class present in shared library even though the reference is made in weblogic-application.xml.
  6. Note that if the Library deployment is targeted to Admin Server and Managed Server the deployment of EAR file is successful without any exception.
  7. Single Admin Server deployment is working fine without any issues for the same setup.
  8. Deployment is expecting the JAR is classpath of admin server while deploying to managed server. is this an intended behavior ?

Is there any setup configuration we are missing here ? Correct me if there is any steps gone wrong. Update : we did the same deployment with ant script using wldeploy and no errors are encountered and application is deployed successfully.

shashi27
  • 189
  • 4
  • 19
  • 1
    The fact that your setup is working correctly on a single server domain makes it difficult to make any inferences. Have you made sure that your deployment follows the best practices suggested by Oracle at the bottom of this link? [Best Practices for Using Shared Java EE Libraries](https://docs.oracle.com/cd/E24329_01/web.1211/e24368/libraries.htm) – VivekRatanSinha May 09 '17 at 10:35
  • Stating the obvious: Make sure that shared library and application are targeted to the same managed server, otherwise the application will not deploy. – VivekRatanSinha May 09 '17 at 10:49
  • @VivekRatanSinha : Thanks for the comments. The shared library and application is deployed in managed server only. The link best practices suggested is followed. Question is why during the deployment is mandating shared library be present in admins server as well and to add I did the same deployment with ant script using wldeploy and no errors are encountered and still works fine. My concern is why is doesn't deploy the same way in console – shashi27 May 09 '17 at 12:22
  • If you say that the deployment of EAR and shared library on managed server is working when deployed using ant, you should update your question to reflect this. Try the following: 1. undeploy EAR and SHRDLIB. 2. shutdown the domain. 3. clear the server cache by deleting all the folders under `${domain}/servers/${AdminServer}/tmp` and `${domain}/servers/${ManagedServer}/tmp`. 4. Redeploy using console only to ManagedServer. – VivekRatanSinha May 09 '17 at 13:42

1 Answers1

0

This was a known issue in a previous version of weblogic. Maybe it is still not fixed.

CR282367

While using the WebLogic Administration Console with applications or EJBs deployed on a Managed Server that depend on a deployed library, you may encounter a java.lang.NoClassDefFoundError

Workaround: The WebLogic Server Administration Console needs access to any shared library deployments so that Java data types and annotations can be processed. Therefore, all shared library deployments should always be targeted to the Administration Server in addition to any Managed Servers or clusters.

https://docs.oracle.com/cd/E11035_01/wls100/issues/known_resolved.html

dave823
  • 1,191
  • 2
  • 15
  • 32