You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by shashanka tilak <sh...@yahoo.com> on 2006/04/20 18:03:07 UTC
derby exception
Hi,
I am a new user of derby. I would like to learn and contribute for this project. I successfully compiled the derby source and I tried to run the SimpleApp.java provided as demo for starting derby in embedded mode. But, I get the following exception when I run the program. I did not jar the compiled classes. The classes are in exploded directory structure. A new directory "derbyDB\log" was created. And derby.log shows the following exception. I would really appreciate if someone can give explanation.
Thank you.
2006-04-17 16:06:58.625 GMT Thread[main,5,main] Cleanup action starting
java.lang.NullPointerException
at org.apache.derby.impl.store.raw.log.LogToFile.getFirstLogNeeded(LogToFile.java:2103)
at org.apache.derby.impl.store.raw.log.LogToFile.deleteObsoleteLogfiles(LogToFile.java:3173)
at org.apache.derby.impl.store.raw.log.LogToFile.stop(LogToFile.java:3156)
at org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:404)
at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:348)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1866)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1018)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:579)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:1513)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:224)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:72)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:187)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at SimpleApp.go(SimpleApp.java:94)
at SimpleApp.main(SimpleApp.java:61)
Cleanup action completed
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: derby exception
Posted by Suresh Thalamati <su...@gmail.com>.
shashanka tilak wrote:
> Hi,
>
> I am a new user of derby. I would like to learn and contribute for this
> project. I successfully compiled the derby source and I tried to run the
> SimpleApp.java provided as demo for starting derby in embedded mode.
> But, I get the following exception when I run the program. I did not jar
> the compiled classes. The classes are in exploded directory structure.
> A new directory "derbyDB\log" was created. And derby.log shows the
> following exception. I would really appreciate if someone can give
> explanation.
>
> Thank you.
>
> 2006-04-17 16:06:58.625 GMT Thread[main,5,main] Cleanup action starting
> java.lang.NullPointerException
> at
> org.apache.derby.impl.store.raw.log.LogToFile.getFirstLogNeeded(LogToFile.java:2103)
>
>
....<snip>
Was there any other error from the program or in the derby.log. The
NPE is not the real problem, as u see from the stack it is coming from
the shutdown as part of cleanup. NPE is just a side effect of some
other error.
First thing, I would check is, if there is enough space on the disk ?
What JVM/OS are you using to run the demo ?
Thanks.
-suresh
Re: derby exception
Posted by Andrew McIntyre <mc...@gmail.com>.
On 4/20/06, shashanka tilak <sh...@yahoo.com> wrote:
> I get the following exception when I run the program. I did not jar the
> compiled classes. The classes are in exploded directory structure. A new
> directory "derbyDB\log" was created. And derby.log shows the following
> exception. I would really appreciate if someone can give explanation.
>
> Thank you.
>
> 2006-04-17 16:06:58.625 GMT Thread[main,5,main] Cleanup action starting
> java.lang.NullPointerException
> at
> org.apache.derby.impl.store.raw.log.LogToFile.getFirstLogNeeded(LogToFile.java:2103)
At this point in the code, a log file is expected to be in the log
directory, but from your comments the log file has not been created.
Do you have the correct permissions to read/write to the directory? Is
the disk full?
>From the exception you're getting, it would seem that uselessLogFile
is null, thus the call to getPath() throws a NullPointerException.
It's not quite clear to me how this could happen, but perhaps someone
more familiar with the store code could answer that question.
andrew