Jdon Framework新闻系统

06-03-27 jacal
下载了新闻系统部分,在我的环境中安装配置(Jboss3.23+Jdon+oracle)

由于原始新闻系统采用数据库是mysql,而我的用oracle,在配置方面应该没有问题,启动的时候可以看到能连接数据库,但在添加新闻类型的时候就出现错误了,以下是错误信息:

21:36:14,671 INFO [ContainerDirector] <======== Jdon Framework started successfully! =========>

21:36:28,718 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract void news.ejb.NewsManagerLocal.createNewsType(com.jdon.controller.events.EventModel), causedBy:

org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5)

at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:413)

at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:398)

at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:277)

at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)

at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)

at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

at org.jboss.ejb.Container.invoke(Container.java:700)

at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)

at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)

at $Proxy43.createNewsType(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.jdon.aop.reflection.MethodInvokerUtil.execute(MethodInvokerUtil.java:55)

at com.jdon.aop.reflection.ProxyMethodInvocation.methodInvoke(ProxyMethodInvocation.java:105)

at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:76)

at com.jdon.aop.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:60)

at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)

at com.jdon.aop.AopClient.invoke(AopClient.java:74)

at com.jdon.controller.service.DefaultServiceImp.execute(DefaultServiceImp.java:71)

at com.jdon.controller.service.DefaultServiceImp.execute(DefaultServiceImp.java:55)

at com.jdon.model.handler.XmlModelHandler.serviceAction(XmlModelHandler.java:108)

at com.jdon.strutsutil.ModelSaveAction.execute(ModelSaveAction.java:90)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at common.filter.EncodeFilter.doFilter(EncodeFilter.java:40)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)

at java.lang.Thread.run(Thread.java:534)

Caused by: javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5

at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:155)

at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:627)

at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:421)

at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:387)

at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:714)

at org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:149)

at org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapSynchronize.beforeCompletion(GlobalTxEntityMap.java:215)

at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1308)

at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:347)

... 75 more

21:36:28,750 ERROR [ProxyMethodInvocation] handleInvoker error: org.jboss.tm.JBossTransactionRolledbackLocalException: null; CausedByException is:

Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5))

21:36:28,765 ERROR [DefaultServiceImp] execute Service error java.lang.Throwable: java.lang.Throwable: org.jboss.tm.JBossTransactionRolledbackLocalException: null; CausedByException is:

Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5))

21:36:28,765 ERROR [XmlModelHandler] serviceAction Error: java.lang.Exception: execute Service errorjava.lang.Throwable: java.lang.Throwable: org.jboss.tm.JBossTransactionRolledbackLocalException: null; CausedByException is:

Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5)) maybe not define createMethod or updateMethod or deleteMethod

21:36:28,765 ERROR [ModelSaveAction] please check your ejb 、 model or form :java.lang.Exception: serviceAction Error:java.lang.Exception: execute Service errorjava.lang.Throwable: java.lang.Throwable: org.jboss.tm.JBossTransactionRolledbackLocalException: null; CausedByException is:

Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5))

21:36:28,843 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.Exception

21:36:28,843 ERROR [EncodeFilter] error request uri:/news/pub/newsTypeSaveAction.do

21:36:28,859 ERROR [EncodeFilter] javax.servlet.ServletException: System error! please call system Admin.java.lang.Exception: serviceAction Error:java.lang.Exception: execute Service errorjava.lang.Throwable: java.lang.Throwable: org.jboss.tm.JBossTransactionRolledbackLocalException: null; CausedByException is:

Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=hp02//3, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0id=5))

jacal
2006-03-28 09:19
自己顶一下吧。

banq做了那么多系统,难道没有想到把应用系统与oracle相结合?还有,平台总是推免费的jboss和mysql。实际上很多客户都不太喜欢用免费的东西,weblogic、websphere等虽然贵但使用的客户也很多。我个人感觉,企业自己的应用系统开发如果采用J2EE规范,一般都有大量的资金支持,购买业界比较好的应用服务平台,而中小企业一般不会轻易采用J2EE,而大多用MS的产品。

我对jboss不太了解,感觉就是tomcat的核心加一些所谓的J2EE容器。

banq
2006-03-28 15:07
多谢建议,

你这段代码主要报错是:

Update failed. Expected one affected row: rowsAffected=0id=5

好像是事务原因,JBoss提供Oracle两种连接方式thin和oci,两个数据源配置文件oracle-ds.xml和oracle-xa-ds.xml,使用后者试验看看,后者是支持Oracle事务机制的。

jacal
2006-03-28 19:59
感谢banq回复,我还是学艺不精,我试验一下

猜你喜欢