Bugs item #637269, was opened at 2002-11-12 18:04
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=637269&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: rodelor (rodelor)
Assigned to: Adrian Brock (ejort)
Summary: Entity bean lock problem

Initial Comment:
OS: Win2k
JDK: 1.3.1_02
Database: MySQL 
3.23.51
Server trace:
.  JBoss Bootstrap Environment
.  
JBOSS_HOME: C:\jboss-tomcat\bin\..
.  JAVA: 
C:\jdk1.3.1_02\bin\java
.  JAVA_OPTS:  -
Dprogram.name=run.bat
.  CLASSPATH: 
;C:\jdk1.3.1_02\lib\tools.jar;C:\jboss-
tomcat\bin\run.jar
JBoss version: jboss-3.0.4_tomcat-
4.0.6.zip

After creating an entity via jsp, I receive an error 
when trying to use a get method or set it in a relationship. I am not 
trying to remove the entity. I am sending the ejb jar file, the war file 
and the schema in a zip for testing. The pages to try are any of the 
Client7*.jsp and 
creditcard_customer_relation.jsp.

Code 
snipet:
"
                out.print("<H2>Creating 
CreditCard</H2>");

        // set Credit Card 
info
                Calendar now = 
Calendar.getInstance();
                String dateString = 
String.valueOf(now.get(Calendar.YEAR)) + "-" + 
String.valueOf(now.get(Calendar.MONTH)) + "-" + 
String.valueOf(now.get(Calendar.DAY_OF_MONTH));

                out.print("The 
date used is " + dateString + 
"<br>");
                
                CreditCardLocal card = 
cardhome.create(dateString, "370000000000001", "John 
Smith", "O'Reilly");

                out.print("<H2>The CreditCard 
ID is " + card.getId() + 
"</H2>");
                
                
                out.print("<H2>Linking 
CreditCard and 
Customer</H2>");
                
                customer.setCreditCard(card);
"

This 
is the error:
"
09:39:03,986 ERROR [LogInterceptor] 
TransactionRolledbackLocalException, 
causedBy:
java.lang.IllegalArgumentException: Attempt 
to remove a lock for a null object
        at 
org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:103)
 
       at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:124)
 
       at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
 
       at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
 
       at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
 
       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
 
       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.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
 
       at 
org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
 
       at $Proxy475.getPrimaryKey(Unknown Source)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:552)
 
       at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:483)
 
       at 
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:126)
 
       at 
org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
 
       at 
com.titan.customer.CustomerCMP$Proxy.setCreditCard(<generated>)
 
       at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1194)
 
       at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
 
       at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:297)
 
       at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
 
       at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:90)
 
       at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
 
       at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
 
       at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
 
       at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
 
       at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
 
       at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
 
       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.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
 
       at 
org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
 
       at $Proxy473.setCreditCard(Unknown Source)
        at 
org.apache.jsp.Client_0005f71$jsp._jspService(Client_0005f71$jsp.java:207)
 
       at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 
       at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
       at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
 
       at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 
       at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 
       at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 
       at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 
       at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 
       at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 
       at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 
       at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 
       at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 
       at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 
       at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
 
       at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 
       at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 
       at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 
       at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 
       at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 
       at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 
       at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 
       at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 
       at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 
       at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 
       at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
 
       at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
 
       at java.lang.Thread.run(Thread.java:484)
"

----------------------------------------------------------------------

>Comment By: Adrian Brock (ejort)
Date: 2002-11-19 11:36

Message:
Logged In: YES 
user_id=9459

Hi,

It worked for me with latest 3.2 cvs
You had six auto-increments, I only configured the
first, so it failed further down the jsp

Regards,
Adrian

----------------------------------------------------------------------

Comment By: rodelor (rodelor)
Date: 2002-11-19 02:51

Message:
Logged In: YES 
user_id=647560

Adrian,

I have tried with the new jdbc version, but the problem still 
occurs. JBoss is inserting the records into the database, so it does not 
appear to be an auto-increment problem. I am also creating the EJBs with 
xdoclet and running them on weblogic, but no problem occurs there, 
though the same jdbc version is being used.

Robert

----------------------------------------------------------------------

Comment By: Adrian Brock (ejort)
Date: 2002-11-16 03:27

Message:
Logged In: YES 
user_id=9459

See this change note for auto-increment.

https://sourceforge.net/tracker/index.php?
func=detail&aid=611735&group_id=22866&atid=381174

For mysql, you will need version 3 of the driver
http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/jboss/thirdparty/mysql/mysql/lib/

This is used for jboss compilation, it may not be the
latest version.

Regards,
Adrian


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=637269&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to