On Mon, 28 May 2001, Marcel Schepers wrote:
Looks like an exception is raised inside your ejbCreate method. If a
runtime exception is raised there it will result in a transaction
rollback. It could be a NullPointerException; it usually is.
Strange though that the database contains the new information. What does
your ejbCreate method do?
> Hello,
>
> I have a question regarding an error I get. In a JSP page I use a
> regular Java bean. Some properties are set and at the end I call the
> bean's create() methode to actually create a new EJB Entity bean.
> Creating the EJB fails: I get the error attached to the end of this
> message. Now the funny part is that the database contains the new EJB
> data. The question I would like to ask you: where to look for the solution?
>
> The code I use in my regular Java access bean:
>
> public void createEJB(){
> if (DEBUG) {
> System.out.println("FormAccessBean.create() --- entry");
> } // end of if (DEBUG)
>
> try{
> String jndiName = "stam/Form";
> Broker broker = Broker.getInstance();
> FormHome formHome = (FormHome)
> broker.getHome(jndiName, FormHome.class);
> Form form = formHome.create(this.voorletters,
> this.tussenvoegsel,
> this.naam, this.adres, this.postcode,
> this.woonplaats, this.telefoonDag,
> this.telefoonAvond, this.geboortedatum,
> this.geslacht, this.email, this.groep,
> this.vrijeInvoer);
> if (DEBUG) {
> System.out.println("Form: " + form);
> } // end of if (DEBUG)
> }
> ....
> }
>
>
> I have a feeling that my mySQL transaction management is not
> configured properly. These are my mySQL settings in jboss.jcml
>
> <!-- JDBC -->
> <mbean code="org.jboss.jdbc.JdbcProvider"
> name="DefaultDomain:service=JdbcProvider">
> <attribute
>
>
>name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,org.gjt.mm.mysql.Driver</attribute>
>
>
>
> </mbean>
> <mbean code="org.jboss.jdbc.XADataSourceLoader"
> name="DefaultDomain:service=XADataSource,name=mySQLPool">
> <attribute name="PoolName">mySQLPool</attribute>
> <attribute
>
>name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
>
>
> <attribute name="Properties"></attribute>
> <attribute name="URL">jdbc:mysql://x.x.nl/stam</attribute>
> <attribute name="GCMinIdleTime">1200000</attribute>
> <attribute name="JDBCUser">x</attribute>
> <attribute name="MaxSize">10</attribute>
> <attribute name="Password">x</attribute>
> <attribute name="GCEnabled">false</attribute>
> <attribute name="InvalidateOnError">false</attribute>
> <attribute name="TimestampUsed">false</attribute>
> <attribute name="Blocking">true</attribute>
> <attribute name="GCInterval">120000</attribute>
> <attribute name="IdleTimeout">1800000</attribute>
> <attribute name="IdleTimeoutEnabled">false</attribute>
> <attribute name="LoggingEnabled">false</attribute>
> <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
> <attribute name="MinSize">0</attribute>
> </mbean>
>
> And finally, I've attached the start of the error log messages.
>
>
> [EmbeddedTomcat] FormAccessBean.create() --- entry
> [Form] TRANSACTION ROLLBACK EXCEPTION:ejbCreate: null; nested exception is:
> javax.ejb.EJBException: ejbCreate: null
> [Form] javax.ejb.EJBException: ejbCreate: null
> [Form] at nl.inpact.stam.ejb.form.FormBean.ejbCreate(FormBean.java:168)
> [Form] at java.lang.reflect.Method.invoke(Native Method)
> [Form] at
>
>org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:121)
>
>
> [Form] at
> org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
> [Form] at java.lang.reflect.Method.invoke(Native Method)
> [Form] at
>
>org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
>
>
> [Form] at
>
>org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
>
>
> [Form] at
>
>org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
>
>
> [Form] at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
>
> [Form] at
>
>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
>
> [Form] at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
> [Form] at
> org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:164)
>
> [Form] at
> org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
> [Form] at
> org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
> [Form] at
>
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:436)
>
>
> [Form] at
> org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
> [Form] at $Proxy9.create(Unknown Source)
> [Form] at
> nl.inpact.stam.ejb.form.FormAccessBean.createEJB(FormAccessBean.java:128)
> [Form] at
>
>_0002fformhandle_0002ejspformhandle_jsp_29._jspService(_0002fformhandle_0002ejspformhandle_jsp_29.java:432)
>
>
>
> Thank you,
>
> Marcel
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
-----------------------------------------------------------------------
Per Lewau ([EMAIL PROTECTED])
"Why waste time learning, when ignorance is instantaneous?"
- Hobbes
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user