Saturday, October 26, 2013

Java DB Bug Fix







Java Derby Bug Fix
Hi Buddies,
                 I came up through some exception while running Java Derby Database. The exception is as follows,

 Bug 1

Exception in thread "main" java.lang.ExceptionInInitializerError
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:141)
>         at org.apache.derby.impl.tools.ij.util.loadDriver(Unknown Source)
>         at org.apache.derby.impl.tools.ij.util.loadDriverIfKnown(Unknown Source)
>         at org.apache.derby.impl.tools.ij.util.startJBMS(Unknown Source)
>         at org.apache.derby.impl.tools.ij.util.startJBMS(Unknown Source)
>         at org.apache.derby.impl.tools.ij.ConnectionEnv.init(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain.(Unknown Source)
>         at org.apache.derby.impl.tools.ij.utilMain14.(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.getutilMain(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.getMain(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
>         at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source)
>         at org.apache.derby.tools.ij.main(Unknown Source)
 
 
Solution :
          While installing JDK7 java derby will also installed and configured. But i explicitly configure different version java derby in class path. That's why the exception thrown. When i deleted class path which i configure explicitly its working fine.
 

 Bug 2

 Exception : org.apache.derby.jdbc.clientdriver class not found
 
Solution : Add class path to derbyclient-xxxx.jar 
 
 
 
 
          

No comments:

Post a Comment