AnsweredAssumed Answered

500 error when adding data list item

Question asked by alex_russ on Nov 29, 2016

Hello, i have my custom datalist:

     <type name="dfildf:LegalRequests">
               <title>Legal Requests List</title>
               <parent>dl:dataListItem</parent>
               <properties>
                    <property name="dfildf:RequestID">
                         <title>Request ID</title>
                         <type>d:text</type>
                         <mandatory>true</mandatory>
                    </property>
                    <property name="dfildf:ReqName">
                         <title>Name</title>
                         <type>d:text</type>
                         <mandatory>true</mandatory>
                    </property>
                    <property name="dfildf:ReqDate">
                         <title>Request Date</title>
                         <type>d:date</type>
                         <mandatory>true</mandatory>
                    </property>
                    <property name="dfildf:SubjectMatter">
                         <title>Subject-matter</title>
                         <type>d:text</type>
                    </property>
                    <property name="dfildf:Comment">
                         <title>Comment</title>
                         <type>d:text</type>
                    </property>
                    <property name="dfildf:ArchiveCode">
                         <title>Code for archive</title>
                         <type>d:text</type>
                    </property>
                    <property name="dfildf:statusRef">
                         <title>Request status</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <associations>
                    <association name="dfildf:Attachments">
                         <title>Attachements</title>
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>cm:content</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:Approvers">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>cm:person</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:EmployeeRef">
                         <source>
                              <mandatory>true</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>cm:person</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:vipApprovers">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>cm:person</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:reqWatchers">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>cm:person</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:requestCategoryRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:contractTypes</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:contractCodeRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:contractCodes</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:legalEntityRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:legalEntities</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>                    
                    <association name="dfildf:companyRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:Companies</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:projectRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:Projects</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:locationRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:Locations</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
                    <association name="dfildf:priorityRef">
                         <source>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </source>
                         <target>
                              <class>dfildf:Priorities</class>
                              <mandatory>false</mandatory>
                              <many>true</many>
                         </target>
                    </association>
               </associations>
          </type>

I'm using maven to test my solution, and when i trying to add new item with some assoc data(such as Employee,Priority) i have the error:

5] json form submission for item:
2016-11-29 17:01:51,333  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-
5]      kind = type
2016-11-29 17:01:51,335  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-
5]      id = dfildf:LegalRequests
2016-11-29 17:02:01,367  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-
5] org.springframework.dao.CannotAcquireLockException:
### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Timeout tryin
g to lock table ; SQL statement:
insert into alf_qname (id, version, ns_id, local_name)
        values (?, ?, ?, ?) [50200-190]
### The error may exist in alfresco/ibatis/#resource.dialect#/qname-insert-SqlMa
p.xml
### The error may involve alfresco.qname.insert.insert_QName-Inline
### The error occurred while setting parameters
### SQL: insert into alf_qname (id, version, ns_id, local_name)          values
(?, ?, ?, ?)
### Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL stat
ement:
insert into alf_qname (id, version, ns_id, local_name)
        values (?, ?, ?, ?) [50200-190]
; SQL []; Timeout trying to lock table ; SQL statement:
insert into alf_qname (id, version, ns_id, local_name)
        values (?, ?, ?, ?) [50200-190]; nested exception is org.h2.jdbc.JdbcSQL
Exception: Timeout trying to lock table ; SQL statement:
insert into alf_qname (id, version, ns_id, local_name)
        values (?, ?, ?, ?) [50200-190]
2016-11-29 17:02:01,375  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-
5] Returning 500 status code

But if i don't set any association field all ok, and item is saves successfully

 


WHAT IS THIS?

I don't change anything...

Outcomes