AnsweredAssumed Answered

Alfresco SDK Samples - FirstFoundationClient not able to run

Question asked by heyitsaakash on Feb 11, 2009
Latest reply on Mar 25, 2011 by carolanna
Hi
I have installed War file of alfresco 2.9 on jboss server 4.2.3GA. After that I am trying to run some sample examples
I am trying to execute the FirstFoundationClient.java after following the steps given in the http://wiki.alfresco.com/wiki/Alfresco_SDK link.

However, I am not able to run the program. Everytime i try i get an error  given below:

————————————————————————————————————
Exception in thread "main" java.lang.NullPointerException
   at org.alfresco.util.RuntimeSystemPropertiesSetter.postProcessBeanFactory(RuntimeSystemPropertiesSetter.java:68)
   at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:414)
   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)

——————————————————————————————————————————————-


I have changed customrepository.xml as follows of the firstfoundationclient as follows:

dir.root=./alf_data
#dir.root=C:\jboss-4.2.3.GA\bin\alf_data

db.username=alfresco
db.password=alfresco

# MySQL connection (This is default and requires mysql-connector-java-3.1.12-bin.jar, which ships with the Alfresco server)
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

—————————————————-
Earlier i was getting some issues while trying to build the project after that I added all the jars present in the exploded war file of alfresco (e.g \alfresco\WEB-INF\lib). THus it was able to recognize the spring related classes like org.springframework.context.ApplicationContext

Can someone please help me out. I am not able to find any proper help on how to proceed and not able to trace where I am going wrong.

Any help is appreciated.

Best Regards,
Aakash Sharma

Outcomes