0
votes

I have a ear which contains EJB's and war file and this ear is deployed in weblogic server

Now I have a jar which is a dependency for classes inside and outside war.

When I include this dependency in app/lib and web-inf/lib and deployed it in weblogic server I get an exception saying class not found. Now when I exclude the jar from App-INF removing the EJB which is dependent on this jar and deploy it . It works fine.

Is there any way I put dependency in APP-INF and WEB-INf and still this works fine.

1

1 Answers

0
votes

You want your JAR to be present on APP-INF/lib level of the EAR. This way, the WAR will automatically see the JAR as well. You should then not need your JAR within the WAR.

Otherwise, search for "Optional Package" here and with Oracle. You can deploy your JAR and have the EAR and WAR refer to it.