Hello,
first of all let me say that I'm new to jBoss and EJBs in general.
I'm using the jboss_tomcat 2.0-FINAL distribution without further
configuration - so I'm using InstantDB/Hypersonic.
To get started I wrote a very simple entity bean with CMP and a
corresponding simple client. I don't know whether it's appropriate
to mail this to this list (the sources are about 3kb), so I put it
on http://www.informatik.uni-rostock.de/~jhecking/ejb/counter-sources.jar
in case you want to take a look at the sources.
After the first deployment everything works as expected.
But after a hot redeployment or after restarting the jboss server I
get the following exception whenever I try to access the entity
bean:
------------------------------ snip --------------------------------
[JAWS] java.sql.SQLException: Unexpected token: FROM in statement [SELECT name,count
FROM Counter WHERE name='test']
[JAWS] at org.hsql.Trace.getError(Trace.java:124)
[JAWS] at org.hsql.Result.<init>(Result.java:70)
[JAWS] at org.hsql.jdbcConnection.executeHSQL(jdbcConnection.java:644)
[JAWS] at org.hsql.jdbcConnection.execute(jdbcConnection.java:540)
[JAWS] at org.hsql.jdbcStatement.fetchResult(jdbcStatement.java:499)
[JAWS] at org.hsql.jdbcStatement.executeQuery(jdbcStatement.java:37)
[JAWS] at org.hsql.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:99)
[JAWS] at
org.jboss.minerva.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:70)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:58)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:158)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:77)
[JAWS] at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:150)
[JAWS] at
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:277)
[JAWS] at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:192)
[JAWS] at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:204)
[JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[JAWS] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[JAWS] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[JAWS] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[JAWS] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
[JAWS] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:163)
[JAWS] at java.lang.reflect.Method.invoke(Native Method)
[JAWS] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[JAWS] at sun.rmi.transport.Transport$1.run(Transport.java:142)
[JAWS] at java.security.AccessController.doPrivileged(Native Method)
[JAWS] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[JAWS] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[JAWS] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[JAWS] at java.lang.Thread.run(Thread.java:484)
[Counter] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception is:
java.sql.SQLException: Unexpected token: FROM in statement [SELECT name,count
FROM Counter WHERE name='test']; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.sql.SQLException: Unexpected token: FROM in statement [SELECT name,count
FROM Counter WHERE name='test']
[Counter] java.rmi.ServerException: Load failed; nested exception is:
[Counter] java.sql.SQLException: Unexpected token: FROM in statement [SELECT
name,count FROM Counter WHERE name='test']
[Counter] java.sql.SQLException: Unexpected token: FROM in statement [SELECT
name,count FROM Counter WHERE name='test']
[Counter] at org.hsql.Trace.getError(Trace.java:124)
[Counter] at org.hsql.Result.<init>(Result.java:70)
[Counter] at org.hsql.jdbcConnection.executeHSQL(jdbcConnection.java:644)
[Counter] at org.hsql.jdbcConnection.execute(jdbcConnection.java:540)
[Counter] at org.hsql.jdbcStatement.fetchResult(jdbcStatement.java:499)
[Counter] at org.hsql.jdbcStatement.executeQuery(jdbcStatement.java:37)
[Counter] at
org.hsql.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:99)
[Counter] at
org.jboss.minerva.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:70)
[Counter] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:58)
[Counter] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:158)
[Counter] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:77)
[Counter] at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:150)
[Counter] at
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:277)
[Counter] at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:192)
[Counter] at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:204)
[Counter] at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[Counter] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[Counter] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[Counter] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[Counter] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[Counter] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
[Counter] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:163)
[Counter] at java.lang.reflect.Method.invoke(Native Method)
[Counter] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[Counter] at sun.rmi.transport.Transport$1.run(Transport.java:142)
[Counter] at java.security.AccessController.doPrivileged(Native Method)
[Counter] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[Counter] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[Counter] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
[Counter] at java.lang.Thread.run(Thread.java:484)
------------------------------ snip --------------------------------
"SELECT name,count FROM Counter WHERE name='test'"
To me this looks like a perfectly valid SQL statement so what's
going on here?
bye,
Jan
--
Jan Peter Hecking [EMAIL PROTECTED]
University of Rostock Department of Computer Science
Homepage: http://www.informatik.uni-rostock.de/~jhecking
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]