You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Zied Hamdi (JIRA)" <ji...@apache.org> on 2007/04/25 14:35:15 UTC

[jira] Created: (DERBY-2590) error in error message

error in error message
----------------------

                 Key: DERBY-2590
                 URL: https://issues.apache.org/jira/browse/DERBY-2590
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.1.3.1
         Environment: nothing special, the request is totally generated by JPA through hibernate
            Reporter: Zied Hamdi


I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long

Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
SQL Error: -99999, SQLState: null
Invalid argument: parameter index 11 is out of range.
Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
        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:52)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
        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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
        at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
        at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
        at $Proxy48.create(Unknown Source)
        at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
        at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
        at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
        at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
        at org.hibernate.type.LongType.set(LongType.java:42)
        at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
        at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
        at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
        at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
        ... 46 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Zied Hamdi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491887 ] 

Zied Hamdi commented on DERBY-2590:
-----------------------------------

Yes surely Dyre, this issue shouldn't even have been open. I'm sorry again,
I trusted Hibernate more than JavaDB and I was completely wrong ;-).



-- 
Zied Hamdi
zatreex.sourceforge.net

Rejoindre mon réseau de contacts sur Viadeo :
http://www.viadeo.com/invitationpersonnelle/0022cbh9e10sm7n


> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491658 ] 

Dyre Tjeldvoll commented on DERBY-2590:
---------------------------------------

I won't rule out anything, but I would be very surprised if Derby "just happened" to change 10 to 11 in this case.
But this should be easy enough for you to verify. Just stop at the place in the Hibernate code where it makes the call to 
PreparedStatement.setLong() and see which index is used... (in the variables tab in NetBeans).

> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Zied Hamdi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491664 ] 

Zied Hamdi commented on DERBY-2590:
-----------------------------------

Yes Dyre you were right,

The error comes from hibernate, it really calls with an index of 11, sorry
for disturbing, you're out of the scope :-).

Now I just have to undrestand why hibernate makes such a call.

To be continued on the Hibernate site... :-)




-- 
Zied Hamdi
zatreex.sourceforge.net

Rejoindre mon réseau de contacts sur Viadeo :
http://www.viadeo.com/invitationpersonnelle/0022cbh9e10sm7n


> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491754 ] 

Dyre Tjeldvoll commented on DERBY-2590:
---------------------------------------

Does this mean that we can close this issue?

> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2590) error in error message

Posted by "Zied Hamdi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zied Hamdi updated DERBY-2590:
------------------------------

    Attachment: persistence bug.PNG

Hi Dyre,

Do you think hibernate generates a call to PreparedStatement.setLong(11, 0)
or that PreparedStatement.setLong(10, 0) increments 10 to 11 somewhere and
throws at PreparedStatement.checkForValidParameterIndex()
?

I'm sorry the thing is that i'm used to work with hibernate and it's my
first approch to javadb, so I made my analysis based on probability :-/

I didn't go into the JavaDB driver sources to see what's happening, I'm
still at the hibernate level (see figure). I'll keep you informed I
recognize my first reaction was a little confusing, because I relied on the
fact that hibrenate was bug free. Sorry for that :-|.




-- 
Zied Hamdi
zatreex.sourceforge.net

Rejoindre mon réseau de contacts sur Viadeo :
http://www.viadeo.com/invitationpersonnelle/0022cbh9e10sm7n


> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Zied Hamdi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491671 ] 

Zied Hamdi commented on DERBY-2590:
-----------------------------------

For those who encoutred the same problem, or who are interested to the
problem, here is the link to the bug @ hibernate jira:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2587




-- 
Zied Hamdi
zatreex.sourceforge.net

Rejoindre mon réseau de contacts sur Viadeo :
http://www.viadeo.com/invitationpersonnelle/0022cbh9e10sm7n


> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-2590) error in error message

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dyre Tjeldvoll closed DERBY-2590.
---------------------------------

    Resolution: Invalid

Not a bug in Derby

> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>         Attachments: persistence bug.PNG
>
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2590) error in error message

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491631 ] 

Dyre Tjeldvoll commented on DERBY-2590:
---------------------------------------

If the statement is 

insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

with 10 positional parameters, and Hibernate generates a call to

PreparedStatement.setLong(11, 0), how is that Derby's fault?


> error in error message
> ----------------------
>
>                 Key: DERBY-2590
>                 URL: https://issues.apache.org/jira/browse/DERBY-2590
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.1.3.1
>         Environment: nothing special, the request is totally generated by JPA through hibernate
>            Reporter: Zied Hamdi
>
> I have an index that doesn't exist : 11 (the total count of columns is 10): I think the error is just in the index : id is infact of type long
> Hibernate: insert into BasicPersonArchiveEntry (endDate, entryPerformer_revision, entryPerformer_id, lastOccurence, note, startDate, source_revision, source_id, revision, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> could not bind value '0' to parameter: 11; Invalid argument: parameter index 11 is out of range.
> SQL Error: -99999, SQLState: null
> Invalid argument: parameter index 11 is out of range.
> Could not synchronize database state with session
> org.hibernate.exception.GenericJDBCException: could not insert: [com.homeservices.model.impl.BasicPersonArchiveEntry]
>         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:52)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
>         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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
>         at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
>         at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:395)
>         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
>         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
>         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
>         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
>         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:118)
>         at $Proxy48.create(Unknown Source)
>         at tests.entities.TestArchiveServlet.processRequest(TestArchiveServlet.java:46)
>         at tests.entities.TestArchiveServlet.doGet(TestArchiveServlet.java:61)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
> Caused by: org.apache.derby.client.am.SqlException: Invalid argument: parameter index 11 is out of range.
>         at org.apache.derby.client.am.PreparedStatement.checkForValidParameterIndex(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.checkSetterPreconditions(Unknown Source)
>         at org.apache.derby.client.am.PreparedStatement.setLong(Unknown Source)
>         at org.hibernate.type.LongType.set(LongType.java:42)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136)
>         at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116)
>         at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:284)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2008)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2243)
>         ... 46 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.