daydreamer6565
asked on
Failed to start database error
when i wrote code to create my second table in derby i got the following error-
java.sql.SQLException: Failed to start database 'C:/Users/Dell/Documents/N etBeansPro jects/RCSS ystem/newd emo'
attaching the whole error ....
please help..
run.txt
java.sql.SQLException: Failed to start database 'C:/Users/Dell/Documents/N
attaching the whole error ....
please help..
run.txt
ASKER
I removed "create=true" from my connection code...but still the error is coming..
attaching the modified connection code... Pls help..
connection-code.txt
attaching the modified connection code... Pls help..
connection-code.txt
so error did not change at all?
Do you have newdemo folder in
C:\Users\Dell\Documents\Ne tBeansProj ects\RCSSy stem\ ?
Do you have newdemo folder in
C:\Users\Dell\Documents\Ne
check if you ahve file db.lck inside newdemo folder
http://db.apache.org/derby/docs/dev/devguide/cdevdvlp20458.html
Derby prevents two instances of itself from booting the same database by using a file called db.lck inside the database directory.
If a second instance of Derby attempts to boot an already running database, the following error messages appear:
ERROR XJ040: Failed to start database 'firstdb', see the next exception
for details.
ERROR XSDB6: Another instance of Derby may have already booted the
database /home/myself/DERBYTUTOR/fi rstdb.
In addition, a stack trace appears in the derby.log file. For help diagnosing a double boot problem, use the derby.stream.error.logBoot Trace property to obtain information about both successful and unsuccessful boot attempts. The property is described in the Derby Reference Manual.
http://db.apache.org/derby/docs/dev/devguide/cdevdvlp20458.html
Derby prevents two instances of itself from booting the same database by using a file called db.lck inside the database directory.
If a second instance of Derby attempts to boot an already running database, the following error messages appear:
ERROR XJ040: Failed to start database 'firstdb', see the next exception
for details.
ERROR XSDB6: Another instance of Derby may have already booted the
database /home/myself/DERBYTUTOR/fi
In addition, a stack trace appears in the derby.log file. For help diagnosing a double boot problem, use the derby.stream.error.logBoot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Make sure you completely stop your application while you're working on it - iow don't have another instance running in another thread
you should not use it if you already created database
Table should be created with SQL command like
stmt.executeUpdate("create
and you should not have create=true in connection string if you alreday have file "newdemo" with the database