Trouble bug on explorer

#1

Hello having trouble when i try to push new objects from class.

I got exception from explorer.

KadirBASOL:bin apple$ java -jar explorer.jar

Jul 19 20:00:52 KadirBASOL.local java[9942] <Error>: CGContextGetCTM: invalid context 0x0
Jul 19 20:00:52 KadirBASOL.local java[9942] <Error>: CGContextSetBaseCTM: invalid context 0x0
Jul 19 20:00:52 KadirBASOL.local java[9942] <Error>: CGContextGetCTM: invalid context 0x0
Jul 19 20:00:52 KadirBASOL.local java[9942] <Error>: CGContextSetBaseCTM: invalid context 0x0
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.4.1_06] javax.persistence.PersistenceException
Failed to set numeric value of field field model.User.gid using enhanced method (error 362)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: com.objectdb.o.UserException: Failed to set numeric value of field field model.User.gid using enhanced method
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.UMR.M(UMR.java:905)
at com.objectdb.o.UMR.F(UMR.java:738)
at com.objectdb.o.VGN.e(VGN.java:76)
at com.objectdb.o.MMM.Q(MMM.java:685)
at com.objectdb.o.MMM.O(MMM.java:660)
at com.objectdb.o.OBM.bx(OBM.java:384)
at com.objectdb.o.OBM.bx(OBM.java:255)
at com.objectdb.jpa.EMImpl.persist(EMImpl.java:375)
... 88 more
Caused by: java.lang.IllegalArgumentException
at model.User.__odbSetNumMember(Unknown Source)
at com.objectdb.o.UMR.G(UMR.java:751)
at com.objectdb.o.UMR.F(UMR.java:735)
... 94 more
Exception in thread "AWT-EventQueue-0" [ObjectDB 2.4.1_06] javax.persistence.PersistenceException
Failed to set numeric value of field field model.User.gid using enhanced method (error 362)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: com.objectdb.o.UserException: Failed to set numeric value of field field model.User.gid using enhanced method
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.UMR.M(UMR.java:905)
at com.objectdb.o.UMR.F(UMR.java:738)
at com.objectdb.o.VGN.e(VGN.java:76)
at com.objectdb.o.MMM.Q(MMM.java:685)
at com.objectdb.o.MMM.O(MMM.java:660)
at com.objectdb.o.OBM.bx(OBM.java:384)
at com.objectdb.o.OBM.bx(OBM.java:255)
at com.objectdb.jpa.EMImpl.persist(EMImpl.java:375)
... 88 more
Caused by: java.lang.IllegalArgumentException
at model.User.__odbSetNumMember(Unknown Source)
at com.objectdb.o.UMR.G(UMR.java:751)
at com.objectdb.o.UMR.F(UMR.java:735)
... 94 more

here is my class file:

package model;

import javax.jdo.annotations.Index;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* Created with IntelliJ IDEA.
* User: apple
* Date: 15.07.2012
* Time: 18:54
* To change this template use File | Settings | File Templates.
*/

@NamedQueries({
@NamedQuery(name = "User.findAll", query = "Select c from User c")
})
@SequenceGenerator(name="seq", initialValue=10000)
@Entity
public class User implements Serializable {
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq")
    private int     gid;
    @Index
    private int     id;


    private String  userName;
    private String  pwd;
    private String  ircim;
    private String  mail;
    private int     access;
    private int     programType;
    private Date    regDate;
    private Date    regEnd;
    private String  jxtaUUID;
    private String  lastIp;
    private int     flags;

    private int     perUser;


    private boolean online;
    private boolean allowIdWaitMe;


    @OneToOne(fetch = FetchType.EAGER)
    private Language  mainLanguage;
    @OneToMany(fetch = FetchType.LAZY)
    private List<Language> languages;

    public final int getGid() {
        return gid;
    }

    public final void setGid(int gid) {
        this.gid = gid;
    }

    public final int getId() {
        return id;
    }

    public final void setId(int id) {
        this.id = id;
    }

    public final String getUserName() {
        return userName;
    }

    public final void setUserName(String userName) {
        this.userName = userName;
    }

    public final String getPwd() {
        return pwd;
    }

    public final void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public final String getIrcim() {
        return ircim;
    }

    public final void setIrcim(String ircim) {
        this.ircim = ircim;
    }

    public final String getMail() {
        return mail;
    }

    public final void setMail(String mail) {
        this.mail = mail;
    }

    public final int getAccess() {
        return access;
    }

    public final void setAccess(int access) {
        this.access = access;
    }

