explorer NullPointerException

#1

I studied ObjectDB a few hours ago and got some problems when use explorer.

I run it and right-click in 'Open local database' window,and the all the pop menu item is gray and disabled,such as ‘new database’,'new directory','cut','copy' ...

if I click 'tools---options' before open database,

the errot I got is:

[2012-05-22 02:51:11 #1 explorer]
java.lang.NullPointerException at com.objectdb.o.CNC.p(CNC.java:253)
at com.objectdb.o.EHL.d(EHL.java:55) at com.objectdb.o.VPN.
   
    (VPN.java:60) 
   
at com.objectdb.o.OPD.
   
    (OPD.java:69) at com.objectdb.o.OPD.
    
     (OPD.java:42) 
    
   
at com.objectdb.o.RTR.Vu(RTR.java:112) at com.objectdb.o.CMD.actionPerformed(CMD.java:469)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097) at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083) at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605) at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621) at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

my develop environment: oracle jdk-6u32 windowsXP sp3 32bit objectdb-2.4.0. I change environment to other computers,such as windows 2000,oracle jre-7u4,but the problem is still on.

#2

This stack trace indicates a problem in opening the Explorer [Tools > Options] dialog box when no database is open. A fix will be available soon in the next ObjectDB build. As a workaround, open the Options dialog only when a database is open.

Regarding the other issue that you mentioned, the [Recent Connections] menu - could you post a stack trace? The stack trace that you posted is caused on an attempt to open the [Tools > Options] dialog box, and it is not related to the [Recent Connections] menu.

ObjectDB Support
#3

1、the stack what I posted  is exactly about [Tools > Options],

and [Recent Connections] is normal。

2、what I mean is that:

the time when I want to creat a new database,[file>open embedded],right click,

but all the item of pop menu is gray and disabled(has no stack trace),just like the picture I have uploaded。

so,the main problem is that I cannot create a database with explorer

 

#4

Thank you for this report.

Please try build 2.4.0_01 that should fix both issues.

ObjectDB Support
#5

thank you for the post,

I hava downloaded the lastest version,so I can create database and paste\cut\del with the popmenu now.

 

but the other question is that I cannot create new entityObjects.

When I click[edit>new entityObjects] or right click to ues popmenu[new entityObjects],and then click the [Create and Persist] button after select the entity class and specify the number of objects in the dialog box, there is no response .

 

#6

Currently the Explorer doesn't support adding new entity classes, so you cannot create a new database and fill it in the Explorer. This will be addressed in future versions of the Explorer.

Meanwhile, you should start by creating an initial database with initial content by a Java program.

 

ObjectDB Support
#7

Thank you very much.

the doc of objectDb said that,

New Entity Objects
To construct new entity objects and store them in the database, open the [Create New Entity Objects] dialog box using the Edit > New Entity Objects... command. In the dialog box select the entity class and specify the number of objects to construct. Click the Create and Persist button to construct and store the new entity objects.

and I cannot create a new entity objects according to the content above in fact.

That is to say, the Explorer can view/create a database, edit content only.

I said the right?

 

#8

You can create new entity objects in the Explorer, but currently only for known classes. In ObjectDB 1.x the Explorer could also support adding new classes to a database, but this ability is not supported yet in ObjectDB 2.x.

ObjectDB Support

Reply