2

I recently refactored my Java Project, and when performing a login task, I receive the following error (Note that it actually loads up fine) :

java.lang.ClassNotFoundException: org.chal614.model.player.Player
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.entice.util.Serializer.load(Serializer.java:63)
at org.entice.util.Serializer.LoadAccount(Serializer.java:124)
at org.entice.net.codec.LoginDecoder.decode(LoginDecoder.java:103)
at org.entice.net.codec.ConnectionWorker.run(ConnectionWorker.java:43)
at org.entice.net.ServerChannelHandler.messageReceived(ServerChannelHandler.java:107)
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:98)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:345)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:332)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:323)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:275)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:196)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

My previous packaging was org.chal614, however it is now org.entice

Naturally I have checked around, and there are no signs of chal614 references. I am now assuming this is something to do with IDE, rather than within the java code itself. Help would be appreciated.

  • 1
    Have you tried cleaning the project, and restarting your IDE? – Meesh Oct 15 '13 at 20:52
  • @Meesh This was the first thing I did, and unfortunately it didn't – user2727157 Oct 15 '13 at 20:53
  • 1
    I'd manually delete all the content in the output folder and run this again, if you use and or maven, do a clean on these as well. This seems as if your project is a library to another project, is it? – Zeus Oct 15 '13 at 20:58
  • @Zeus I will try this, and I use Eclipse, normally refactoring this project in the past worked fine. **It worked, thank you** – user2727157 Oct 15 '13 at 21:00
  • @Zeus: that is really good advice. In my experience Maven is terrible at updating dependencies and cleaning temporary artifacts. It was so bad I actually had to write batch files to automate cleaning before building. Thankfully I do not use Maven anymore but I still have nightmares. –  Oct 16 '13 at 00:54
  • You can use maven clean to clean the target folders, you dont have to run the batchfiles. – Zeus Oct 16 '13 at 17:34

0 Answers0