Here is the code:
import java.text.*;
import java.util.*;
import org.jivesoftware.wildfire.*;
public class Test
{
public void PrintLog(String p_strStatement)
{
Format l_fmtDate = new SimpleDateFormat("[hh:mm:ss a]");
System.out.println(l_fmtDate.format(new java.util.Date()) + " " + p_strStatement + “\n”);
}
public static void main(String args[])
{
Test l_test = new Test();
l_test.PrintLog(“Before”);
XMPPServer l_xmppServer = new XMPPServer();
l_test.PrintLog(“After”);
}
}
After ran, I got:
E:\Jabber\API\Smack 2.1.0\code>“E:\Program Files\Java\jdk1.5.0_06\bin\java” -DwildfireHome=“E:/Program Files/Wildfire” -classpath "E:\Program Files\Wi
ldfire\lib\wildfire.jar;E:\Program Files\Wildfire\lib\servlet.jar;E:\Jabber\API\Smack 2.1.0\smack.jar;E:\Jabber\API\Smack 2.1.0\smackx.jar;./" Test
Before
Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.
java.lang.IllegalArgumentException: java.lang.NullPointerException
at org.jivesoftware.wildfire.XMPPServer.verifyDataSource(XMPPServer.java:582)
at org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:340)
at org.jivesoftware.wildfire.XMPPServer.(XMPPServer.java:135)
at Test.main(Test.java:20)
Caused by: java.lang.NullPointerException
at org.jivesoftware.wildfire.XMPPServer.verifyDataSource(XMPPServer.java:571)
… 3 more
Error starting the server. Please check the log files for more information.
After
Log file:
2006.02.20 22:26:29 [org.jivesoftware.database.DefaultConnectionProvider.start(DefaultConnectionPro vider.java:88)
]
java.io.IOException
at org.jivesoftware.database.ConnectionPool.(XMPPServer.java:135)
at Test.main(Test.java:20)
Caused by: java.lang.NullPointerException
at org.jivesoftware.wildfire.XMPPServer.verifyDataSource(XMPPServer.java:571)
… 3 more
What’'s wrong ? This app and wildfire is on the same PC. Widlfire was running at that time.
Your help is really appreciated. Thanks !