EclipseLink包含生成的sql中实体bean的所有字段

时间:2013-06-12 14:31:20

标签: eclipselink jpql weblogic12c

我正在使用 EclipseLink 2.3.x WebLogic 12c 。 这是JQL:

从PR_GL_CA_ACCOUNT o

中选择o

生成以下错误堆栈

     < [ACTIVE] ExecuteThread:' 0' for queue:' weblogic.kernel.Default(自我调整)'> <> < 2e88ae6781d171fa:-a29df4f:13f38b20f5a:-8000-0000000000000002> < 1371045798327> < 2013-06-12 19:03:18.311 - UnitOfWork(271275142) - 异常[EclipseLink-4002](Eclipse Persistence Services - 2.3.2.v20111125-r10461):org.eclipse.persistence.exceptions.DatabaseException


内部异常:com.ibm.db2.jcc.am.io:DB2 SQL错误:SQLCODE = -206,SQLSTATE = 42703,SQLERRMC = DISPLAYGLMAPCODE,DRIVER = 3.57.82
错误代码:-206
电话:SELECT PCA_GLACCODE,POR_ORGACODE,DISPLAYGLMAPCODE,PCA_FCALLOWED,PCA_GLACACTIVE,PCA_GLACBGTLEVE,PCA_GLACCREATION,PCA_GLACDESC,PCA_GLACDRCRBAL,PCA_GLACEFFECFROM,PCA_GLACEFFECUPTO,PCA_GLACLEVEL,PCA_GLACMAPCODE,PCA_GLACOPITEM,PCA_GLACREVAL,PCA_GLACSBLGR,PCA_GLACSHORT,PCA_GLACTYPE,PCC_ACTGCODE,PCR_CURRCODE,PCT_ACNTCODE,PSH_SCHDCODE ,PSY_SYSTCODE来自PR_GL_CA_ACCOUNT
查询:ReadAllQuery(name =" ChartOfAccount.findAllTransactionLevelAccount" referenceClass = ChartOfAccount sql =" SELECT PCA_GLACCODE,POR_ORGACODE,DISPLAYGLMAPCODE,PCA_FCALLOWED,PCA_GLACACTIVE,PCA_GLACBGTLEVE,PCA_GLACCREATION,PCA_GLACDESC,PCA_GLACDRCRBAL,PCA_GLACEFFECFROM, PCA_GLACEFFECUPTO,PCA_GLACLEVEL,PCA_GLACMAPCODE,PCA_GLACOPITEM,PCA_GLACREVAL,PCA_GLACSBLGR,PCA_GLACSHORT,PCA_GLACTYPE,PCC_ACTGCODE,PCR_CURRCODE,PCT_ACNTCODE,PSH_SCHDCODE,PSY_SYSTCODE来自PR_GL_CA_ACCOUNT")>
####< [ACTIVE] ExecuteThread:' 0' for queue:' weblogic.kernel.Default(自我调整)'> <> <> < 2e88ae6781d171fa:-a29df4f:13f38b20f5a:-8000-0000000000000002> < 1371045798561> weblogic.application.ModuleException:异常启动模块:EJBModule(HelperEJB.jar)


无法从HelperEJB.jar部署EJB:ListerInformationDto:

Singleton ListerInformationDto(应用程序:EarContent,EJBComponent:HelperEJB.jar)无法初始化。
    在weblogic.ejb.container.deployer.EJBModule.start(EJBModule.java:592)     at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:214)     在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:208)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)     在weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:213)     在weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)     在weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:125)     at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:214)     在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:208)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)     在weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)     在weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment.java:730)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)     在weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)     在weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)     在weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)     在weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:192)     在weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)     在weblogic.management.deploy.internal.DeploymentAdapter $ 1.doActivate(DeploymentAdapter.java:52)     在weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)     在weblogic.management.deploy.internal.AppTransition $ 2.transitionApp(AppTransition.java:31)     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)     在weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:170)     在weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:124)     在weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:187)     在weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:95)     在weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)     在weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
引发者:weblogic.ejb.container.InternalException:事务标记为回滚或未预期的事务状态:1     在weblogic.ejb.container.manager.SingletonSessionManager.postCallback(SingletonSessionManager.java:464)     在weblogic.ejb.container.manager.SingletonSessionManager.constructAndInitBean(SingletonSessionManager.java:379)     在weblogic.ejb.container.manager.SingletonSessionManager.access $ 300(SingletonSessionManager.java:63)     at weblogic.ejb.container.manager.SingletonSessionManager $ SingletonLifecycleManager.doActualInit(SingletonSessionManager.java:798)     at weblogic.ejb.container.manager.SingletonSessionManager $ SingletonLifecycleManager.initInternal(SingletonSessionManager.java:744)     在weblogic.ejb.container.manager.SingletonSessionManager $ SingletonLifecycleManager.init(SingletonSessionManager.java:632)     在weblogic.ejb.container.manager.SingletonSessionManager.init(SingletonSessionManager.java:281)     在weblogic.ejb.container.manager.SingletonSessionManager.perhapsInit(SingletonSessionManager.java:276)     在weblogic.ejb.container.deployer.EJBDeployer.initializeBeans(EJBDeployer.java:1280)     在weblogic.ejb.container.deployer.EJBDeployer.start(EJBDeployer.java:1170)     在weblogic.ejb.container.deployer.EJBModule.start(EJBModule.java:590)     at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:214)     在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:208)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)     在weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:213)     在weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)     在weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:125)     at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:214)     在weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:208)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)     在weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)     在weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment.java:730)     在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:36)     在weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)     在weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)     在weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)     在weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)     在weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:192)     在weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:369)     在weblogic.management.deploy.internal.DeploymentAdapter $ 1.doActivate(DeploymentAdapter.java:52)     在weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)     在weblogic.management.deploy.internal.AppTransition $ 2.transitionApp(AppTransition.java:31)     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)     在weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:170)     在weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:124)     在weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:187)     在weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:95)     在weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)     在weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


它显示 DISPLAYGLMAPCODE 是未知列。在查看表/代码之后,我发现表中没有列具有相同名称,但实体类中有一个私有布尔字段,其名称相同,没有任何注释。

private boolean displayGLMapCode = false;

1 个答案:

答案 0 :(得分:0)

问题的解决方案是我们需要使用@Transient注释这个字段。