cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in FirstFoundationClient.java

frank83
Champ in-the-making
Champ in-the-making
Hi to all,
I' m trying to run FirstFoundationClient.java with Alfresco SDK 2.1 .
I helped me with Alfresco Sdk documentation  and also with recent posts in this forum.
Now I have this problem that I don' t know how to resolve.



15:34:22,687 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
15:34:25,000 WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
15:34:28,421 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
15:34:28,593 INFO  [domain.schema.SchemaBootstrap] Executing database script C:\DOCUME~1\ffazzini\IMPOST~1\Temp\Alfresco\AlfrescoSchemaCreate-org.hibernate.dialect.MySQLInnoDBDialect-50733.sql (Generated).
15:35:06,015 INFO  [domain.schema.SchemaBootstrap] Executing database script C:\DOCUME~1\ffazzini\IMPOST~1\Temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-50734.sql (Copied from classpath:alfresco/dbscripts/create/2.1/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.1-FKIndexes.sql).
15:35:06,203 INFO  [domain.schema.SchemaBootstrap] All executed statements written to file C:\DOCUME~1\ffazzini\IMPOST~1\Temp\Alfresco\AlfrescoSchemaUpdate-All_Statements-50735.sql.
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:444)
   at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:666)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
Caused by: org.alfresco.repo.search.SearcherException: More than one root node in index: 2
   at org.alfresco.repo.search.impl.lucene.query.LeafScorer.initialise(LeafScorer.java:252)
   at org.alfresco.repo.search.impl.lucene.query.LeafScorer.<init>(LeafScorer.java:164)
   at org.alfresco.repo.search.impl.lucene.query.PathScorer.createPathScorer(PathScorer.java:167)
   at org.alfresco.repo.search.impl.lucene.query.PathQuery$StructuredFieldWeight.scorer(PathQuery.java:258)
   at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
   at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:100)
   at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
   at org.apache.lucene.search.Hits.<init>(Hits.java:45)
   at org.apache.lucene.search.Searcher.search(Searcher.java:45)
   at org.apache.lucene.search.Searcher.search(Searcher.java:37)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.query(ADMLuceneSearcherImpl.java:272)
   at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:85)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.resolveImportedNodeRef(ImporterComponent.java:1026)
   at org.alfresco.repo.importer.ImporterComponent$NodeImporter.end(ImporterComponent.java:746)
   at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:361)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:224)
   at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:426)
   … 11 more



Can you give me an help, please? Thanks.

Frank83
7 REPLIES 7

janv
Employee
Employee
This can occur if you have cleared your existing DB schema (or are pointing to a new DB schema) but have not cleared your Alfresco root.dir (content data + lucene indexes).

Please check that your SDK FirstFoundationClient config (/alfresco/extension/custom-repository.properties) is pointing to an appropriate DB schema and root.dir … for example, if you wish to run each embedded sample against the same DB schema and root.dir, then you should specify an absolute path to a common root.dir.

Thanks,
Jan

frank83
Champ in-the-making
Champ in-the-making
Hi, I did it before writing the first post…
I have always the same errors:
_that i wrote yesterday
_error to jmxrmi port 1313(AlreadyBoundException…)Not found in alfresco/core-services-context.xml.
Thanks

Frank83

frank83
Champ in-the-making
Champ in-the-making
Hi janv,

Now clearing the alf_data folder i have this:


10:32:16,609 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
10:32:20,453 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
10:32:23,218 INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
10:35:33,312 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: D:\alfresco\alf_data
10:35:33,343 ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 4 stores.
10:35:33,343 INFO  [repo.admin.ConfigurationChecker] You may set 'index.recovery.mode=FULL' if you need to rebuild the indexes.
10:35:33,343 ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: System content not found in content store.
10:35:33,343 ERROR [repo.admin.ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
Exception in thread "main" org.alfresco.error.AlfrescoRuntimeException: Ensure that the 'dir.root' property is pointing to the correct data location.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:312)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:72)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:178)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:182)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
10:36:57,156 ERROR [openoffice.connection.SocketOpenOfficeConnection] disconnected unexpectedly

What have i to do?

janv
Employee
Employee
Your issue is now basically the other way around - ie. your root.dir is empty but your DB is no longer empty. If you wish to start with a fresh config/install then you will need to clear both.

Regards,
Jan

vibhutewary
Champ in-the-making
Champ in-the-making
Hi, I'm getting this error on running FirstFoundationClient.java from eclipse:


Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfres
co.module.blogIntegration.BlogIntegrationServiceImpl] for bean with name 'blogIntegrationService' defined in class path
resource [alfresco/blog-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.module.blogInte
gration.BlogIntegrationServiceImpl
Caused by: java.lang.ClassNotFoundException: org.alfresco.module.blogIntegration.BlogIntegrationServiceImpl
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at org.springframework.util.ClassUtils.forName(ClassUtils.java:183)
   at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:317)
   at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1044)
   at org.springframework.beans.factory.support.AbstractBeanFactory.isBeanClassMatch(AbstractBeanFactory.java:1072)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.
java:165)
   at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:6
91)
   at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationCo
ntext.java:395)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:328)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)


what could the cause be?
Thanks for the help.
Vibhu.

vibhutewary
Champ in-the-making
Champ in-the-making
I resolved the error by extracting the contents of :

/opt/sdk_alfresco/lib/server/dependencies/alfresco-blog-integration.jar
files'  /org/alfresco/module folder contents to: /opt/sdk_alfresco/samples/FirstFoundationClient/build/org/alfresco/module

This has solved the orignal issue; However, i'm getting a new issue now:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'email
Server' defined in class path resource [alfresco/bootstrap-context.xml]: Instantiation of bean failed; nested exception
is java.lang.NoClassDefFoundError: org/subethamail/smtp/MessageHandlerFactory
Caused by: java.lang.NoClassDefFoundError: org/subethamail/smtp/MessageHandlerFactory
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.getDeclaredConstructor(Class.java:1985)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:60)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:4
5)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapable
BeanFactory.java:701)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapa
bleBeanFactory.java:687)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanF
actory.java:388)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.jav
a:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:
236)
   at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:701)
   at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:519
)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:343)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
Caused by: java.lang.ClassNotFoundException: org.subethamail.smtp.MessageHandlerFactory
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   … 21 more

Regards,
Vibhu.

P.S. Deleting the xml line from the blog…xml file did'nt work for me; upon deleting it gave be a /alfersco server not found page in tomcat.

vibhutewary
Champ in-the-making
Champ in-the-making
Fixed the above error by copying /opt/sdk/lib/server/dependencies/ subetha-smtp.jar file's contents as : /opt/sdk/samples/FirstFoundationClient/build/org/subethamail

Getting this error now :

12:34:09,436 User:System WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wordPressBlogIntegration' defined in class path resource [alfresco/blog-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: marquee/xmlrpc/XmlRpcException
Caused by: java.lang.NoClassDefFoundError: marquee/xmlrpc/XmlRpcException
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   at java.lang.Class.getConstructor0(Class.java:2699)
   at java.lang.Class.getDeclaredConstructor(Class.java:1985)
   at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:60)
   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:45)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:701)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:687)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:388)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:55)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:69)
Caused by: java.lang.ClassNotFoundException: marquee.xmlrpc.XmlRpcException
   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   … 19 more

Any solutions?
Regards,
Vibhu.