[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Null Pointer when trying to use my persistent class



Hello All:

I was tracing through some of the ozone source code and found
this in the log:
[warn] (614) Transaction: nameObject()
    java.lang.NullPointerException

    	at
org.ozoneDB.core.wizardStore.WizardStore.nameContainer(WizardStore
            .java:297)

    	at org.ozoneDB.core.Transaction.nameObject(Transaction.java:429)

    	at org.ozoneDB.core.Transaction.createObject(Transaction.java:318)

    	at
org.ozoneDB.core.DbRemote.DbCreateObj.perform(DbCreateObj.java:43)            

    	at
org.ozoneDB.core.Transaction.performCommand(Transaction.java:189)

    	at
org.ozoneDB.core.TransactionManager.performCommand(TransactionMana
            ger.java:304)

    	at
org.ozoneDB.core.TransactionManager.completeTransaction(Transactio
            nManager.java:276)

    	at
org.ozoneDB.core.TransactionManager.handleCommand(TransactionManag
            er.java:195)

    	at
org.ozoneDB.core.DbRemote.DbLocalClient.send(DbLocalClient.java:51
            )

    	at
org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java:313
            )

    	at
org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java:296
            )

    	at
org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java:41
            3)

    	at
org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java:40
            7)

    	at OzoneTest.<init>(OzoneTest.java:39)

    	at OzoneTest.main(OzoneTest.java:50)


I ran this code in the debugger, and it does on line 299 of 
WizardStore (I guess the published sources and jar files are a little
out of sync):
        TransactionData taData = (TransactionData)ta.data;
        if (taData.nameTable == null)
            taData.nameTable = (DxMap)nameTable.clone();

The taData.nameTable is null and apparently the clone method is
throwing a null pointer exception.  The local nameTable is not null
in my debugger, but I cant debug into the clone method for some reason.

I hope this helps,
	Neil.

--
Neil Aggarwal, President & CEO
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Programming in Java, C++, HTML, perl