Page 1 of 2
Error importing repository: could not insert NodeProperty
PostPosted:Sat Jan 19, 2013 6:23 pm
by Alexires
Hi,
I'm trying to import my repository that was exported from OKM 5.1.10. I'm getting an error that says
Code: Select allError: could not insert: [com.openkm.dao.bean.NodeProperty]
Any ideas what is going on?
Re: Error importing repository: could not insert NodePropert
PostPosted:Sun Jan 20, 2013 5:45 pm
by jllort
You should upgrade your openkm to latest 5.1.11 ( it's nightli compilation build available at integration.openkm.com ), read here
http://wiki.openkm.com/index.php/Migrat ... _to_5.1.11 and then export repository to migrate 6.x
Re: Error importing repository: could not insert NodePropert
PostPosted:Tue Jan 22, 2013 4:47 am
by Alexires
The nightly build for 5.1.11 isn't available:
http://integration.openkm.com/5.1.x/
Re: Error importing repository: could not insert NodePropert
PostPosted:Thu Jan 24, 2013 4:09 pm
by jllort
Re: Error importing repository: could not insert NodePropert
PostPosted:Tue Jan 29, 2013 5:16 am
by Alexires
After an EXTREMELY lengthy reinstall process and importing the old repository into 5.1.11 and then exporting and then attempting to import again into 6, I'm still getting the same error
Code: Select allError: could not insert: [com.openkm.dao.bean.NodeProperty]
Edit: More information. This is the readout from catalina.log
Code: Select all2013-01-29 09:24:37,031 [http-bio-0.0.0.0-8080-exec-19] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -3401, SQLState: 22001
2013-01-29 09:24:37,031 [http-bio-0.0.0.0-8080-exec-19] ERROR org.hibernate.util.JDBCExceptionReporter - data exception: string data, right truncation
2013-01-29 09:24:37,031 [http-bio-0.0.0.0-8080-exec-19] ERROR com.openkm.util.impexp.RepositoryImporter - could not insert: [com.openkm.dao.bean.NodeProperty]
com.openkm.core.DatabaseException: could not insert: [com.openkm.dao.bean.NodeProperty]
at com.openkm.util.impexp.metadata.DbMetadataAdapter.importWithMetadata(DbMetadataAdapter.java:233)
at com.openkm.util.impexp.RepositoryImporter.importDocumentsHelper(RepositoryImporter.java:260)
at com.openkm.util.impexp.RepositoryImporter.importDocumentsHelper(RepositoryImporter.java:192)
at com.openkm.util.impexp.RepositoryImporter.importDocuments(RepositoryImporter.java:87)
at org.apache.jsp.admin.repository_005fimport_jsp._jspService(repository_005fimport_jsp.java:168)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
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:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.hibernate.exception.DataException: could not insert: [com.openkm.dao.bean.NodeProperty]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:63)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2346)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2853)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
at org.hibernate.engine.Cascade.cascade(Cascade.java:161)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:475)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:353)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
at com.openkm.util.impexp.metadata.DbMetadataAdapter.importWithMetadata(DbMetadataAdapter.java:210)
... 49 more
Caused by: java.sql.SQLDataException: data exception: string data, right truncation
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:93)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:56)
... 84 more
Caused by: org.hsqldb.HsqlException: data exception: string data, right truncation
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.types.CharacterType.castOrConvertToType(Unknown Source)
at org.hsqldb.types.CharacterType.convertToType(Unknown Source)
at org.hsqldb.StatementDML.getInsertData(Unknown Source)
at org.hsqldb.StatementInsert.getInsertValuesNavigator(Unknown Source)
at org.hsqldb.StatementInsert.getResult(Unknown Source)
at org.hsqldb.StatementDMQL.execute(Unknown Source)
at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
... 90 more
From what I've seen around the internet, this seems like a hibernate length error - perhaps the metadata is too long?
Re: Error importing repository: could not insert NodePropert
PostPosted:Wed Jan 30, 2013 10:46 pm
by jllort
Yes seems the content is too long (
http://www.sqlerror.de/db2_sql_error_-4 ... 22001.html ) , do you got textarea or inputs with a long text ?
Can we take a look at your property groups.xml ?
Re: Error importing repository: could not insert NodePropert
PostPosted:Fri Feb 01, 2013 1:14 am
by Alexires
XML Extentions are not allowed to upload so I've zipped it and attached it.
I'm pretty sure if it is going to be any of them, it would be the following part
Code: Select all <textarea label="Description" name="okp:book.description"/>
Those values tend to be quite long (the length of the book description on amazon.com for instance).
Re: Error importing repository: could not insert NodePropert
PostPosted:Sat Feb 02, 2013 6:57 pm
by jllort
Now property value is limited to 512 characters, this can be the cause of the problem.
Re: Error importing repository: could not insert NodePropert
PostPosted:Tue Feb 05, 2013 6:27 am
by Alexires
Anyway to change that, or extend it?
Re: Error importing repository: could not insert NodePropert
PostPosted:Thu Feb 07, 2013 7:30 pm
by pavila
Yes, you can make an "alter table" to expand its size. How big is the property value to insert?
Re: Error importing repository: could not insert NodePropert
PostPosted:Sun Feb 10, 2013 3:04 am
by Alexires
Not entirely sure how big it is; I don't know which file is throwing the error so I can't tell you. I'm guessing the largest wouldn't be much over 2000 characters.
Re: Error importing repository: could not insert NodePropert
PostPosted:Sat Feb 16, 2013 2:30 am
by Alexires
Sorry to bump, but is there a solution to this? I'm waiting on this to import the repository.
Re: Error importing repository: could not insert NodePropert
PostPosted:Sat Feb 16, 2013 7:15 pm
by jllort
At table OKM_NODE_PROPERTY alter column NPG_VALUE to save more characters ( now is limited to 512 ).
Re: Error importing repository: could not insert NodePropert
PostPosted:Tue Feb 19, 2013 11:37 pm
by Alexires
Sorry, how exactly do I do that? Do I run some kind of command in OpenKM, or do I edit a file in the OKM root directory somewhere? I'm not exactly a coding guru and have no knowledge of SQL.
Is it something like the migration instructions?
Code: Select all UPDATE OKM_NODE_PROPERTY SET NPG_VALUE...
Again, sorry for not really knowing much about SQL.
Edit: Or is it something like this run from the database query in the Admin panel-
Code: Select all ALTER TABLE OKM_NODE_PROPERTY MODIFY NPG_VALUE 2048
Re: Error importing repository: could not insert NodePropert
PostPosted:Sun Feb 24, 2013 3:03 am
by Alexires
Sorry for the bump; is it the latter one of those? I'm a little wary of just running a misc. sql command on my install...
Edit: Tried it anyway; didn't work. Please tell me what I should do and how I should do it - I've tried searching but I have no idea how to run any kind of SQL or such... Also the values in the column NPG_VALUE are all boolean... I don't really understand this at all...