    public final int getProgramType() {
        return programType;
    }

    public final void setProgramType(int programType) {
        this.programType = programType;
    }

    public final Date getRegDate() {
        return regDate;
    }

    public final void setRegDate(Date regDate) {
        this.regDate = regDate;
    }

    public final Date getRegEnd() {
        return regEnd;
    }

    public final void setRegEnd(Date regEnd) {
        this.regEnd = regEnd;
    }

    public final String getJxtaUUID() {
        return jxtaUUID;
    }

    public final void setJxtaUUID(String jxtaUUID) {
        this.jxtaUUID = jxtaUUID;
    }

    public final String getLastIp() {
        return lastIp;
    }

    public final void setLastIp(String lastIp) {
        this.lastIp = lastIp;
    }

    public final int getFlags() {
        return flags;
    }

    public final void setFlags(int flags) {
        this.flags = flags;
    }

    public final boolean isOnline() {
        return online;
    }

    public final void setOnline(boolean online) {
        this.online = online;
    }

    public final Language getMainLanguage() {
        return mainLanguage;
    }

    public final void setMainLanguage(Language mainLanguage) {
        this.mainLanguage = mainLanguage;
    }

    public final List<Language> getLanguages() {
        return languages;
    }

    public final void setLanguages(List<Language> languages) {
        this.languages = languages;
    }
}

Whats wrong?

I'm using MAC OSX Lion

#2

What exactly do you do in the Explorer that causes this exception?

Are you trying to edit the gid field?

ObjectDB Support
#3

no i wanted to create new entity objects , i got this error.

When i click on "Create and Persist" button on explorer by clicking model.User

 

#4

Could you please provide a demo odb file + instructions how to reproduce the problem in the Explorer?

ObjectDB Support
#5

http://www.2shared.com/file/aKP8hGVb/db_online.html

#6

When i click on Open Table Windows

 

[ObjectDB 2.4.1_06] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_04-ea (on Mac OS X 10.7.4).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.PRU.o(PRU.java:175)
at com.objectdb.o.VLV.m(VLV.java:165)
at com.objectdb.o.VLV.n(VLV.java:186)
at com.objectdb.o.EVC.l(EVC.java:113)
at com.objectdb.o.STA.T(STA.java:515)
at com.objectdb.o.STM.E(STM.java:425)
at com.objectdb.o.OBM.bJ(OBM.java:896)
at com.objectdb.jdo.PMImpl.bJ(PMImpl.java:2187)
at com.objectdb.o.OBM.bI(OBM.java:812)
at com.objectdb.o.OBM.bH(OBM.java:762)
at com.objectdb.o.EXT$f.<init>(EXT.java:249)
at com.objectdb.o.EXT.iterator(EXT.java:139)
at com.objectdb.o.ETI.af(ETI.java:56)
at com.objectdb.o.ETI.<init>(ETI.java:47)
at com.objectdb.o.SCP.p(SCP.java:227)
at com.objectdb.o.SCP.Vu(SCP.java:182)
at com.objectdb.o.RTR.Vu(RTR.java:68)
at com.objectdb.o.CMD.actionPerformed(CMD.java:469)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

 

 

#7

That was a new regression bug that was caused by fixing another problem in one of the recent builds.

Version 2.4.2 fixes this exception. Thank you for your report.

ObjectDB Support
#8

Hello again , when i tried to change variable on object.

I got error again as shown below:

 

[ObjectDB 2.4.2] java.lang.IllegalArgumentException
Attempt to lock a new (non stored yet) entity object (error 635)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:508)
at javax.swing.JTextField.postActionEvent(JTextField.java:721)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:836)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1661)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
at java.awt.Component.processEvent(Component.java:6282)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1893)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:752)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1017)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:889)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:717)
at java.awt.Component.dispatchEventImpl(Component.java:4731)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

#9

again when i try to persist

Language class

i've got error like this on explorer:

Exception in thread "AWT-EventQueue-0" [ObjectDB 2.4.2] javax.persistence.PersistenceException
Failed to get numeric value of field field model.Language.langId using enhanced method (error 362)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: com.objectdb.o.UserException: Failed to get numeric value of field field model.Language.langId using enhanced method
at com.objectdb.o.MSG.d(MSG.java:74)
at com.objectdb.o.UMR.M(UMR.java:905)
at com.objectdb.o.UMR.H(UMR.java:767)
at com.objectdb.o.UMR.q(UMR.java:353)
at com.objectdb.o.UML.s(UML.java:485)
at com.objectdb.o.MMM.X(MMM.java:801)
at com.objectdb.o.OBM.bx(OBM.java:392)
at com.objectdb.o.OBM.bx(OBM.java:255)
at com.objectdb.jpa.EMImpl.persist(EMImpl.java:375)
... 88 more
Caused by: java.lang.NullPointerException
at model.Language.__odbGetNumMember(Unknown Source)
at com.objectdb.o.UMR.I(UMR.java:780)
at com.objectdb.o.UMR.H(UMR.java:764)
... 94 more

 

 

