[sip-comm-dev] java.lang.NullPointerException In PropertiesDepot


#1

Could please you help me?

I'm a newbie in sip-communicator and java, but willing to learn more. I'm running sip-communicator under eclise and linux.

In,

package net.java.sip.communicator.common;

the function protected static File getConfigurationFile() causes a java.lang.NullPointerException.

CODE:

···

##########################################################################
console.trace("creating properties file");
                   InputStream in = PropertiesDepot.class.getClassLoader().
                       getResourceAsStream(pFileName);
                   BufferedReader reader = new BufferedReader(new InputStreamReader(in));

##########################################################################

The pointer "in" is null and this generates java.lang.NullPointerException!

Aparently, this is caused by PropertiesDepot.class.getClassLoader().

TRACE:

*************************************************************************
1073 [main] TRACE communicator.SipCommunicator - [exit] <init>
1075 [main] TRACE communicator.SipCommunicator - [exit] main
Exception in thread "main" java.lang.NullPointerException
  at java.io.Reader.<init>(Unknown Source)
  at java.io.InputStreamReader.<init>(Unknown Source)
  at net.java.sip.communicator.common.PropertiesDepot.getConfigurationFile(PropertiesDepot.java:275)
  at net.java.sip.communicator.common.PropertiesDepot.traverseConfigurationFile(PropertiesDepot.java:130)
  at net.java.sip.communicator.common.PropertiesDepot.loadProperties(PropertiesDepot.java:113)
  at net.java.sip.communicator.gui.ConfigFrame.<init>(ConfigFrame.java:88)
  at net.java.sip.communicator.gui.GuiManager.<init>(GuiManager.java:136)
  at net.java.sip.communicator.SipCommunicator.<init>(SipCommunicator.java:112)
  at net.java.sip.communicator.SipCommunicator.main(SipCommunicator.java:274)

****************************************************************************

Thanks,

Rodrigo M. Rosa

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net