通过使用 EclipseLink JPA2.0,我构建了一个运行良好的应用程序。然后我在表中添加一些属性并重新生成该表实体。
但是,当我在那个抛出异常的特定实体上通过外观(会话 bean)调用 create 方法时,第一个新列不存在。当我从实体中删除该列时,第二个新列出现错误。
但是表中存在同名的列。事实上,我已经通过 netbeans 重新生成了所有实体
代码在一台机器上运行良好,但在另一台机器上连续抛出异常。即使使用相同的代码相同的环境。
[#|2013-06-06T18:07:36.220+0500|警告|glassfish3.1.1|javax.enterprise.system.core.transaction.com.sun.jts.jta|_ThreadID=47;_ThreadName=Thread-2;| JTS5054:完成本地异常堆栈后发生意外错误:异常 [EclipseLink-4002](Eclipse Persistence Services - 2.3.0.v20110604-r9504):org.eclipse.persistence.exceptions.DatabaseException 内部异常:com.mysql.jdbc。 exceptions.MySQLSyntaxErrorException:“字段列表”中的未知列“ixsCenterFrequency”错误代码:1054 调用:INSERT INTO greenacs_rev.cpe(campingTime,cpeTimestamp,custId,ddvVersion,idFirstUseDate,idHardwareVersion,idModemFirmwareVersion,idSerialNumber,idSoftwareVersion,idUpTime,ifConfig,illMacAddress, illlInterfaceIPAddress, illlInterfaceSubnetMask, ilwAutoChannelEnable, ilwBSSID, ilwChannel, ilwStandard,ilwTotalByteReceived, ilwTotalByteSent, ilwTransmitPower, imConnectionRequestPassword, imConnectionRequestURL, imConnectionRequestUsername, imParameterKey, imPassword, imPeriodicInformInterval, imPeriodicTime, imURL, imUsername, ioAccountName, iosRealm, iosType, iowccProviderIdentifier, iowhProviderIdentifier, isvlStatus, isvlcCallForwardOnNoAnswerNumber, isvlsAuthPassword, isvlsAuthUserName, isvlsX_UserAccount, isvsOutboundProxy, isvsOutboundProxyPort, isvvDigitMap, isvxRxGain, isvxTxGain, iuISPHomePage, iwwWANAccessType, iwwrFirmwareVersion, iwwrSotwareVersion, iwwwDNSServers, iwwwDefaultGateway, iwwwExternalIPaddress, iwwwMacAddress, iwwwMaxMTUSize, iwwwSubnetMask, iwwwnoOfRetires, ixDownlinkMeanCINR, ixDownlinkMeanRSSI, ixPHYDLmcs, ixPHYULmcs, ixServingBSID, ixfFullbandScanClass, ixlHoldOnLastGoodBSEnable, ixlLastGoodBSsScanEnable,ixlNeighborBSsScanEnable, ixsCenterFrequency, ixsDisconnectReason, ixsDownlinkDataRate, ixsNumberBytesReceived, ixsNumberBytesTransmitted, ixsNumberPktsReceived, ixsNumberPktsReceivedWithError, ixsNumberPktsTransmitted, ixsSecurity, ixsTxMeanPower, ixsUplinkDataRate, ixwcCAPLScanEnable, ixwcNAPFilterEnable, ixwcRECONNECT_ACTIVE, ixwcSupplicantAnonymousIDEnable, lastSyncTime, hmId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [82 个参数绑定] Query: InsertObjectQuery(kics.green.acs.ejb.entity.CPE[ cpeId=1 ]) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)在组织。eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:840) 在 org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:906) 在 org.eclipse.persistence.internal.databaseaccess。 DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:592) 在 org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535) 在 org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java: 1702) 在 org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207) 在 org.eclipse.persistence .internal.queries。DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193) 在 org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:342) 在 org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java: 162) 在 org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:472) 在 org.eclipse.persistence 的 org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177) .queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80) 在 org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90) 在 org.eclipse.persistence.internal.queries.DatabaseQueryMechanism。executeWriteWithChangeSet(DatabaseQueryMechanism.java:287) 在 org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) 在 org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:829) 在 org.eclipse .persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:728) 在 org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) 在 org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java :85) 在 org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501) 在 org.eclipse.持久性内部会话。AbstractSession.executeQuery(AbstractSession.java:1483) 在 org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1443) 在 org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java: 224) 在 org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:136) 在 org.eclipse.persistence 的 org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:191) .internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3784) 在 org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1407) 在 org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork。commitToDatabase(RepeatableWriteUnitOfWork.java:634) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1497) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:3135)在 org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:344) 在 org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157) 在 org.eclipse.persistence.transaction.JTASynchronizationListener .beforeCompletion(JTASynchronizationListener.java:68) 在 com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:99) 在 com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158) 在 com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:279) 在 com.sun.jts.CosTransactions.TerminatorImpl 的 com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2547) .commit(TerminatorImpl.java:250) 在 com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623) 在 com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:323) 在 com。 sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:175) 在 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:858) 在 com.sun.ejb.containers.BaseContainer.completeNewTx( BaseContainer.java:5114) 在 com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4879) 在 com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1180) 在 com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1207) 在 com.sun.ejb.containers .MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:86) 在 com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:143) 在 $Proxy308.afterDelivery(Unknown Source) 在 com.sun.messaging.jms。 ra.OnMessageRunner.run(OnMessageRunner.java:328) 在 com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114) 在 com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$ WorkerThread.performWork(ThreadPoolImpl.java:497) 在 com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread。运行(ThreadPoolImpl.java:540)引起:com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)的“字段列表”中的未知列“ixsCenterFrequency”在com .mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) 在 com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) 在 com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1160) 在com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:685) 在 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1400) 在 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1314)在 org.eclipse.persistence.internal.databaseaccess 的 com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1299)。DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:831) ... 54 更多 |#]