Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deployment error.

Status
Not open for further replies.

SnapJack

Programmer
Aug 6, 2001
25
SG
Hi
I am using Weblogic 6.1 and I am getting this error when I deploy . Please help.

Unable to deploy EJB: OrderEntity from order.jar:

java.lang.NullPointerException
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMDField(ClientDri
venBeanInfoImpl.java:666)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMethodDescriptors
(ClientDrivenBeanInfoImpl.java:723)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenB
eanInfoImpl.java:831)
at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1234)

at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:947)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
at weblogic.j2ee.Application.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy29.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy39.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)

 
Did you ever run the OrderEntity EJB through ejbc separtely? Did it build properly? If not then I would think that this is a problem that has to do with your EJB but it is impossible to tell based on this little information. BTW, even though you can drop jar in WebLogic and have it do all the stub and skeleton classes building, it is still better practice to do this yourself. You will catch these errors without having to wait for WebLogic to boot up most of the time.
 
Ok I did some more investigation. I am using weblogic 6.1
Let me explain the problem in a better manner.

I have a servlet called ControllerServlet which calls the OrderSessionBean using the normal jndi lookup. Now this session bean in turn calls the OrderEntityBean.

Ok note that the OrderEntityBean does not use the remote interface. Instead it has local interfaces. So the session bean communicates with the order entity bean using the local interface.

Ok here's a sample of what I was doing ...
In the controller Servlet

OrderHome ordHome =(OrderHome)AccessCache.lookup("OrderLocalHome");
OrderRemote ordRemote = ordHome.create();
System.out.println(ordRemote.addOrder(orderObj));

In the Order session bean
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
javax.naming.Context jndiContext = new InitialContext(p);
OrderHomeLocal home = (OrderHomeLocal) jndiContext.lookup("java:comp/env/ejb/OrderLocal");
OrderLocal cabin = home.create(orderObj);
cabin.hi("Welcome Dude");

In the order entity bean

public void hi(String test) throws EJBException
{
System.out.println("Test" +test);
}

Ok thats it all the xml files are in place and the ejb references are mentioned correctly.

Now i ran weblogic.ejbc and there was no problem.

Now when I start the server I ended up with the above exceptiom

So what I did was I decomplied the source code ClientDrivenBeanInfoImpl and added a couple of system.out.println's in the source code
and I noticed that in the below piece of code

protected void setMethodDescriptors
(BaseEJBHomeIntf baseejbhomeintf, Class var_class)
throws WLDeploymentException
{

System.out.println("var_class"+var_class);
Method[] methods = var_class.getMethods();
for (int i = 0; i < methods.length; i++)
{
Method method = methods;
System.out.println(&quot;method&quot;+methods);
................
..............

Take a look at the result.

var_classcom.covansys.tmn.ejb.order.OrderEntityBean_n77427_ELOImpl
methodpublic abstract java.lang.String com.covansys.tmn.ejb.order.OrderLocal.add
Order()

Now what is really surprising is the fact that there is no mention of the method in the OrderEntityBean or the OrderLocal interface.

So what I did was added the addOrder() method into the entity bean and the started without any exception.

But then when the action causes the controllerservlet to be called I get a new problem. Now the servlet starts complaing that it cant find the addOrder method.

java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoSuchMethodError
java.lang.NoSuchMethodError
at com.covansys.tmn.ejb.order.OrderBean_krkdiw_EOImpl.addOrder(OrderBean
_krkdiw_EOImpl.java:37)
at com.covansys.tmn.controller.ControllerServlet.addOrder(ControllerServ
let.java:161)
at com.covansys.tmn.controller.ControllerServlet.doService(ControllerSer
vlet.java:45)
at com.covansys.tmn.common.GenericServlet.checkSessionAndProceed(Generic
Servlet.java:41)
at com.covansys.tmn.common.GenericServlet.doPost(GenericServlet.java:27)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.ServletServlet.service(ServletServlet.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

I am sure that I havent understood the concept of local interface properly and I am doing something wrong while implementing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top