Hi,

I'm experiencing some problems when using MySQL as database for uPortal
v4 (both tags 4RC2 and 4.0.0) construction.

I have run the steps specified on the MySQL configuration page
(https://wiki.jasig.org/display/UPM40/MySQL).

Everything goes fine for the "ant dbtest" target until I try the "ant
initdb"  or "ant initportal" one ; a superb "deadlock" error arises when
making a prepared statement into the UP_USER table.


Do you have an idea??


Environnement:
- RHEL 6.1 64 bits, MySQL 5.1.52 , mysql-connector-java 5.1.17


Regards,
Fabrice Marchon


Here is the stacktrace:

[java]  INFO Importing Data from:
/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities
     [java]  INFO Initializing ExecutorService  'importExportThreadPool'
     [java]  INFO Adding destruction callback singleton for bean
'scopedTarget.sessionAttributesOverridesMap'
     [java]  WARN Invalid JavaBean property 'userNames' being accessed!
Ambiguous write methods found next to actually used [public void
org.jasig.portal.io.PropertiesFilesIsIncludedUser.setUserNames(java.util.Map)]:
[public void
org.jasig.portal.io.PropertiesFilesIsIncludedUser.setUserNames(java.util.Set)]
     [java]  INFO Scanning for files to Import from:
/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities
     [java]  INFO Found 17 files to Import from:
/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities
     [java]  INFO Importing 7 files of type <entity-type
script="classpath://org/jasig/portal/io/import-entity-type_v3-2.crn">
     [java]  INFO Looking up bean 'counterStore' in ApplicationContext
due to context not yet being initialized
     [java]  INFO Imported :
entity-type/org.jasig.portal.services.entityproperties.EntityProperties.entity-type.xml
     [java]  INFO Imported :
entity-type/org.jasig.portal.portlet.om.IPortletDefinition.entity-type.xml
     [java]  INFO Imported :
entity-type/org.jasig.portal.groups.IEntity.entity-type.xml
     [java]  INFO Imported : entity-type/java.lang.Object.entity-type.xml
     [java]  INFO Imported :
entity-type/org.jasig.portal.security.IPermissionSet.entity-type.xml
     [java]  INFO Imported :
entity-type/org.jasig.portal.security.IPerson.entity-type.xml
     [java]  INFO Imported :
entity-type/org.jasig.portal.groups.IEntityGroup.entity-type.xml
     [java]  INFO Importing 2 files of type
<{https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor}stylesheet-descriptor
version="4.0">
     [java]  INFO Imported :
stylesheet-descriptor/DLMXHTML.stylesheet-descriptor.xml
     [java]  INFO Imported :
stylesheet-descriptor/DLMTabsColumns.stylesheet-descriptor.xml
     [java]  INFO Importing 1 files of type
<{https://source.jasig.org/schemas/uportal/io/user}template-user
version="4.0">
     [java]  INFO Imported : user/defaultTemplateUser.user.xml
     [java]  INFO Importing 2 files of type
<{https://source.jasig.org/schemas/uportal/io/user}user version="4.0">
     [java] ERROR Exception while importing file
[/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities/user/system.user.xml]
     [java] java.util.concurrent.ExecutionException:
org.springframework.dao.DeadlockLoserDataAccessException:
PreparedStatementCallback; SQL [INSERT INTO UP_USER(USER_ID,
USER_DFLT_USR_ID, USER_DFLT_LAY_ID, NEXT_STRUCT_ID, USER_NAME)
     [java] VALUES(?, ?, 1, ?, ?)]; Deadlock found when trying to get
lock; try restarting transaction; nested exception is
com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock
found when trying to get lock; try restarting transaction
     [java]     at
java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
     [java]     at java.util.concurrent.FutureTask.get(FutureTask.java:83)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.waitForFutures(JaxbPortalDataHandlerService.java:812)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:402)
     [java]     at
org.jasig.portal.io.xml.IPortalDataHandlerService$importData.call(Unknown 
Source)
     [java]     at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
     [java]     at upshell_35149373.run(upshell_35149373.groovy:67)
     [java]     at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)
     [java]     at groovy.lang.GroovyShell.run(GroovyShell.java:229)
     [java]     at
org.jasig.portal.shell.PortalShell.main(PortalShell.java:84)
     [java] Caused by:
org.springframework.dao.DeadlockLoserDataAccessException:
PreparedStatementCallback; SQL [INSERT INTO UP_USER(USER_ID,
USER_DFLT_USR_ID, USER_DFLT_LAY_ID, NEXT_STRUCT_ID, USER_NAME)
     [java] VALUES(?, ?, 1, ?, ?)]; Deadlock found when trying to get
lock; try restarting transaction; nested exception is
com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock
found when trying to get lock; try restarting transaction
     [java]     at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:265)
     [java]     at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:811)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:867)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:875)
     [java]     at
org.jasig.portal.io.xml.user.UserImporterExporter.importData(UserImporterExporter.java:157)
     [java]     at
org.jasig.portal.io.xml.user.UserImporterExporter.importData(UserImporterExporter.java:60)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:597)
     [java]     at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
     [java]     at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
     [java]     at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
     [java]     at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
     [java]     at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
     [java]     at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
     [java]     at $Proxy100.importData(Unknown Source)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importOrUpgradeData(JaxbPortalDataHandlerService.java:517)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:480)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:447)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService$1.call(JaxbPortalDataHandlerService.java:370)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService$ErrorReportingCallable.call(JaxbPortalDataHandlerService.java:885)
     [java]     at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     [java]     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     [java]     at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java]     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java]     at java.lang.Thread.run(Thread.java:662)
     [java] Caused by:
com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock
found when trying to get lock; try restarting transaction
     [java]     at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
     [java]     at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
     [java]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
     [java]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
     [java]     at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
     [java]     at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
     [java]     at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
     [java]     at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
     [java]     at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
     [java]     at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     [java]     at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:817)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1)
     [java]     at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
     [java]     ... 26 more
     [java]  INFO Imported : user/guest.user.xml
     [java] Exception in thread "main" java.lang.RuntimeException:
data-import for
/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities
and null failed
     [java]     at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java]     at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     [java]     at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     [java]     at
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
     [java]     at
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
     [java]     at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194)
     [java]     at upshell_35149373.run(upshell_35149373.groovy:70)
     [java]     at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)
     [java]     at groovy.lang.GroovyShell.run(GroovyShell.java:229)
     [java]     at
org.jasig.portal.shell.PortalShell.main(PortalShell.java:84)
     [java] Caused by: java.lang.RuntimeException: Halted due to 1
failures, see previous exceptions for causes.
     [java]     file
[/home/tomcat5/uportal/uportal4/uPortal/uportal-war/src/main/data/required_entities/user/system.user.xml]
     [java]
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.waitForFutures(JaxbPortalDataHandlerService.java:859)
     [java]     at
org.jasig.portal.io.xml.JaxbPortalDataHandlerService.importData(JaxbPortalDataHandlerService.java:402)
     [java]     at
org.jasig.portal.io.xml.IPortalDataHandlerService$importData.call(Unknown 
Source)
     [java]     at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
     [java]     at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
     [java]     at upshell_35149373.run(upshell_35149373.groovy:67)
     [java]     ... 3 more
     [java]  INFO Shutting down ExecutorService 'importExportThreadPool'


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to