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