db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Adams <monoco...@gmail.com>
Subject Re: Not creating database and executeQuery() errors with Hibernate+Spring+Atomikos
Date Tue, 02 Dec 2008 21:57:20 GMT

Something interesting is that when I start the Derby database from the
Windows XP start menu (Start->Sun Microsystems->Java EE 5 SDK->Start Java
DB) then I get a different result when accessing the DB as a network server
(port 1527):

could not insert: [com.myproject.lifecycle.persistence.entity.ServiceHost]
org.hibernate.exception.GenericJDBCException: could not insert:
[com.myproject.lifecycle.persistence.entity.ServiceHost]
        at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
        at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
        at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2267)
        at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)
        at
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:56)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
        at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
        at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
        at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
        at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
        at
com.sun.network.lifecycle.persistence.dao.GenericDaoHibernateImpl.flush(GenericDaoHibernateImpl.java:177)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy22.flush(Unknown Source)
        at
com.myproject.lifecycle.persistence.dao.ServiceHostDaoTest.testSaveDeleteFindAll(ServiceHostDaoTest.java:43)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
Caused by: com.atomikos.jdbc.AtomikosSQLException
        at
com.atomikos.jdbc.AtomikosSQLException.throwAtomikosSQLException(AtomikosSQLException.java:19)
        at
com.atomikos.jdbc.ConnectionProxy.invoke(ConnectionProxy.java:161)
        at $Proxy19.prepareStatement(Unknown Source)
        at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
        at
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
        at
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
        at
org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222)
        at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2224)
Caused by: java.lang.reflect.InvocationTargetException
        at
com.atomikos.jdbc.ConnectionProxy.invoke(ConnectionProxy.java:155)
Caused by: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "/"
at line 1, column 1.
        at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown
Source)
        at org.apache.derby.client.am.SqlException.getSQLException(Unknown
Source)
        at org.apache.derby.client.am.Connection.prepareStatement(Unknown
Source)
        at
org.apache.derby.client.am.LogicalConnection.prepareStatement(Unknown
Source)
Caused by: org.apache.derby.client.am.SqlException: Syntax error:
Encountered "/" at line 1, column 1.
        at org.apache.derby.client.am.Statement.completeSqlca(Unknown
Source)
        at
org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown
Source)
        at
org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown
Source)
        at
org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown
Source)
        at
org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown
Source)
        at
org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown
Source)
        at
org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown
Source)
        at
org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown
Source)
        at
org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown
Source)
        at org.apache.derby.client.am.PreparedStatement.prepare(Unknown
Source)
        at org.apache.derby.client.am.Connection.prepareStatementX(Unknown
Source)


-- 
View this message in context: http://www.nabble.com/Not-creating-database-and-executeQuery%28%29-errors-with-Hibernate%2BSpring%2BAtomikos-tp20801068p20801896.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message