5 Replies Latest reply on Jan 22, 2010 12:14 PM by sannegrinovero

    JBoss-ts 4.9.0.GA failing in standalone?

    sannegrinovero

      Hello,

      I'm using JBossStandaloneJTAManagerLookup as transaction manager in a standalone application using Infinispan,

      you can get it on JBoss's SVN where it was contributed as one of the Infinispan demos in Infinispan/trunk/demos/lucene-directory

      (sorry there was no test covering this, so this slipped in; to verify you'll have to start it and try adding a new line of text)

       

      This trivial application was working correctly when using version 4.6.0.GA but the Infinispan is now recommending the switch to 4.9.0.GA, which results in this exception:

       

      FATAL com.arjuna.ats.jts.logging.loggerI18N - [com.arjuna.ats.internal.jts.ORBManager] The ORB has not been initialized yet
      Exception in thread "main" com.arjuna.ats.arjuna.exceptions.FatalError
          at com.arjuna.ats.internal.jts.ORBManager.getPOA(ORBManager.java:94)
          at com.arjuna.ats.internal.jts.OTSImpleManager.<clinit>(OTSImpleManager.java:332)
          at com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.getTransaction(TransactionImple.java:1239)
          at com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple.getTransaction(TransactionManagerImple.java:74)
          at org.infinispan.context.InvocationContextContainerImpl.getRunningTx(InvocationContextContainerImpl.java:147)
          at org.infinispan.context.InvocationContextContainerImpl.createInvocationContext(InvocationContextContainerImpl.java:57)
          at org.infinispan.CacheDelegate.getInvocationContext(CacheDelegate.java:287)
          at org.infinispan.CacheDelegate.get(CacheDelegate.java:199)
          at org.infinispan.lucene.InfinispanDirectory.getFileList(InfinispanDirectory.java:220)
          at org.infinispan.lucene.InfinispanDirectory.list(InfinispanDirectory.java:96)
          at org.infinispan.lucene.InfinispanDirectory.listAll(InfinispanDirectory.java:263)
          at org.apache.lucene.index.SegmentInfos.getCurrentSegmentGeneration(SegmentInfos.java:149)
          at org.apache.lucene.index.IndexReader.indexExists(IndexReader.java:915)
          at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1519)
          at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1234)
          at org.infinispan.lucenedemo.DemoActions.addNewDocument(DemoActions.java:99)
          at org.infinispan.lucenedemo.DemoDriver.insertNewText(DemoDriver.java:70)
          at org.infinispan.lucenedemo.DemoDriver.run(DemoDriver.java:129)
          at org.infinispan.lucenedemo.DemoDriver.main(DemoDriver.java:46)

       

      Do I have a wrong configuration?

      This is all there is as configuration, very simple:

      http://fisheye.jboss.org/browse/Infinispan/trunk/demos/lucene-directory/src/main/java/org/infinispan/lucenedemo/DirectoryFactory.java?r=1278

        • 1. Re: JBoss-ts 4.9.0.GA failing in standalone?
          marklittle
          Looks like you've configured your environment to expect the JTS implementation. That means you need an ORB. I think the docs we provide should cover how you can either go about setting up that configuration or go to the local JTA implementation which does not require an ORB.
          • 2. Re: JBoss-ts 4.9.0.GA failing in standalone?
            galder.zamarreno

            Mark, in the code we do:

             

            manager = Util.loadClass("com.arjuna.ats.jta.TransactionManager").getMethod("transactionManager");
            user = Util.loadClass("com.arjuna.ats.jta.UserTransaction").getMethod("userTransaction");
            
            And we haven't changed the code for a while. So, there must be something in the JBoss-ts upgrade that now leads to JTS being used rather than JTA, even though we explicitly call up on the JTA classes.
            • 3. Re: JBoss-ts 4.9.0.GA failing in standalone?
              jhalliday

              /me bashes head on wall.

               

              That call will return the local JTA or distributed JTA (i.e. JTS/jtax) implementation of the interface depending on configuration. That is its purpose in life. You've got the wrong config file.

              • 4. Re: JBoss-ts 4.9.0.GA failing in standalone?
                galder.zamarreno
                Apologies for my ignorance but I'm not aware of Infinispan shipping any particular JBossTS configuration file. All we do related to JBossTS is whatever is in that code. So, maybe stuff has changed when there's no config file, i.e. the default impl chosen. Otherwise, what config file should I be searching for?
                • 5. Re: JBoss-ts 4.9.0.GA failing in standalone?
                  sannegrinovero

                  apologies to everyone, I was depending on jts instead of jta in the pom.xml

                  This was an older error, strange that the demo was working before when using jts at version 4.6.0; the configuretion error was revealed when upgrading.

                   

                  thanks everybody