Failed to start database 'persistant_store'

Hi,

i dont know why, during my development, i am getting the below error message more frequently:

SQL Exception: Failed to start database ‘persistant_store’, see the next exception for details.
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.getDataConnection(PersistantInMemoryDataSpace.java:444)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.checkTables(PersistantInMemoryDataSpace.java:361)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.(PersistantInMemoryDataSpace.java:220)
at com.sun.gi.SGS.startupGame(SGS.java:222)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)
SQL Exception: Failed to start database ‘persistant_store’, see the next exception for details.
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.(Unknown Source)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.getDataConnection(PersistantInMemoryDataSpace.java:444)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.checkTables(PersistantInMemoryDataSpace.java:362)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.(PersistantInMemoryDataSpace.java:220)
at com.sun.gi.SGS.startupGame(SGS.java:222)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)
java.lang.NullPointerException
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.checkTables(PersistantInMemoryDataSpace.java:363)
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.(PersistantInMemoryDataSpace.java:220)
at com.sun.gi.SGS.startupGame(SGS.java:222)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)
java.lang.NullPointerException
at com.sun.gi.objectstore.tso.dataspace.PersistantInMemoryDataSpace.lookup(PersistantInMemoryDataSpace.java:769)
at com.sun.gi.objectstore.tso.dataspace.DataSpaceTransactionImpl.lookupName(DataSpaceTransactionImpl.java:391)
at com.sun.gi.objectstore.tso.TSOTransaction.lookup(TSOTransaction.java:179)
at com.sun.gi.logic.impl.SimulationImpl.(SimulationImpl.java:286)
at com.sun.gi.SGS.startupGame(SGS.java:240)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)

i tried to remove the entire persistent_store and restart the SGS, it still returns the following error. but sometimes, after a couple times of re-running the start-SGS.sh, it turns out working fine. puzzled

Jun 14, 2006 3:04:06 AM com.sun.gi.comm.users.server.impl.TCPIPUserManager init
INFO: Starting TCPIP User Manager on /155.69.125.79:1180
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at com.sun.gi.utils.nio.NIOSocketManager.acceptConnectionsOn(NIOSocketManager.java:155)
at com.sun.gi.comm.users.server.impl.TCPIPUserManager.init(TCPIPUserManager.java:134)
at com.sun.gi.comm.users.server.impl.TCPIPUserManager.(TCPIPUserManager.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.gi.SGS.startupGame(SGS.java:260)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.gi.SGS.startupGame(SGS.java:260)
at com.sun.gi.SGS.(SGS.java:180)
at com.sun.gi.SGS.main(SGS.java:330)
Caused by: java.lang.InstantiationException: TCPIPUserManager failed to initialize
at com.sun.gi.comm.users.server.impl.TCPIPUserManager.init(TCPIPUserManager.java:137)
at com.sun.gi.comm.users.server.impl.TCPIPUserManager.(TCPIPUserManager.java:124)
… 7 more

Am i doing anything illegal that results in this? How can i resolve this issue?

Hi,

The second error (at the bottom) actually looks suspiciously liek you already have one copy of the server running and you tried to start another.
If this is Linux or Solaris doing a “pkill java” should stop all Java process runnign in your machine.

The first kind of looks like a known error where sometimes killing the server leaves the datbase in a messed up state. What puzzles me is that it has always been our experience that doing an rm -r persistant_store fixes this. Are you positive you waited for the rm to complete before trying to restart the sever?

The EA2 release, which I am currently workign on completing, has a better shutdown mechanism that wil let you shut it down without risking messing up the Object Store.

JK

yes, i did. somehow durin the development, the 1st error will pop up. i will then remove the persistent_store folder and re-start. then i pops up the 2nd error. i have been spends hrs tryin to debug but no solutions.

Are you saying that the object store is not ACID compliant? I got the impression that the object executions always took objects from a consistent, durable state to another consistent, durable state, and that this replicated across server nodes insofaras all write updates are either consistent and durable, or rolled back. Is this not the case? (In my experience, that’s pretty much a requirement for any large back-end server, including games).

Thats because the first run of the server is still running.

(1) pkill java
(2) rm -r persistant_store
(3) restart server

That is correct., Thsi is a bug. We arent sure right now if its in our code or in derby. Im actuallyt somewhat suspicious of derby.

ok. thanks. 8)