package model;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
* Created with IntelliJ IDEA.
* User: apple
* Date: 17.07.2012
* Time: 16:40
* To change this template use File | Settings | File Templates.
*/
@Entity
public class Language implements Serializable {
    @Id
    private int         langId;
    private String      langCode;

    public int getLangId() {
        return langId;
    }

    public void setLangId(int langId) {
        this.langId = langId;
    }

    public String getLangCode() {
        return langCode;
    }

    public void setLangCode(String langCode) {
        this.langCode = langCode;
    }
}

 

#10

This is another problem.

Currently you cannot use the Explorer to create new entity objects with no automatic ID.

But this should work:

@Entity
public class Language implements Serializable {
    @Id @GeneratedValue // ID will be generated automatically
    private int         langId;
ObjectDB Support
#11

Your explorer is full of bug , i can't persist any object on the explorer.
You should make many checks for mac OSX Lion 
i got bored and i m not happy to migrate from mysql to objectdb because of explorer bugs.

 

KadirBASOL:bin apple$ java -jar explorer.jar
Jul 27 18:04:14 KadirBASOL.local java[54604] <Error>: CGContextGetCTM: invalid context 0x0
Jul 27 18:04:14 KadirBASOL.local java[54604] <Error>: CGContextSetBaseCTM: invalid context 0x0
Jul 27 18:04:14 KadirBASOL.local java[54604] <Error>: CGContextGetCTM: invalid context 0x0
Jul 27 18:04:14 KadirBASOL.local java[54604] <Error>: CGContextSetBaseCTM: invalid context 0x0
Jul 27 18:04:46 KadirBASOL.local java[54604] <Error>: CGContextGetCTM: invalid context 0x0
Jul 27 18:04:46 KadirBASOL.local java[54604] <Error>: CGContextSetBaseCTM: invalid context 0x0
[ObjectDB 2.4.2] select c from  ==> User <==  c
javax.persistence.PersistenceException
Type User is not found (error 301)
(position 14) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: com.objectdb.o.TEX: Type User is not found
at com.objectdb.o.MSG.e(MSG.java:107)
at com.objectdb.o.TRS.g(TRS.java:212)
at com.objectdb.o.SYR.o(SYR.java:243)
at com.objectdb.o.SYR.l(SYR.java:172)
at com.objectdb.o.QRC.<init>(QRC.java:146)
at com.objectdb.jpa.JpaQuery.analyzeQuery(JpaQuery.java:652)
... 40 more
[ObjectDB 2.4.2] select c from User c ==> ; <==
javax.persistence.PersistenceException
Unexpected query token ';' (error 752)
(position 20) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)

at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: com.objectdb.o.UserException: Unexpected query token ';'
at com.objectdb.o.MSG.d(MSG.java:61)
at com.objectdb.o.TKN.J(TKN.java:765)
at com.objectdb.o.TKI.s(TKI.java:229)
at com.objectdb.o.QPR.o(QPR.java:158)
at com.objectdb.o.QRC.<init>(QRC.java:121)
at com.objectdb.jpa.JpaQuery.analyzeQuery(JpaQuery.java:652)
... 40 more
KadirBASOL:bin apple$ java -jar explorer.jar
Jul 29 19:18:24 KadirBASOL.local java[59257] <Error>: CGContextGetCTM: invalid context 0x0
Jul 29 19:18:24 KadirBASOL.local java[59257] <Error>: CGContextSetBaseCTM: invalid context 0x0
Jul 29 19:18:24 KadirBASOL.local java[59257] <Error>: CGContextGetCTM: invalid context 0x0
Jul 29 19:18:24 KadirBASOL.local java[59257] <Error>: CGContextSetBaseCTM: invalid context 0x0

 

 

 

 

 

#12

The Explorer is intended mainly for viewing, querying and editing existing objects.

Creating new objects is also supported but currently with some limitations (see #10).

Your last exceptions indicate:

  • Trying to use a class (User) that is still unknown to ObjectDB.
  • Invalid query - the ; symbol is unexpected.
ObjectDB Support

Reply