-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Strange Exception after upgrade from 3.6.2 to 4.1.10.
PostPosted: Mon Feb 25, 2013 6:13 am 
Newbie

Joined: Thu Mar 19, 2009 4:59 am
Posts: 9
Hello

I'm trying to upgrade Hibernate from 3.6.2 to 4.1.10.
Now I get this exception, has anybody encountered the same exception?

This is the method where the exception is throws (at return (String) criteria.uniqueResult()), it makes no sense to me since the passed PATH is correct.

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public String getCurrentVersion(String uuid) throws ServerException {
try {
Criteria criteria = createCriteria(RepositoryHistoryEntry.class);
criteria.add(Restrictions.eq(PATH_FIELD, getReferencePath(uuid)));
criteria.setProjection(Projections.property(VERSION_LABEL_FIELD));
criteria.addOrder(Order.desc(VERSION_NUMBER_FIELD));
criteria.setMaxResults(1);
return (String) criteria.uniqueResult();
} catch (Exception e) {
throw ServerUtil.createServerException(e);
}
}


Thanks for any hint/help!
Flavio

jdk1.7.0_15
SQL Server 2008 R2
Windows 7
Spring 3.2.1
Hibernate 4.1.10
Eclipse Teneo 2.0.1





com.microsoft.sqlserver.jdbc.SQLServerException: The stream value is not the specified length. The specified length was 974, the actual length is 0.
at com.microsoft.sqlserver.jdbc.TDSWriter.error(IOBuffer.java:3323) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.TDSWriter.writeStream(IOBuffer.java:3245) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.TDSWriter.writeRPCInputStream(IOBuffer.java:4400) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.DTV$SendByRPCOp.execute(dtv.java:846) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.DTV.executeOp(dtv.java:1057) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.DTV.sendByRPC(dtv.java:1099) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.Parameter.sendByRPC(Parameter.java:660) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.sendParamsByRPC(SQLServerPreparedStatement.java:457) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(SQLServerPreparedStatement.java:612) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatementBatch(SQLServerPreparedStatement.java:1258) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtBatchExecCmd.doExecute(SQLServerPreparedStatement.java:1189) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5574) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1734) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154) ~[sqljdbc4.jar:na]
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:1153) ~[sqljdbc4.jar:na]
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[org.apache.commons.dbcp_1.4.0.jar:1.4]
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[org.apache.commons.dbcp_1.4.0.jar:1.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at com.sun.proxy.$Proxy91.executeBatch(Unknown Source) ~[na:na]
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:149) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:162) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:357) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:62) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1614) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
at com.softmodeler.service.impl.RepositoryService.getCurrentVersion(RepositoryService.java:368) ~[com.softmodeler.server/:na]
at com.softmodeler.service.impl.AuditEntryService.createNew(AuditEntryService.java:132) [com.softmodeler.server/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
at com.softmodeler.workflow.OSGiLookup.invokeServiceCall(OSGiLookup.java:125) [com.softmodeler.workflow/:na]
at com.softmodeler.workflow.OSGiLookup.execute(OSGiLookup.java:88) [com.softmodeler.workflow/:na]
at org.activiti.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34) [activiti-engine-5.10.jar:5.10]
WARN: Transaction - Error ending association for XAResource com.ibm.db2.jcc.t4.zb@5fa4db; transaction will roll back. XA error code: 100
com.ibm.db2.jcc.am.XaException: [jcc][t4][10401][12066][4.14.88] XA exception: XA_RBROLLBACK ERRORCODE=-4228, SQLSTATE=null
at com.ibm.db2.jcc.am.ed.c(ed.java:454) ~[na:na]
at com.ibm.db2.jcc.am.ed.c(ed.java:478) ~[na:na]
at com.ibm.db2.jcc.t4.zb.a(zb.java:2094) ~[na:na]
at com.ibm.db2.jcc.t4.zb.end(zb.java:678) ~[na:na]
at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:571) [geronimo-transaction-2.1.2.jar:na]
at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:550) [geronimo-transaction-2.1.2.jar:na]
at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:481) [geronimo-transaction-2.1.2.jar:na]
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:263) [geronimo-transaction-2.1.2.jar:na]
at org.springframework.transaction.jta.JtaTransactionManager.doRollback(JtaTransactionManager.java:1038) [org.springframework.transaction-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:846) [org.springframework.transaction-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:823) [org.springframework.transaction-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.jencks.GeronimoPlatformTransactionManager.rollback(GeronimoPlatformTransactionManager.java:80) [jencks-2.1.jar:na]
at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:405) [org.springframework.transaction-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$afterThrowing$org_springframework_transaction_aspectj_AbstractTransactionAspect$2$2a73e96c(AbstractTransactionAspect.aj:69) [org.springframework.aspects-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at com.softmodeler.workflow.service.impl.WorkflowService.start(WorkflowService.java:226) [com.softmodeler.workflow/:na]
at com.softmodeler.workflow.service.impl.WorkflowService.startWorkflow(WorkflowService.java:189) [com.softmodeler.workflow/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:69) [org.eclipse.riena.communication.core_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:38) [org.eclipse.riena.communication.core_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.riena.internal.communication.publisher.ServiceHooksProxy.invoke(ServiceHooksProxy.java:73) [org.eclipse.riena.communication.publisher_3.0.0.v20110614_3_0_0_0.jar:na]
at com.sun.proxy.$Proxy177.startWorkflow(Unknown Source) [na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_15]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_15]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_15]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:182) [com.caucho.hessian_3.2.0.0.jar:na]
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109) [com.caucho.hessian_3.2.0.0.jar:na]
at org.eclipse.riena.communication.publisher.hessian.RienaHessianDispatcherServlet.service(RienaHessianDispatcherServlet.java:178) [org.eclipse.riena.communication.publisher.hessian_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:150) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at com.softmodeler.windows.server.security.SoftmodelerWindowsPreAuthenticationProcessingFilter.doFilter(SoftmodelerWindowsPreAuthenticationProcessingFilter.java:52) [com.softmodeler.windows.server/:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at com.softmodeler.windows.server.security.NegotiateSecurityFilter.doFilter(NegotiateSecurityFilter.java:132) [com.softmodeler.windows.server/:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [org.springframework.web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.0.M1.jar:3.2.0.M1]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [org.springframework.web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [org.springframework.web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [org.eclipse.jetty.security_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.Server.handle(Server.java:368) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:943) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1004) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) [org.eclipse.jetty.http_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [org.eclipse.jetty.http_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [org.eclipse.jetty.io_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [org.eclipse.jetty.io_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [org.eclipse.jetty.util_8.1.9.v20130131.jar:8.1.9.v20130131]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [org.eclipse.jetty.util_8.1.9.v20130131.jar:8.1.9.v20130131]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_15]

_________________
Organisations- und Prozessdokumentation Software
Qualität Management QMS :: Information Management IMS
http://www.scodi.ch


Top
 Profile  
 
 Post subject: Re: Strange Exception after upgrade from 3.6.2 to 4.1.10.
PostPosted: Tue Mar 12, 2013 5:14 am 
Newbie

Joined: Thu Mar 19, 2009 4:59 am
Posts: 9
Hello

After days of investigations I narrowed the problem down to Blob fields.

I created the following test code in a controller.
Code:
   private String path = "testdir/test6.log";
   private String content = path;

   @RequestMapping(value = "/update/test6", method = RequestMethod.GET)
   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
   public void test6(Writer writer) throws Exception {
      try {
         IEntityManagerService entityManagerService = CommonPlugin.getService(IEntityManagerService.class);
         EntityManager entityManager = entityManagerService.getEntityManager();
         Session session = (Session) entityManager.getDelegate();

         RepositoryEntry entry = SoftmodelerFactory.eINSTANCE.createRepositoryEntry();
         entry.setId(IdUtil.generateUUID(entry.eClass()));
         entry.setModifyDate(new Date());
         entry.setType("data");
         entry.setPath(path);
         entry.setData(session.getLobHelper().createBlob(content.getBytes()));

         session.merge(entry);

         writer.append("Entry ID: ").append(entry.getId());
      } catch (Exception e) {
         e.printStackTrace();
      }
   }

   @RequestMapping(value = "/update/test7", method = RequestMethod.GET)
   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
   public void test7(Writer writer) throws Exception {
      try {
         IEntityManagerService entityManagerService = CommonPlugin.getService(IEntityManagerService.class);
         EntityManager entityManager = entityManagerService.getEntityManager();
         Session session = (Session) entityManager.getDelegate();

         Criteria criteria = session.createCriteria(RepositoryEntry.class);
         criteria.add(Restrictions.eq("path", path));

         RepositoryEntry entry = (RepositoryEntry) criteria.uniqueResult();
         entry.setModifyDate(new Date());

         session.merge(entry);

         writer.append("Entry ID: ").append(entry.getId());
      } catch (Exception e) {
         e.printStackTrace();
      }
   }


First I call "/update/test6" to create the repository entry object. I then call "/update/test7" and it may work first, but after at least 3 executions I get the following exception:
Code:
WARN: Transaction - Unexpected exception from beforeCompletion; transaction will roll back
javax.persistence.PersistenceException: org.hibernate.exception.DataException: The stream value is not the specified length. The specified length was 17, the actual length is 0.
   at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) ~[hibernate-entitymanager-4.1.10.Final.jar:4.1.10.Final]
   at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) ~[hibernate-entitymanager-4.1.10.Final.jar:4.1.10.Final]
   at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) ~[hibernate-entitymanager-4.1.10.Final.jar:4.1.10.Final]
   at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) ~[hibernate-entitymanager-4.1.10.Final.jar:4.1.10.Final]
   at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
   at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.1.10.Final.jar:4.1.10.Final]
   at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:522) [geronimo-transaction-2.1.2.jar:na]
   at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:506) [geronimo-transaction-2.1.2.jar:na]
   at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400) [geronimo-transaction-2.1.2.jar:na]
   at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:260) [geronimo-transaction-2.1.2.jar:na]
   at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:250) [geronimo-transaction-2.1.2.jar:na]
   at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) [org.springframework.transaction_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [org.springframework.transaction_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [org.springframework.transaction_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.jencks.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76) [jencks-2.1.jar:na]
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393) [org.springframework.transaction_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$afterReturning$org_springframework_transaction_aspectj_AbstractTransactionAspect$3$2a73e96c(AbstractTransactionAspect.aj:78) [org.springframework.aspects_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at ch.scodi.server.update.UpdateController.test7(UpdateController.java:1374) [ch.scodi.server/:na]
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
   at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
   at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) [org.springframework.web_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) [org.springframework.web.servlet_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) [javax.servlet_3.0.0.v201112011016.jar:na]
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na]
   at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at com.softmodeler.windows.server.security.SoftmodelerWindowsPreAuthenticationProcessingFilter.doFilter(SoftmodelerWindowsPreAuthenticationProcessingFilter.java:52) [com.softmodeler.windows.server/:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at com.softmodeler.windows.server.security.NegotiateSecurityFilter.doFilter(NegotiateSecurityFilter.java:132) [com.softmodeler.windows.server/:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [org.springframework.web_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [org.springframework.web_3.0.5.RELEASE.jar:3.0.5.RELEASE]
   at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [org.eclipse.jetty.security_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) [org.eclipse.jetty.servlet_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.Server.handle(Server.java:368) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) [org.eclipse.jetty.http_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [org.eclipse.jetty.http_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [org.eclipse.jetty.server_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [org.eclipse.jetty.io_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [org.eclipse.jetty.io_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [org.eclipse.jetty.util_8.1.9.v20130131.jar:8.1.9.v20130131]
   at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [org.eclipse.jetty.util_8.1.9.v20130131.jar:8.1.9.v20130131]
   at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]


The problem seems to occure because of the RepositoryEntry.data field which is a Blob and only if it contains content.
If I remove this line in test6(),
"entry.setData(session.getLobHelper().createBlob(content.getBytes()));"
no exception is thrown after lots of update/test7 calls.

Can somebody verify this as bug?

greets
Flavio

_________________
Organisations- und Prozessdokumentation Software
Qualität Management QMS :: Information Management IMS
http://www.scodi.ch


Top
 Profile  
 
 Post subject: Re: Strange Exception after upgrade from 3.6.2 to 4.1.10.
PostPosted: Fri Apr 19, 2013 8:03 am 
Newbie

Joined: Thu Mar 19, 2009 4:59 am
Posts: 9
Created an example project which reproduces this error, created an issue: https://hibernate.atlassian.net/browse/HHH-8193

_________________
Organisations- und Prozessdokumentation Software
Qualität Management QMS :: Information Management IMS
http://www.scodi.ch


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.