javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDB
Hi!!!
I have a problem while I'm trying to create CMP Entity Beans. I got these CMP Entity Beans using Netbeans IDE 5.0, getting the beans from an SQL Server 2000 database.
I got this error:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK:vmcid: 0x2000 minor code: 1806 completed: Maybe
com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:207)
com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:651)
javax.rmi.CORBA.Util.wrapException(Util.java:279)
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInv ocationHandlerImpl.java:177)
com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
session._SesionRemote_DynamicStub.getClienteInfo(_SesionRemote_DynamicStub.java )
web.ClientDetails.processRequest(ClientDetails.java:43)
web.ClientDetails.doGet(ClientDetails.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
And my code is:
package session;
import javax.ejb.*;
/**
* This is the bean class for the SesionBean enterprise bean.
* Created 26-sep-2006 17:58:35
* @author DSalvat
*/
publicclass SesionBeanimplements SessionBean, SesionRemoteBusiness{
private SessionContext context;
private data.ClientepruebaLocalHome cliente;
// <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
// TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise bean, Web services)
// TODO Add business methods or web service operations
/**
* @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
*/
publicvoid setSessionContext(SessionContext aContext){
context = aContext;
}
/**
* @see javax.ejb.SessionBean#ejbActivate()
*/
publicvoid ejbActivate(){
}
/**
* @see javax.ejb.SessionBean#ejbPassivate()
*/
publicvoid ejbPassivate(){
}
/**
* @see javax.ejb.SessionBean#ejbRemove()
*/
publicvoid ejbRemove(){
}
// </editor-fold>
/**
* See section 7.10.3 of the EJB 2.0 specification
* See section 7.11.3 of the EJB 2.1 specification
*/
publicvoid ejbCreate(){
// TODO implement ejbCreate if necessary, acquire resources
// This method has access to the JNDI context so resource aquisition
// spanning all methods can be performed here such as home interfaces
// and data sources.
cliente = lookupClientepruebaBean();
}
// Add business logic below. (Right-click in editor and choose
// "EJB Methods > Add Business Method" or "Web Service > Add Operation")
private data.ClientepruebaLocalHome lookupClientepruebaBean(){
try{
javax.naming.Context c =new javax.naming.InitialContext();
data.ClientepruebaLocalHome rv = (data.ClientepruebaLocalHome) c.lookup("java:comp/env/ejb/ClientepruebaBean");
return rv;
}
catch(javax.naming.NamingException ne){
java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
thrownew RuntimeException(ne);
}
}
public String getClienteInfo(String NIF)throws javax.ejb.FinderException
{
data.ClientepruebaLocal cli = cliente.findByPrimaryKey(NIF);
return cli.getNombre();
}
I've seen a lot of posts, but I can't find my error.
Can you help me?
Thanks a lot.

