CMDBuild Forum

Problem after upgrade to 2.1.2

I upgraded from 2.0.4 to 2.1.2 and when I try to create a new card, I get the following error:

 

Error: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL []; ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).

 

If I create a new Card Class it's all ok.

There is some problem with database migration?

Dear Pedro,

I'm sorry, but with these information we can't reproduce the problem. I suggest you attach the full stack trace and give us more information.

 

Stefano

I already have a database in Postgres that was at CMDBuild 2.0.4 when I upgraded to CMDBuild 2.1.2 and I try to create a new card of an existing Card Type I got the mentioned error. If I create a new Card Type in Admin mode an than create a new card of the new Card Type everything goes well.
 
Full Stack:

Call: services/json/management/modcard/updatecard
--------------------------------------------------
Error: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL []; ERROR: null value in column "IdClass" violates not-null constraint
  Detail: Failing row contains (66729, null, , Teste, null, admin, 2013-05-30 15:56:00.794274, null, teste).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "IdClass" violates not-null constraint
  Detail: Failing row contains (66729, null, , Teste, null, admin, 2013-05-30 15:56:00.794274, null, teste).
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:842)
at org.cmdbuild.dao.driver.postgres.EntryInsertCommand.executeAndReturnKey(EntryInsertCommand.java:91)
at org.cmdbuild.dao.driver.postgres.PostgresDriver.create(PostgresDriver.java:153)
at org.cmdbuild.dao.entry.DBEntry.saveOnly(DBEntry.java:128)
at org.cmdbuild.dao.entry.DBCard.save(DBCard.java:49)
at org.cmdbuild.dao.entry.DBCard.save(DBCard.java:7)
at org.cmdbuild.data.store.DataViewStore.create(DataViewStore.java:204)
at org.cmdbuild.logic.data.access.DefaultDataAccessLogic.createCard(DefaultDataAccessLogic.java:453)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at sun.proxy.$Proxy138.createCard(Unknown Source)
at org.cmdbuild.servlets.json.management.ModCard.updateCard(ModCard.java:285)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.cmdbuild.servlets.JSONDispatcher.dispatch(JSONDispatcher.java:94)
at org.cmdbuild.servlets.JSONDispatcher.doPost(JSONDispatcher.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.AuthFilter.doFilter(AuthFilter.java:133)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.PatchManagerFilter.doFilter(PatchManagerFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.ConfCheckFilter.doFilter(ConfCheckFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.cmdbuild.filters.TranslationFilter.doFilter(TranslationFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "IdClass" violates not-null constraint
  Detail: Failing row contains (66729, null, , Teste, null, admin, 2013-05-30 15:56:00.794274, null, teste).
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:844)
at org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:1)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
... 57 more
 
Previously Tecnoteca wrote:
Dear Pedro,

I'm sorry, but with these information we can't reproduce the problem. I suggest you attach the full stack trace and give us more information.

 

Stefano

 

Sorry but also with the stack trace it is not possible for us to reproduce the error.

Could you send us a backup of your database? I think it could be the only method to reproduce the error.

 

Stefano

Hi,

please could you help me.
I'm upgraded from CMDBuild 2.1.2 to 2.1.3. disappeared tab menu 'Class List'
 
We are using:
   Centos 6.4
   Tomcat 6.0.24-55
   Postgres 9.2.4
   Java 1.7.0_21
   CMDBuild 2.1.2
   Database Demo
 
There is some problem?

Previously Pedro wrote:

I upgraded from 2.0.4 to 2.1.2 and when I try to create a new card, I get the following error:

 

Error: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL []; ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).

 

If I create a new Card Class it's all ok.

There is some problem with database migration?

 

how did your fix it?

In 2.2.0, I found that I can't add directly to a superclass. If I create a class under the superclass, I can add to that.
 
Previously liu kai wrote:
Previously Pedro wrote:

I upgraded from 2.0.4 to 2.1.2 and when I try to create a new card, I get the following error:

 

Error: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL []; ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "IdClass" violates not-null constraint

  Detail: Failing row contains (66729, null, , asd, null, admin, 2013-05-29 17:23:06.110821, null, asf).

 

If I create a new Card Class it's all ok.

There is some problem with database migration?

 

how did your fix it?