简体   繁体   中英

Deploying EJB in jar file without ejb-jar.xml on weblogic

I have very old aplication (10 years - sick) that I need to deploy on weblogic server 10.3.6. I have one ear file with few subdeployed jar's with EJB classes (they contain both weblogic-ejb-jar.xml + ejb-jar.xml). It deploys normally on sever and I can use "lookup" function in weblogic.

The problem is that there is another jar (much older) without ejb-jar.xml that is needed to run this aplication. It have for example ObjectHome.class which is called with "lookup" function in weblogic. For now I've added it in CLASSPATH in weblogic but I still need to somehow deploy it on server so it can be retrived by "lookup" function.

Any ideas how to achive that?

javax.naming.NameNotFoundException: While trying to lookup 'pl.com.project.ejb.IdentyficatorHome' didn't find subcontext 'IdentyficatorHome'. Resolved 'pl.com.project'; remaining name 'ejb/IdentyficatorHome' at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139) at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247) at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:412) at javax.naming.InitialContext.lookup(Unknown Source)

How was the old JAR assembled and how was it used before in the old container? I would think, if it is a J2EE 1.x EJB, there must be a deployment descriptor for it somewhere?

If not, your only options are either creating a deployment descriptor according to your current weblogic server or - if possible - migrate the old code to a newer EE version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM