Thanks, Justin, for the quick response. I had hoped that there would be simularities between the two issues, but I don't see any other than the error message. I am using PostGre on the same machine as JBoss. I have other code that does something very simular to yours without issue. I guess you have also had better luck on PostGre. I wish I could figure out how to generate the error in a test bean. All my tests are successful.
Are you doing any operations on the bean or directly to the records prior to accessing them with the finder method? For me, it only happens when I have just created the bean. It is as if the findByPrimaryKey method is being handed a reference to the bean before it has completed the previous transaction. That would explain why I get the Tx error and why the record never makes it into the DB even though the RequiresNew method successfully completed. I even tried using the Remote interface instead of the local with the same results. On Tuesday 21 May 2002 11:42 am, Justin Casp wrote: > Jon, > Here is the original forum post that I found that talks about the same > error in a similar case: > http://main.jboss.org/forums/thread.jsp?forum=47&thread=11678 > > they talked about messing with the AutoCommit property of the oracle > driver. I'm not sure if our problems are related to this or not, as I don't > know the scope of this particular error message (although it seems sort of > generic). > > the bean that is having the problems has the following attributes in the > <enterprise-beans> section of its dd: > <entity> > <ejb-name>CSRequestBean</ejb-name> > ... > <persistence-type>Container</persistence-type> > <prim-key-class>java.lang.String</prim-key-class> > <reentrant>False</reentrant> > <cmp-version>2.x</cmp-version> > <abstract-schema-name>CSRequest</abstract-schema-name> > ... > </entity> > and the following <container-transaction> section of its dd: > <container-transaction> > <method> > <ejb-name>CSRequestBean</ejb-name> > <method-name>*</method-name> > </method> > <trans-attribute>Required</trans-attribute> > </container-transaction> > > the session bean that calls this entity bean does so in the following > manner: (paraphrased for clarity, there is actually a subroutine that > assigns all the properties of the bean to the view object inside the for > loop) > > Collection c = csrHome.findAll(); > Collection result = new Vector(); > System.out.println("result size: " + c.size()); > for(Iterator i = c.iterator(); i.hasNext();) { > LocalCSRequest csr = (LocalCSRequest)i.next(); > CSRViewObject vo = new CSRViewObject(); > vo.csRequestID = csr.getCSRequestID(); /* This line fails, see stack > trace below ( $Proxy38.getCSRequestID ) */ > ... > result.add(vo); > } > return result; > > > so basically once i get a reference to the bean and use the local interface > to call one of the bean's get() methods, the transaction exception is > thrown. this entity bean is actually very simple, nothing more than a few > abstract accessors and the required ejb methods. I'm not doing anything > fancy here. > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user