Marco, no idea whether you are suffering from JDBC driver problems. Can you please create a bug report at http://bugzilla.exolab.ort, attach a working JUnit test case (minimal code), a mapping file, a JDO config file, etc. In other words, everything required to replay your problem.
Regards Werner On Mon, 22 Nov 2004 13:13:36 -0000, Marco Mistroni wrote: > >Hello, > Here it is..it was the one attached to the first message :-) > ><?xml version="1.0" ?> ><!DOCTYPE jdo-conf PUBLIC "-//EXOLAB/Castor JDO Configuration DTD >Version 1.0//EN" >"http://castor.exolab.org/jdo-conf.xsd"> > ><jdo-conf> > <database name="test" engine="mysql" > > <driver url="jdbc:mysql://localhost:3306/test" > class-name="com.mysql.jdbc.Driver"> > <param name="user" value="root" /> > <param name="password" value="mypass" /> ></driver> ><mapping href="mapping.xml" /> ></database> ><transaction-demarcation mode="local" /> ></jdo-conf> > >... > >could it possibly be that there are issues with the driver that I am >using? > >In all castor samples I always see the driver from org.gjt... > >Regards > marco > >-----Original Message----- >From: Werner Guttmann [mailto:[EMAIL PROTECTED] >Sent: 22 November 2004 11:47 >To: [EMAIL PROTECTED] >Subject: Re: [castor-user] problems with castor 0.9.6 & database.xml > > >Marco, > >your code should still be valid. Can you please post your complete >jdo-conf.xml file ? It should read along the lines: > ><jdo-conf> > <database ....> > </database> > <transaction-demarcation mode="local" /> ></jdo-conf> > >Werner > >On Mon, 22 Nov 2004 11:32:47 -0000, Marco Mistroni wrote: > >> >>Hello werner, >> well I read it (quickly :-( ) after having >>problems... >> >>But still, if I use transaction demarcation local (which I believe I >>should >>use for my junit tests..) I am still getting an exception.. >> >>>************** TRANSACTION LOCAL ******************* >>> >>>com.myapp.exceptions.PersistenceException: >>>org.exolab.castor.jdo.TransactionNotI >>>nProgressException: No transaction in progress for the current thread >>> at >>>com.myapp.castor.CastorPersistenceManager.query(CastorPersistenceMana >>>ger.java:155) >>> at >>>com.myapp.castor.CastorPersistenceManagerTest.testQueryUser(CastorPer >>>sistenceManagerTest.java:150) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>java:39) >>> at >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>sorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:324) >>> at junit.framework.TestCase.runTest(TestCase.java:154) >>> at junit.framework.TestCase.runBare(TestCase.java:127) >>> at junit.framework.TestResult$1.protect(TestResult.java:106) >>> at >junit.framework.TestResult.runProtected(TestResult.java:124) >>> at junit.framework.TestResult.run(TestResult.java:109) >>> at junit.framework.TestCase.run(TestCase.java:118) >>> at junit.framework.TestSuite.runTest(TestSuite.java:208) >>> at junit.framework.TestSuite.run(TestSuite.java:203) >>> >>> >>> >> >>so, looks like 'local transaction' is the way to go for me, but could >>you >>tell me a possible reason for the exception above? >>I am stil using the same code for inserting data into database using >JDO >> >>Database db = null; >>db = _jdo.getDatabase(); >>db.begin(); >>CastorEntry entry = (CastorEntry)data; >>db.create(data); >>db.commit(); >>log.debug("Entry created.."); >>db.close(); >> >>is that code still valid? >> >>Thanx and regards >> marco >> >> >> >>----------------------------------------------------------- >>If you wish to unsubscribe from this mailing, send mail to >>[EMAIL PROTECTED] with a subject of: >> unsubscribe castor-user >> > > > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-user > > > >----------------------------------------------------------- >If you wish to unsubscribe from this mailing, send mail to >[EMAIL PROTECTED] with a subject of: > unsubscribe castor-user > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-user
