cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SDK examples

sergio
Champ in-the-making
Champ in-the-making
Hi all! I am new to this forum and to Alfresco, so many aspects about the architecture are not so clear….

I tried to run some examples (Window platform) provided with Alfresco SDK 1.4, but some problems occurred.

- After importing the example projects into Ecplise many dependencies have to be updated manually;
- the application example "FirstFoundationClient" doesn't work properly raising the following exception:

- Loading XML bean definitions from class path resource [alfresco/application-context.xml]
- Loading XML bean definitions from class path resource [alfresco/core-services-context.xml]
- MLog clients using log4j logging.
- JDK 1.4+ collections available
- Commons Collections 3.x available
- Loading XML bean definitions from class path resource [alfresco/public-services-context.xml]
- Loading XML bean definitions from class path resource [alfresco/public-services-security-context.xml]
- Loading XML bean definitions from class path resource [alfresco/cache-context.xml]
- Loading XML bean definitions from class path resource [alfresco/model-specific-services-context.xml]
- Loading XML bean definitions from class path resource [alfresco/action-services-context.xml]
- Loading XML bean definitions from class path resource [alfresco/rule-services-context.xml]
- Loading XML bean definitions from class path resource [alfresco/node-services-context.xml]
- Loading XML bean definitions from class path resource [alfresco/scheduled-jobs-context.xml]
- Loading XML bean definitions from class path resource [alfresco/network-protocol-context.xml]
- Loading XML bean definitions from class path resource [alfresco/content-services-context.xml]
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'openOfficeConnection' defined in class path resource [alfresco/content-services-context.xml]: Class that bean class [net.sf.jooreports.openoffice.connection.SocketOpenOfficeConnection] depends on not found; nested exception is java.lang.NoClassDefFoundError: com/sun/star/lang/XEventListener
java.lang.NoClassDefFoundError: com/sun/star/lang/XEventListener
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   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:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   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:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:242)
   at org.springframework.util.ClassUtils.forName(ClassUtils.java:108)
   at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:426)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:392)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:307)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:325)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:298)
   at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
   at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
   at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
   at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
   at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
   at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:40)
   at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:62)

Could it be a problem of configuration or other?

Many thanks to everyone.

Sergio
2 REPLIES 2

ribz33
Champ on-the-rise
Champ on-the-rise
look if you add openoffice jars from lib\server\dependencies\openoffice in Alfrescoebedded project

Smiley Happy

davidc
Star Contributor
Star Contributor
Which version of 1.4 are you using?

The latest 1.4 (RC1) fixed the dependencies.