the database is already present how to change the id
already have wasted 2 days on this
the database is already present how to change the id in the class
there is another VFP application using this db.
will this crash the already bound jtables.
this is the actual error message
[EL Warning]: 2010-09-02 17:01:28.861--UnitOfWork(14456678)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseExcepti on
Internal Exception: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Column name 'grpid' appears more than once in the result column list.
Error Code: 264
Call: INSERT INTO a_acc_mst (accname, acccd, userid, panno, address1, address2, address3, renewdate, note, phoneno, stateid, compid, updatedon, closedate, cityid, creditlimit, tdsrate, taxno1, GRPID, regionid, opendate, prefix, taxno2, grpid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [NEW ACCOUNT, , 0, , , , , 2010-09-02 17:01:28.541, , , 0, 0, 2010-09-02 17:01:28.541, 2010-09-02 17:01:28.541, 0, 0, 0, , 0, 0, 2010-09-02 17:01:28.541, , , 58]
Query: InsertObjectQuery(mytable.AAccMst[accid=null])
Exception in thread "AWT-EventQueue-0" javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseExcepti on
Internal Exception: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Column name 'grpid' appears more than once in the result column list.
Error Code: 264 (My comment this error is generated when same field is repeated in insert)
Call: INSERT INTO a_acc_mst (accname, acccd, userid, panno, address1, address2, address3, renewdate, note, phoneno, stateid, compid, updatedon, closedate, cityid, creditlimit, tdsrate, taxno1, GRPID, regionid, opendate, prefix, taxno2, grpid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [NEW ACCOUNT, , 0, , , , , 2010-09-02 17:01:28.541, , , 0, 0, 2010-09-02 17:01:28.541, 2010-09-02 17:01:28.541, 0, 0, 0, , 0, 0, 2010-09-02 17:01:28.541, , , 58]
Query: InsertObjectQuery(mytable.AAccMst[accid=null])
have to remove some more code with it still error exists
have to remove some more code with it
like getter setter
the code compiles (sorry the project builds) but exception is thrown at the start of application loading data
[EL Info]: 2010-09-02 19:40:12.038--ServerSession(33539718)--EclipseLink, version: Eclipse Persistence Services - 2.0.2.v20100323-r6872
[EL Severe]: 2010-09-02 19:40:14.452--ServerSession(33539718)--Local Exception Stack:
Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [AAccMst.findByGrpid: SELECT a FROM AAccMst a WHERE a.grpid = :grpid], line 1, column 32: unknown state or association field [grpid] of class [mytable.AAccMst].
Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [AAccMst.findByGrpid: SELECT a FROM AAccMst a WHERE a.grpid = :grpid], line 1, column 32: unknown state or association field [grpid] of class [mytable.AAccMst].
at org.eclipse.persistence.internal.jpa.EntityManager SetupImpl.deploy(EntityManagerSetupImpl.java:397)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.getServerSession(EntityManagerFactoryI mpl.java:151)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.createEntityManagerImpl(EntityManagerF actoryImpl.java:207)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.createEntityManager(EntityManagerFacto ryImpl.java:195)
at org.eclipse.persistence.exceptions.JPQLException.u nknownAttribute(JPQLException.java:457)
at org.eclipse.persistence.internal.jpa.parsing.DotNo de.validate(DotNode.java:78)
at org.eclipse.persistence.internal.jpa.parsing.Node. validate(Node.java:91)
at org.eclipse.persistence.internal.jpa.parsing.Binar yOperatorNode.validate(BinaryOperatorNode.java:34)
at org.eclipse.persistence.internal.jpa.parsing.Equal sNode.validate(EqualsNode.java:41)
at org.eclipse.persistence.internal.jpa.parsing.Where Node.validate(WhereNode.java:34)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:211)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:187)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:177)
at org.eclipse.persistence.internal.jpa.parsing.JPQLP arseTree.populateReadQueryInternal(JPQLParseTree.j ava:110)
at org.eclipse.persistence.internal.jpa.parsing.JPQLP arseTree.populateQuery(JPQLParseTree.java:84)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl. buildEJBQLDatabaseQuery(EJBQueryImpl.java:202)
at org.eclipse.persistence.internal.jpa.JPAQuery.proc essJPQLQuery(JPAQuery.java:106)
at org.eclipse.persistence.internal.jpa.JPAQuery.prep are(JPAQuery.java:90)
at org.eclipse.persistence.queries.DatabaseQuery.chec kPrepare(DatabaseQuery.java:464)
at org.eclipse.persistence.queries.DatabaseQuery.chec kPrepare(DatabaseQuery.java:430)
at mytable.mainframe.initComponents(mainframe.java:51 )
at mytable.mainframe.<init>(mainframe.java:31)
at mytable.mainframe$7.run(mainframe.java:309)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at org.eclipse.persistence.internal.sessions.Abstract Session.processJPAQueries(AbstractSession.java:174 7)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.initializeDescriptors(DatabaseSessionI mpl.java:409)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.postConnectDatasource(DatabaseSessionI mpl.java:671)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.loginAndDetectDatasource(DatabaseSessi onImpl.java:620)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryProvider.login(EntityManagerFactoryProvider .java:228)
at org.eclipse.persistence.internal.jpa.EntityManager SetupImpl.deploy(EntityManagerSetupImpl.java:369)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)
Caused by: Exception [EclipseLink-8030] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [AAccMst.findByGrpid: SELECT a FROM AAccMst a WHERE a.grpid = :grpid], line 1, column 32: unknown state or association field [grpid] of class [mytable.AAccMst].
at org.eclipse.persistence.exceptions.JPQLException.u nknownAttribute(JPQLException.java:457)
at org.eclipse.persistence.internal.jpa.parsing.DotNo de.validate(DotNode.java:78)
at org.eclipse.persistence.internal.jpa.parsing.Node. validate(Node.java:91)
at org.eclipse.persistence.internal.jpa.parsing.Binar yOperatorNode.validate(BinaryOperatorNode.java:34)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.getServerSession(EntityManagerFactoryI mpl.java:151)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.createEntityManagerImpl(EntityManagerF actoryImpl.java:207)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryImpl.createEntityManager(EntityManagerFacto ryImpl.java:195)
at mytable.mainframe.initComponents(mainframe.java:51 )
at mytable.mainframe.<init>(mainframe.java:31)
at mytable.mainframe$7.run(mainframe.java:309)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at org.eclipse.persistence.internal.jpa.parsing.Equal sNode.validate(EqualsNode.java:41)
at org.eclipse.persistence.internal.jpa.parsing.Where Node.validate(WhereNode.java:34)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:211)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:187)
at org.eclipse.persistence.internal.jpa.parsing.Parse Tree.validate(ParseTree.java:177)
at org.eclipse.persistence.internal.jpa.parsing.JPQLP arseTree.populateReadQueryInternal(JPQLParseTree.j ava:110)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)
at org.eclipse.persistence.internal.jpa.parsing.JPQLP arseTree.populateQuery(JPQLParseTree.java:84)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl. buildEJBQLDatabaseQuery(EJBQueryImpl.java:202)
at org.eclipse.persistence.internal.jpa.JPAQuery.proc essJPQLQuery(JPAQuery.java:106)
at org.eclipse.persistence.internal.jpa.JPAQuery.prep are(JPAQuery.java:90)
at org.eclipse.persistence.queries.DatabaseQuery.chec kPrepare(DatabaseQuery.java:464)
at org.eclipse.persistence.queries.DatabaseQuery.chec kPrepare(DatabaseQuery.java:430)
at org.eclipse.persistence.internal.sessions.Abstract Session.processJPAQueries(AbstractSession.java:174 7)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.initializeDescriptors(DatabaseSessionI mpl.java:409)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.postConnectDatasource(DatabaseSessionI mpl.java:671)
at org.eclipse.persistence.internal.sessions.Database SessionImpl.loginAndDetectDatasource(DatabaseSessi onImpl.java:620)
at org.eclipse.persistence.internal.jpa.EntityManager FactoryProvider.login(EntityManagerFactoryProvider .java:228)
at org.eclipse.persistence.internal.jpa.EntityManager SetupImpl.deploy(EntityManagerSetupImpl.java:369)
... 14 more
BUILD SUCCESSFUL (total time: 9 seconds)