AnsweredAssumed Answered

Problems with the migration to 1.4

Question asked by rcortesr on Dec 13, 2006
Hi,

I have a program that interact with alfresco by means of JSR 170.
This program works well with the version 1.3.
Now I have installed de latest version (1.4) and appears to me the following error:
- JDBC 3.0 Savepoint class is available
- com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@16dc861 – APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
- com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@16dc861 – APPARENT DEADLOCK!!! Complete Status: [num_managed_threads: 1, num_active: 1; activeTasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@e0fcac (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0); pendingTasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ecb3f1, com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@19cc1b]
- com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@e0fcac – Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect
   at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
   at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
   at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
   at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
   at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
   at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:107)
   at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:161)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:113)
   at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:728)
   at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:32)
   at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1258)
   at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
   at com.mysql.jdbc.Connection.createNewIO(Connection.java:2621)
   at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
   at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
   at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:107)
   at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:161)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:113)
   at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:728)
   at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:32)
   at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1258)
   at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368)
- SQL Error: 0, SQLState: null
- Connections could not be acquired from the underlying database!
- SQL Error: 0, SQLState: null
- Connections could not be acquired from the underlying database!
- Error rolling back transaction
java.lang.IllegalStateException: No user transaction is active
   at org.alfresco.util.transaction.SpringAwareUserTransaction.rollback(SpringAwareUserTransaction.java:450)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:193)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:126)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1093)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1063)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:63)
   at org.alfresco.sample.jcr.Main.main(Main.java:41)
- Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [repository-properties,dataSource,transactionComponent,methodCallLogAdvice,resourceBundles,mailService,indexerComponent,indexerComponent_PerformanceMonitorAdvice,searchService,indexerAndSearcherFactory,categoryService,luceneIndexerAndSearcherFactory,luceneCategoryService,luceneIndexLock,lockService,versionService,versionNodeService,versionCounterService,versionableAspect,namespaceDAO,dictionaryModelType,dictionaryDAO,dictionaryService,namespaceService,dictionaryModelBootstrap,dictionaryBootstrap,extension.dictionaryBootstrap,dictionaryRepositoryBootstrap,copyService,checkOutCheckInService,workingCopyAspect,discussableAspect,LuceneFullTextSearchIndexer,luceneIndexBackupComponent,threadPoolExecutor,queryRegisterComponent,auditableAspect,referenceableAspect,configurableService,transactionalEHCacheManager,internalEHCacheManager,userToAuthoritySharedCache,userToAuthorityCache,permissionsAccessSharedCache,permissionsAccessCache,nodeOwnerSharedCache,nodeOwnerCache,permissionService,permissionServiceImpl,ownerDynamicAuthority,lockOwnerDynamicAuthority,permissionsModelDAO,roleVoter,groupVoter,aclEntryVoter,accessDecisionManager,afterAcl,afterInvocationManager,NamespaceService_security,DictionaryService_security,NodeService_security,FileFolderService_security,ContentService_security,MimetypeService_security,SearchService_security,CategoryService_security,CopyService_security,LockService_security,VersionService_security,CheckoutCheckinService_security,RuleService_security,ImporterService_security,ActionService_security,PermissionService_security,AuthorityService_security,AuthenticationService_security,OwnableService_security,PersonService_security,TemplateService_security,ScriptService_security,AlfrescoServiceDescriptor,ServiceRegistry,ServiceRegistry_descriptor,exceptionTranslator,DescriptorService,DescriptorService_descriptor,NamespaceService,NamespaceService_transaction,NamespaceService_descriptor,DictionaryService,DictionaryService_transaction,DictionaryService_descriptor,NodeService,NodeService_transaction,NodeService_descriptor,ContentService,ContentService_transaction,ContentService_descriptor,MimetypeService,MimetypeService_descriptor,SearchService,SearchService_transaction,SearchService_descriptor,CategoryService,CategoryService_transaction,CategoryService_descriptor,CopyService,CopyService_transaction,CopyService_descriptor,LockService,LockService_transaction,LockService_descriptor,VersionService,VersionService_transaction,VersionService_descriptor,CheckoutCheckinService,CheckoutCheckinService_transaction,CheckoutCheckinService_descriptor,RuleService,RuleService_transaction,RuleService_descriptor,ImporterService,ImporterService_transaction,ImporterService_descriptor,ExporterService,ExporterService_transaction,ExporterService_descriptor,ActionService,ActionService_transaction,ActionService_descriptor,PermissionService,PermissionService_transaction,PermissionService_descriptor,AuthorityService,AuthorityService_transaction,AuthorityService_descriptor,OwnableService,OwnableService_transaction,OwnableService_descriptor,PersonService,PersonService_transaction,PersonService_descriptor,AuthenticationService,AuthenticationService_transaction,AuthenticationService_descriptor,TemplateService,TemplateService_transaction,TemplateService_descriptor,ScriptService,ScriptService_transaction,ScriptService_descriptor,FileFolderService,FileFolderService_transaction,fileFolderService,actionService,asynchronousActionExecutionQueue,actionsAspect,actionResourceBundles,action-condition-evaluator,no-condition,compare-property-value,compare-mime-type,in-category,is-subtype,has-aspect,has-version-history,action-executer,composite-action,create-version,add-features,remove-features,specialise-type,link-category,simple-workflow,transform,transform-image,copy,move,check-in,check-out,mail,set-property-value,extract-metadata,import,export,repository-export,script,execute-all-rules,ruleService,rulesAspect,ruleResourceBundles,rule-type-base,inbound,update,outbound,rule-trigger-base,on-create-node-trigger,on-update-node-trigger,on-property-update-trigger,on-delete-node-trigger,on-create-child-association-trigger,on-delete-child-association-trigger,on-create-association-trigger,on-delete-association-trigger,on-content-update-trigger,on-content-create-trigger,nodeService,storeArchiveMap,nodeArchiveService,dbNodeService,nodeIndexer,integrityChecker,incompleteNodeTagger,ftsIndexerTrigger,tempFileCleanerTrigger,fileContentStoreCleanerJobDetail,contentStoreCleanerTrigger,indexRecoveryTrigger,indexBackupJobDetail,indexBackupTrigger,ehCacheTracerJob,schedulerFactory,fileServersConfigSource,fileServersConfigService,fileServerConfigurationBase,contentDiskDriver,cifsHelper,fileContentStore,deletedContentStore,deletedContentBackupListener,contentStoreCleaner,contentService,mimetypeConfigService,mimetypeService,metadataExtracterRegistry,baseMetadataExtracter,org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter,org.alfresco.repo.content.metadata.OfficeMetadataExtracter,org.alfresco.repo.content.metadata.HtmlMetadataExtracter,org.alfresco.repo.content.metadata.MPMetadataExtracter,org.alfresco.repo.content.metadata.OpenDocumentMetadataExtracter,org.alfresco.repo.content.metadata.UnoMetadataExtracter,contentTransformerRegistry,baseContentTransformer,transformer.StringExtracter,transformer.BinaryPassThrough,transformer.PdfBox,transformer.Poi,transformer.TextMining,transformer.HtmlParser,transformer.OpenOffice,transformer.complex.OpenOffice.PdfBox,transformer.ImageMagick,hibernateConfigProperties,cacheStrategiesPlaceholderConfigurer,sessionFactory,sessionFactoryBase,transactionManager,versionCounterDaoComponent,permissionsDaoComponent,nodeDaoServiceImpl,dbNodeDaoServiceTxnRegistration,persmissionDaoServiceTxnRegistration,nodeDaoService,ownableService,templateService,freeMarkerProcessor,scriptService,indexRecoveryComponentBase,indexRecoveryComponent,authorityService,authorityDAO,authenticationManager,daoAuthenticationProvider,authenticatedAuthenticationPassthroughProvider,alfDaoImpl,authenticationDao,passwordEncoder,authenticationService,authenticationServiceImpl,authenticationComponent,authenticationComponentImpl,personService,ticketComponent,policyBehaviourQueue,policyTransactionHandlerFactory,policyBehaviourFilter,policyComponent,viewParser,importerComponent,exporterComponent,repositoryExporterComponent,systemExporterImporter,systemInfoImporter,storeImporter,userStoreImporter,systemStoreImporter,spacesArchiveStoreImporter,spacesStoreImporter,versionStoreImporter,systemInfoBootstrap,userBootstrap,systemBootstrap,versionBootstrap,spacesArchiveBootstrap,spacesBootstrap,descriptorComponent,patchExecuter,fileServerConfiguration,cifsServer,ftpServer,startupLog,JCR.Repository,JCR.DictionaryBootstrap,PatchService,PatchService_transaction,patchDaoComponent,patchComponent,basePatch,patch.sample.01,patch.sample.02,bootstrapSpacesMessageSource,patch.authoritiesFolder,patch.savedSearchesFolder,patch.savedSearchesPermission,patch.updatePermissionData,patch.guestUser,patch.fixNodeSerializableValues,patch.updateGuestPermission,patch.guestPersonPermission,patch.spacesRootPermission,patch.categoryRootPermission,patch.contentPermission,patch.updateForumsIcons,patch.emailTemplatesFolder,patch.emailTemplatesContent,patch.descriptorUpdate,patch.scriptsFolder,patch.topLevelGroupParentChildAssociationTypePatch,testDictionaryBootstrap]; root of BeanFactory hierarchy}
- Closing Hibernate SessionFactory
- closing
- Shutting down EHCache CacheManager
- CacheManager already shutdown
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryRepositoryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
org.hibernate.exception.GenericJDBCException: Cannot open connection
   at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
   at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
   at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
   at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129)
   at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
   at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:520)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:282)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:225)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.begin(SpringAwareUserTransaction.java:348)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:167)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:74)
   at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:126)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1093)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1063)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:63)
   at org.alfresco.sample.jcr.Main.main(Main.java:41)
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
   at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:352)
   at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:120)
   at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:601)
   at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
   at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
   … 26 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
   at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1002)
   at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:293)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:348)
   … 30 more

Outcomes