cancel
Showing results for 
Search instead for 
Did you mean: 

Null in Reading the Application Context when i Export my app

mmrs
Champ in-the-making
Champ in-the-making
Hi all,
I Have a desktop application that read images from scanner and save them into Alfresco repository.

the program works fine inside the IDE [eclipse] …
but i need it to work as a jar file to be executed from .bat file.

when i execute the jar file it keep giving me :
java.lang.NullPointerException
        at org.alfresco.util.RuntimeSystemPropertiesSetter.postProcessBeanFactory(RuntimeS
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactor
        at org.springframework.context.support.AbstractApplicationContext.refresh(Abstract
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Class
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(Class
        at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationCon
        at org.alfresco.sample.FirstFoundationClient.main(FirstFoundationClient.java:70)

It's might be cause of reading the alfresco-jmxrmi.password file from inside the application jar.But i don't know how to solve the problem.
i need the application to be assembled in a jar file.That's why i can't extract the config.jar content that contain that file.

help is appreciated
Best regards
mmrs
1 REPLY 1

robertmarkbram
Champ in-the-making
Champ in-the-making
Hi Mmrs,

It does indeed sound like there is an issue with the way you are reading a property file from within a jar.

Have a look at this article from Keenertech: Reading a Resource From a Jar File.

Good luck,

Rob
Smiley Happy