2 Replies Latest reply on Jul 24, 2002 10:30 AM by sir-aliman

    Problem using one datasource for entity beans and direct acc

    sir-aliman

      I want to access a database from entity beans and directly( by datasourc lookup ) by using the same datasource.
      ( Only same database not same tables.
      Each table just in one way: with beans or directly.)


      JBoss: 3.0.0-with-Tomcat
      MySQL: 3.23.49
      JDBC: org.gjt.mm.mysql 2.0.14

      on Windows2000with CMP-entity-beans.

      Sometimes, don't know why, I get the following Error from JBoss:

      11:25:03,594 ERROR [STDERR] java.rmi.ServerException: xaRes not enlisted; nested exception is:
      java.lang.IllegalArgumentException: xaRes not enlisted11:25:03,594 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:119)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:726)
      11:25:03,594 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      11:25:03,594 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      11:25:03,594 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      11:25:03,594 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      11:25:03,625 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      11:25:03,625 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      11:25:03,625 ERROR [STDERR] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      11:25:03,625 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      11:25:03,625 ERROR [STDERR] at $Proxy63.create(Unknown Source)
      ......and so on ....

      The Problem occurs when using entitybeans and direct access( over datasource ) in one method.

      I suggest that there is something wrong with my Datasource definition ( I took the "mysql-service.xml"
      coming with JBoss and edited it for using mm.mysql Driver.).

      Probably there is someone out there who knows the answer :-) ??!!