0 Replies Latest reply on Mar 18, 2003 6:02 PM by Tad Hitchcock

    An unusual sybase error, has anyone seen this?

    Tad Hitchcock Newbie

      I am a complete n00b to jBoss, I bought the CMP book (actually all of them) and have manage to work through the common problems users seem to have with the jboss/sybase combination. I am using Sybase 12.5.1 on AIX, JBoss 3.0.6 (without tomcat) on WinXP (with sun jdk 1.4.1_02) and jconnect 5.5 for a JDBC driver. I have converted the gangster example to use sybase and it seems to be correct with the exception of the following error when I run "ant setup" to populate the tables:

      17:26:37,653 DEBUG [OrganizationEJB] Executing SQL: SELECT COUNT(*) FROM organization WHERE name=?
      17:26:37,683 DEBUG [OrganizationEJB] Executing SQL: INSERT INTO organization (name, descrip, the_boss) VALUES (?, ?, ?)
      17:26:37,703 DEBUG [OrganizationEJB] Rows affected = 1
      17:26:37,703 INFO [GangsterBean$Proxy] Creating Gangster 0 'Bodyguard' Yojimbo
      17:26:37,703 DEBUG [GangsterEJB] Create: pk=0
      17:26:37,703 DEBUG [GangsterEJB] Executing SQL: SELECT COUNT(*) FROM gangster WHERE id=?
      17:26:37,713 DEBUG [GangsterEJB] Executing SQL: INSERT INTO gangster (id, name, nick_name, badness, cell_area, cell_exch, cell_ext, page_area, pag
      e_exch, page_ext, email, hangout, organization) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
      17:26:37,863 ERROR [GangsterEJB] Could not create entity
      com.sybase.jdbc2.jdbc.SybSQLException: Cannot run this command because Java services are not enabled. A user with System Administrator (SA) role must reconfigure the system to enable Java.

      at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636)
      at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996)
      at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
      at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
      at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
      at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1615)
      at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1598)
      at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:196)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
      at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:62)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy34.create(Unknown Source)
      at org.jboss.docs.cmp2.crimeportal.CrimePortalSetUp.testSetUp(CrimePortalSetUp.java:57)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:166)
      at junit.framework.TestCase.runBare(TestCase.java:140)
      at net.sourceforge.junitejb.EJBTestCase.runBare(EJBTestCase.java:133)
      at net.sourceforge.junitejb.EJBTestRunnerBean.runTestCase(EJBTestRunnerBean.java:102)
      at net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerBean.java:44)
      at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:712)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)

      I have installed the stored procs etc. from jconnect using the sql_server12.5.sql that was provided and my other java based apps work fine. The "enable java services" exception that is thrown refers to a sybase product that runs on the database server using shared memory with the server process..., I should not need this. Have any sybase users encountered this error before? THe only unique/uncommon thing I notice is that the Gangster bean uses DVCs, but, I dont see anything in the sql the container generated that should trigger this exception?

      On an unrelated subject (hopefully) when I configure the datasource to use a security realm I recieve the often posted SET CHAINED error (this is with the patched jboss-local-jdbc.rar). Also, when I use the Jboss/tomcat version... I cannot get any datasources to work with or without the security realm. TIA for any ideas/pointers.