Hi Suran,
It seems that you need to fix the makeRow() method of one of your
catalog row factories. The assertion is complaining that when you call
makeRow() with null arguments, it returns a row whose 10th column has a
null data value.
If that doesn't help push the problem forward, I can take a look at your
catalog row factories if you attach them to the JIRA.
Hope this helps,
-Rick
Suran Jayathilaka wrote:
Thanks Rick. That did the trick. The 3rd argument is a random Long, is
it not?
When running tests with my code changes, I get this exception. I've
highlighted the bit I think is important in this case.
The error is "row template is null for column[9]"
Column #9 is the "increment" value, which is a long (assuming the
column count here starts at 1 and not 0).
==========================================================
2009-06-09 19:40:18.434 GMT Thread[DRDAConnThread_3,5,derby.daemons]
Cleanup action starting
java.sql.SQLException: Failed to create database 'wombat', see the
next exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:223)
at
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2449)
at
org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:396)
at
org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:73)
at
org.apache.derby.impl.jdbc.EmbedConnection40.<init>(EmbedConnection40.java:54)
at
org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:68)
at
org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:238)
at
org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:119)
at
org.apache.derby.impl.drda.Database.makeConnection(Database.java:248)
at
org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(DRDAConnThread.java:1397)
at
org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(DRDAConnThread.java:1347)
at
org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(DRDAConnThread.java:3198)
at
org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1143)
at
org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:948)
at
org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:290)
Caused by: java.sql.SQLException: Failed to create database 'wombat',
see the next exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
... 16 more
Caused by: java.sql.SQLException: Startup failed due to an exception.
See next exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:223)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:398)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2201)
... 14 more
Caused by: java.sql.SQLException: Java exception: 'ASSERT FAILED row
template is null for column[9].:
org.apache.derby.shared.common.sanity.AssertFailure'.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
... 17 more
Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT
FAILED row template is null for column[9].
at
org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
at
org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
* at
org.apache.derby.impl.store.access.conglomerate.ConglomerateUtil.createFormatIds(ConglomerateUtil.java:146)
at org.apache.derby.impl.store.access.heap.Heap.create(Heap.java:298)
at
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(HeapConglomerateFactory.java:195)
at
org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(RAMTransaction.java:823)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createConglomerate(DataDictionaryImpl.java:8101)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.makeCatalog(DataDictionaryImpl.java:7275)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createDictionaryTables(DataDictionaryImpl.java:7134)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(DataDictionaryImpl.java:725)*
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:2021)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:573)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:427)
at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:214)
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:2021)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291)
at
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1858)
at
org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1044)
at
org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:596)
at
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2443)
... 13 more
=====================================================
This is thrown when DataDictionaryImpl is trying to create the
SYSSequences catalog. Where do I provide row templates for the catalog
row columns?
Thanks!
Suran
On Tue, Jun 9, 2009 at 9:53 PM, Rick Hillegas
<[email protected] <mailto:[email protected]>> wrote:
Suran Jayathilaka wrote:
Hi,
I want to generate a few UUIDs for the SYSSequences and
SYSPerms Catalog row factories which I'm adding as part of the
sequence generators work.
I'm having some trouble with generating UUIDs using
BasicUUIDFactory. I tried following the T-UUIDFactory test but
that didn't work becaue the Monitor object was null.
Can someone please point me in the right direction for
achieveing this?
Thanks!
Suran
Hi Suran,
I suggest constructing a BasicUUID directly without going through
the factory. Try the following:
import org.apache.derby.impl.services.uuid.BasicUUID;
public class UUIDMaker
{
public static void main( String[] args )
throws Exception
{
BasicUUID uuid = new BasicUUID(
Runtime.getRuntime().freeMemory(), System.currentTimeMillis(),
(int) 2551218188L );
System.out.println( uuid );
}
}
Hope this helps,
-Rick