• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.ejb.EJBException: Could not instantiate bean;  RSS feed

 
Akansha Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an entity bean.
After deploying when i am running the client code the following exception is thrown.
i think the exception occurs when the beanhome calls the create() method of remote bean.
Please tell me if you have any sugegstions.
I have been stuck up with this error for last three days.


java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Could not instantiate bean; CausedByException is:
Taxonomy not bound
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:136)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:637)
at org.jboss.ejb.Container.invoke(Container.java:975)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.ejb.EJBException: Could not instantiate bean; CausedByException is:
Taxonomy not bound
at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:206)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:95)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
... 25 more
Caused by: javax.ejb.EJBException: Taxonomy not bound
at com.infosys.ihl.tfg.niffler.service.metadata.ejb.TaxonomyManagerBean.ejbCreate(TaxonomyManagerBean.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:78)
at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:49)
at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:184)
... 33 more
 
Sumit Malik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here i think you are not calling the entity bean with proper jndi name(do client code exist in the same ear )....

Well, if you can post your configuration settings then probably i can assist you in better way...

Cheers !!!
Sumit Malik
 
Verma Neeraj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi I have develop an Entity Bean but when i running the calling the client code i got the following exception :

Caught an exception.
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Could not instantiate bean
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:136)
some more.....Exceptions
Caused by: javax.ejb.EJBException: Unable to connect to database. org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource
at mypack.beans.OrderBean.setEntityContext(OrderBean.java:127)
at org.jboss.ejb.EntityEnterpriseContext.<init>(EntityEnterpriseContext.java:107)

I am not getting properly what I have missed.
Any suggestion...
Thanks in Advance

 
Devaka Cooray
Marshal
Posts: 5569
716
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niraj, welcome to JavaRanch.

I couldn't understand the problem just by looking at the stack trace. But the following statement should make sense regarding your problem.

javax.ejb.EJBException: Unable to connect to database. org.jnp.interfaces.NamingContext cannot be cast to javax.sql.DataSource

Anyway, when posting a new question again, please start a new topic instead of appending to existing topics.

Devaka.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!