powered by Jive Software

Exception: Could not lanuch openfire

I run “ant clean”: then delete openfire/target/ and openfire/work

then i run “ant openfire”

but when i run openfire

the Exception occure:

java.lang.NoClassDefFoundError: org/jivesoftware/openfire/starter/ServerStarter

Caused by: java.lang.ClassNotFoundException: org.jivesoftware.openfire.starter.S

erverStarter

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

Exception in thread “main”

how to deal with this?thank you

I see the openfire.jar ,I didn’t find the org.jivesoftware.openfire.starter.ServerStarter.class

How did you run openfire through Ant or Shell?

The ServerStarter is in startup.jar, make sure it is under your classpath.

sorry i didn’t make it clear:

I develop openfire through myEclipse6.5 in win xp

I confire openfire through this artical

http://www.igniterealtime.org/community/docs/DOC-1020

thank you , I solve this problem

I add the startup.jar to the classpath then this exception occur

java.lang.ClassNotFoundException: org.jivesoftware.openfire.XMPPServer
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:104
)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)

so I also add the openfire.jar to the classpath

then the openfire start normally ,but i didn’t know why ? because i add jar from the openfire/target/lib

but the openfire genrate target after “ant openfire” why the first configure from

http://www.igniterealtime.org/community/docs/DOC-1020

can start openfire normally ,they didn’t add /openfire/target/startup.jar ,/openfire/target/openfire.jar ?

Are you still using Eclipse 3.3? With 3.5.2 also I get this exception.

yes I still use myEclise6.5 Eclipse 3.3

I am using eclipse kepler.

I have created an openfire project by fetching the source code using git.

I am getting below error even after adding startup.jar and openfire.jar files in the classpath.

Error: Could not find or load main class org.jivesoftware.openfire.starter.ServerStarter

Can someone please help or suggest any other solution?

Don’t bother with startup.jar.

If you want to start Openfire from an IDE you need to put the src/java folder to your source folders/classpath.

Also the i18n folder and the resource/jar folder.

Tried it.Dint work…