1 Reply Latest reply on Jan 30, 2002 12:45 PM by Joe

    MS SQLServer 2000 and CMP PreparedStatement Problem

    Joe Newbie

      Hello:

      I'm running jBoss 2.4.4 and I'm trying to test CMP using jaws. I have a jsp calling a stateless session bean that grabs an entity home and calls home.create().

      I get the following exception:

      [WARN,PreparedStatementFactory] Error creating prepared statement.
      java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a cloned connection while in manual transaction mode.
      at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.getImplConnection(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.getImplStatement(Unknown Source)
      at com.microsoft.jdbc.base.BaseStatement.preProcessSQL(Unknown Source)
      at com.microsoft.jdbc.base.BasePreparedStatement.(Unknown Source)
      at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
      at org.jboss.pool.jdbc.PreparedStatementFactory.createObject(Unknown Source)
      at org.jboss.pool.cache.LeastRecentlyUsedCache.addObject(Unknown Source)

      at org.jboss.pool.cache.LeastRecentlyUsedCache.getObject(Unknown Source)

      at org.jboss.pool.cache.LeastRecentlyUsedCache.useObject(Unknown Source)

      at org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.prepareStatement(Unknown Source)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:154)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:143)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:128)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:231)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:632)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:859)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:234)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:147)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:97)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:142)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:103)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:421)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:456)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:237)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
      at $Proxy6.create(Unknown Source)
      at com.zapper.ejb.session.stateless.TestSessionEJB.getTestString(Unknown Source)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:542)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:82)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:526)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:504)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
      at $Proxy3.getTestString(Unknown Source)
      at jsp.num._0002fjsp_0002fnum_0002fnumguess_0002ejspnumguess_jsp_11._jspService(_0002fjsp_0002fnum_0002fnumguess_0002ejspnumguess_jsp_11.java:149)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
      at org.apache.tomcat.core.Handler.service(Handler.java:287)
      at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
      at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
      at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      at java.lang.Thread.run(Unknown Source)

      Has anyone seen this problem? More importantly, what is the fix for this?

      Many thanks,

      Joe