We took ownership of a java web application that current runs in WebLogic. We're now trying to deploy this in Tomcat using OCP.
When we drop the .war file into the Tomcat/webapps directory, the application did not start and the error we received was:
10/06/20 13:33:02.405 [ main] ERROR ConversationAwarePrimeResourceHandler[72] =
javax.naming.NameNotFoundException: Name [BeanManager] is not bound in this Context. Unable to find [BeanManager].
at org.apache.naming.NamingContext.lookup(NamingContext.java:817)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.NamingContext.lookup(NamingContext.java:827)
at org.apache.naming.NamingContext.lookup(NamingContext.java:173)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:163)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at pax.XXXNameRemovedXXX.common.web.servlet.ConversationAwarePrimeResourceHandler.getBeanManager(ConversationAwarePrimeResourceHandler.java:60)
at pax.XXXNameRemovedXXX.common.web.servlet.ConversationAwarePrimeResourceHandler.<init>(ConversationAwarePrimeResourceHandler.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
The error did not come from the web application but from a "custom" .jar file that was build as part of the application. It seems that that code that was used in generating the jar file was not able to retrieve BeanManager.
I found instruction on how to do this for the web application: Application servers and environments supported by Weld
However, this does not seem to work for the code that generates the .jar file. This code is missing stuff like META-INF, WEB-INF, etc.
Can someone tell me how I will need to approach this?