Marco,

you did read the release notes at 

http://brainopolis.dnsalias.com/castorwiki/Wiki.jsp?page=ReleaseNotes096

especially the section about the reworked layout of the JDO configuration file ?

Regards
Werner

On Mon, 22 Nov 2004 09:23:54 -0000, Marco Mistroni wrote:

>Hello,
>       I have downloaded castor 0.9.6 and I am trying to get it at
>work..
>But I am currently finding problems in running my junit tests..
>
>I am using Maven to build my application and whenever I run tests that
>Involves castorJDO I am experiencing problems...mostly related with the
>Transaction element declared in jdo-conf.
>
>******Whem I don't define transaction element in jdo-conf, I am
>receiving ******following exception
>
>org.exolab.castor.jdo.PersistenceException: Problem obtaining
>transaction manage
>r demarcation configuration
>2004-11-21 16:21:41,005 ERROR
>com.myapp.castor.CastorPersistenceManagerTest [ma
>in]  - Exception in testQueryExpenseType
>com.myapp.exceptions.PersistenceException:
>org.exolab.castor.jdo.PersistenceExce
>ption: Problem obtaining transaction manager demarcation configuration
>        at
>com.myapp.castor.CastorPersistenceManager.query(CastorPersistenceMana
>ger.java:155)
>        at
>com.myapp.castor.CastorPersistenceManagerTest.testQueryExpenseType(Ca
>storPersistenceManagerTest.java:165)
>        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)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
>tTestRunner.java:325)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JU
>nitTask.java:848)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
>ask.java:556)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
>ask.java:532)
>        at org.apache.tools.ant.Task.perform(Task.java:341)
>        at
>org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
>        at
>org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
>org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
>org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
>        at
>org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
>org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
>org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
>com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
>        at com.werken.werkz.Goal.fire(Goal.java:639)
>        at com.werken.werkz.Goal.attain(Goal.java:575)
>        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
>        at com.werken.werkz.Goal.attain(Goal.java:573)
>        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
>        at com.werken.werkz.Goal.attain(Goal.java:573)
>        at
>com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
>        at
>com.werken.werkz.jelly.AttainGoalTag.doTag(AttainGoalTag.java:134)
>        at
>org.apache.maven.jelly.tags.werkz.LazyAttainGoalTag.doTag(LazyAttainG
>oalTag.java:107)
>        at
>org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
>org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
>org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
>com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
>        at com.werken.werkz.Goal.fire(Goal.java:639)
>        at com.werken.werkz.Goal.attain(Goal.java:575)
>        at
>org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
>448)
>        at
>org.apache.maven.MavenSession.attainGoals(MavenSession.java:360)
>        at
>org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag.java:37
>8)
>        at
>org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
>        at
>org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>        at
>org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
>        at
>com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
>        at com.werken.werkz.Goal.fire(Goal.java:639)
>        at com.werken.werkz.Goal.attain(Goal.java:575)
>        at
>org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
>448)
>        at
>org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
>        at org.apache.maven.cli.App.doMain(App.java:543)
>        at org.apache.maven.cli.App.main(App.java:1109)
>        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 com.werken.forehead.Forehead.run(Forehead.java:551)
>        at com.werken.forehead.Forehead.main(Forehead.java:581)
>Caused by: org.exolab.castor.jdo.PersistenceException: Problem obtaining
>transac
>tion manager demarcation configuration
>        at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:586)
>        at
>com.myapp.castor.CastorPersistenceManager.query(CastorPersistenceMana
>ger.java:143)
>        ... 61 more
>Caused by:
>org.exolab.castor.jdo.transactionmanager.TransactionManagerAcquireExc
>eption: Problem obtaining transaction manager demarcation configuration
>        at
>org.exolab.castor.jdo.transactionmanager.TransactionManagerFactoryReg
>istry.load(TransactionManagerFactoryRegistry.java:163)
>        at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:583)
>
>********** WHEN TRANSACTION DEFINED GLOBAL**********
>com.myapp.exceptions.PersistenceException:
>org.exolab.castor.jdo.PersistenceExce
>ption: Problem obtaining required transaction manager configuration.
>        at
>com.myapp.castor.CastorPersistenceManager.query(CastorPersistenceMana
>ger.java:155)
>        at
>com.myapp.castor.CastorPersistenceManagerTest.testQueryByType(CastorP
>ersistenceManagerTest.java:194)
>        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)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
>tTestRunner.java:325)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JU
>nitTask.java:848)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
>ask.java:556)
>        at
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
>ask.java:532)
>        at org.apache.tools.ant.Task.perform(Task.java:341)
>
>************** 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)
>
>
>
>can anyone suggest me a way to solve this problem? I am sure that maybe
>if I run the code within an application server, it might work, but I
>have to pass
>junit tests before....
>
>thanx in advance and regards
>       marco
>
>
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to