• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ERROR [LogInterceptor] RuntimeException

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am beginner with Jboss, I using BMP to test EJB on JBoss When I run, on Jboss Server output:
setEntityContext call..,
ejbCreate call..,
and then it throw exception as below. I dont know what exceptions are? My program does nothing, just make database connection (in method setEntityContext) Please help me.
public void setEntityContext(EntityContext context) {
System.out.println("setEntityContext call...");
this.context = context;
try {
makeConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database. " + ex.getMessage());
}
}
public void ejbCreate()
{
System.out.println("ejbCreatecall...");
}
private void makeConnection() throws NamingException, SQLException { InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
con = ds.getConnection();
}
THESE ARE EXCEPTION:
16:26:47,120 ERROR [LogInterceptor] RuntimeException:
java.lang.IllegalArgumentException: Attempt to get a lock for a null object
at org.jboss.ejb.BeanLockManager.getLock(BeanLockManager.java:80)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockIntercep tor.java:99)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreation Interceptor.java:69)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte rceptor.java:107)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep torCMT.java:228)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:9 2)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
at org.jboss.ejb.Container.invoke(Container.java:712) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java: 382)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:701)
at java.lang.Thread.run(Thread.java:536)
 
reply
    Bookmark Topic Watch Topic
  • New Topic