Search code examples
jakarta-eenetbeansglassfishderbyclassnotfoundexception

java.lang.ClassNotFoundException: org.apache.derby.iapi.services.property.PropertyUtil


When I create a Java web application in Netbeans and try to deploy and run it, then the following exception is been thrown:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/derby/iapi/services/property/PropertyUtil
    at org.apache.derby.impl.drda.NetworkServerControlImpl.getPropertyInfo(Unknown Source)
    at org.apache.derby.impl.drda.NetworkServerControlImpl.<init>(Unknown Source)
    at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.derby.iapi.services.property.PropertyUtil
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 3 more

Clean and Build is working fine. Earlier, I used to successfully deploy and run another Java web application on the machine where I am facing problem now.

I was using Netbeans 7.1. I tried to upgrade to Netbeans 7.3, but that didn't solve the problem. I also tried to put the MySQL Connector/J JAR file in /lib folder of Glassfish, but that didn't solve the problem.


Solution

  • The only problem was on that machine is, someone delete Java. :(