Org.springframework.orm.jdo.JdoUsageException
Hi
I have a problem with the following piece of code.I have one table in
the database having two
columns from it (basically my query shd be like SELECT * FROM myTABLE)in
terms of Sql.
But when i execute my application, it fails in the code below.It gives me
nullpointer exception.
I am not applying any filter here.Can you please suggest me the reason for
this.Another help would be
sending link to get the source code for jdo-1.0.2.jar file.
The code is as follows:
public Hierarchy[] getHierarchyList(Hierarchy hier) {
JdoTemplate template = new JdoTemplate(pmf, false);
Collection hierarchy = template.find(Hierarchy.class);
if (hierarchy.size()>0){
System.out.println(" $$$$$d Hierarchy[]) hierarchy.toArray(new
Hierarchy[hierarchy.size()] >> " );
return (Hierarchy[]) hierarchy.toArray(new
Hierarchy[hierarchy.size()]);
return new Hierarchy[0];
The Stack trace is as follows:
org.springframework.orm.jdo.JdoUsageException:
java.lang.NullPointerException; nested exception is
kodo.util.UserException: java.lang.NullPointerException
kodo.util.UserException: java.lang.NullPointerException
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:844)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
at
org.springframework.orm.jdo.JdoTemplate$18.doInJdo(JdoTemplate.java:471)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:228)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:464)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:454)
at
com.agr.microleap.client.dao.spi.jdo.HierarchyDAOImpl.getHierarchyList(HierarchyDAOImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy4.getHierarchyList(Unknown Source)
at
com.agr.microleap.client.facades.spi.spring.SubmissionMgmtFacadeImpl.getHierarchyList(SubmissionMgmtFacadeImpl.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy6.getHierarchyList(Unknown Source)
at com.agr.microleap.actions.LookupAction.execute(LookupAction.java:62)
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:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:568)
NestedThrowablesStackTrace:
java.lang.NullPointerException
at
kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:205)
at
kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
at
kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:993)
at
kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:973)
at
kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:939)
at
kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:659)
at
kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:801)
at kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:341)
at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
at
kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
at
kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
at kodo.query.AbstractQuery.createExecutor(AbstractQuery.java:612)
at kodo.query.AbstractQuery.compileForDataStore(AbstractQuery.java:576)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:830)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
at
org.springframework.orm.jdo.JdoTemplate$18.doInJdo(JdoTemplate.java:471)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:228)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:464)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:454)
at
com.agr.microleap.client.dao.spi.jdo.HierarchyDAOImpl.getHierarchyList(HierarchyDAOImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy4.getHierarchyList(Unknown Source)
at
com.agr.microleap.client.facades.spi.spring.SubmissionMgmtFacadeImpl.getHierarchyList(SubmissionMgmtFacadeImpl.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy6.getHierarchyList(Unknown Source)
at com.agr.microleap.actions.LookupAction.execute(LookupAction.java:62)
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:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:568)
Thanks in Advance
Sujeet Sinha
Sujeet wrote:
Sujeet, you disallow creation of non-tx PersistenceManager by passing
false in JdoTemplate constructor.
Are you sure you have configured your app to use Spring Tx management?
If not, I strongly urge you to read Spring doc about this and ORM/JDO
module.
Cheers,
J-F
Hi
I have a problem with the following piece of code.I have one table in
the database having two
columns from it (basically my query shd be like SELECT * FROM myTABLE)in
terms of Sql.
But when i execute my application, it fails in the code below.It gives me
nullpointer exception.
I am not applying any filter here.Can you please suggest me the reason for
this.Another help would be
sending link to get the source code for jdo-1.0.2.jar file.
The code is as follows:
public Hierarchy[] getHierarchyList(Hierarchy hier) {
JdoTemplate template = new JdoTemplate(pmf, false);
Collection hierarchy = template.find(Hierarchy.class);
if (hierarchy.size()>0){
System.out.println(" $$$$$d Hierarchy[]) hierarchy.toArray(new
Hierarchy[hierarchy.size()] >> " );
return (Hierarchy[]) hierarchy.toArray(new
Hierarchy[hierarchy.size()]);
return new Hierarchy[0];
The Stack trace is as follows:
org.springframework.orm.jdo.JdoUsageException:
java.lang.NullPointerException; nested exception is
kodo.util.UserException: java.lang.NullPointerException
kodo.util.UserException: java.lang.NullPointerException
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:844)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
at
org.springframework.orm.jdo.JdoTemplate$18.doInJdo(JdoTemplate.java:471)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:228)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:464)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:454)
at
com.agr.microleap.client.dao.spi.jdo.HierarchyDAOImpl.getHierarchyList(HierarchyDAOImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy4.getHierarchyList(Unknown Source)
at
com.agr.microleap.client.facades.spi.spring.SubmissionMgmtFacadeImpl.getHierarchyList(SubmissionMgmtFacadeImpl.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy6.getHierarchyList(Unknown Source)
at com.agr.microleap.actions.LookupAction.execute(LookupAction.java:62)
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:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:568)
NestedThrowablesStackTrace:
java.lang.NullPointerException
at
kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:205)
at
kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
at
kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:993)
at
kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:973)
at
kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:939)
at
kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:659)
at
kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:801)
at kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:341)
at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
at
kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
at
kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
at kodo.query.AbstractQuery.createExecutor(AbstractQuery.java:612)
at kodo.query.AbstractQuery.compileForDataStore(AbstractQuery.java:576)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:830)
at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
at
org.springframework.orm.jdo.JdoTemplate$18.doInJdo(JdoTemplate.java:471)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:228)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:464)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:454)
at
com.agr.microleap.client.dao.spi.jdo.HierarchyDAOImpl.getHierarchyList(HierarchyDAOImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy4.getHierarchyList(Unknown Source)
at
com.agr.microleap.client.facades.spi.spring.SubmissionMgmtFacadeImpl.getHierarchyList(SubmissionMgmtFacadeImpl.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy6.getHierarchyList(Unknown Source)
at com.agr.microleap.actions.LookupAction.execute(LookupAction.java:62)
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:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:568)
Thanks in Advance
Sujeet Sinha
Similar Messages
-
Hello
I am using Hibernate 4, Spring 3 , JSF 2.0 and Weblogic 10.3.6
When I start weblogic server and server starts successfully, however whenever it starts publishing application, I am getting the following exception.
Error creating bean with name
'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0'
defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'entityManagerFactory'defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/
SharedCacheMode;
Caused By: java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()
Ljavax/persistence /SharedCacheMode; at
org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38) at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:525)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManager I have the following in applicationContext.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="net.test" />
<!-- Data Source Declaration -->
<bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="oracle.jdbc" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@server:1521:DB" />
<property name="user" value="scott" />
<property name="password" value="tiger" />
<property name="maxPoolSize" value="10" />
<property name="maxStatements" value="0" />
<property name="minPoolSize" value="5" />
</bean>
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<!-- JPA Entity Manager Factory -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="packagesToScan" value="net.test.entity" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
<property name="databasePlatform" value="${jdbc.dialectClass}" />
</bean>
</property>
</bean>
<bean id="defaultLobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
<!-- Session Factory Declaration -->
<bean id="SessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="annotatedClasses">
<list>
<value>net.test.entity.Department</value>
<value>net.test.entity.Employees</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
</prop>
</props>
</property>
</bean>
<!-- Enable the configuration of transactional behavior based on annotations -->
<tx:annotation-driven transaction-manager="txManager" />
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- Transaction Config -->
<bean id="txManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="SessionFactory" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<context:annotation-config />
<bean id="hibernateStatisticsMBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled" value="true" />
<property name="sessionFactory" value="#{entityManagerFactory.sessionFactory}" />
</bean>
<bean name="ehCacheManagerMBean"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
<bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="server" ref="mbeanServer" />
<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
<property name="beans">
<map>
<entry key="SpringBeans:name=hibernateStatisticsMBean"
value-ref="hibernateStatisticsMBean" />
<entry key="SpringBeans:name=ehCacheManagerMBean" value-ref="ehCacheManagerMBean" />
</map>
</property>
</bean>
</beans>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.test</groupId>
<artifactId>myappp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>myappp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- JSF library -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Primefaces library -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>afterwork</artifactId>
<version>1.0.8</version>
</dependency>
<!-- Hibernate library -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Oracle Java Connector library -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<!-- Log4j library -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.extensions.cdi.core</groupId>
<artifactId>myfaces-extcdi-core-api</artifactId>
<version>1.0.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.0.1.Final</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.6</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>target/metamodel</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>In Weblogic 10.3.6 I have enabled JPA2 support by adding the following in commEnv.cmd
@rem Enable JPA 2.0 functionality on WebLogic Server
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.1.0.0_2-0.jar;
%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-1.jarApplication which works on WLS 10.3.6 is http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_dev.zip and the one which is not working is
http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_win32.exe.
How can I resolve these errors and exceptions? Any help is highly appreciable.
ThanksLooks like you might have a spelling error in your spring config, or are trying to set a read-only property. BdasInterfaceManagerImpl has been configured as having a method called setBdasInterfaceJdbcDao() : does it?
By the way, we now know that you're writing code for JP Morgan - there's a slight risk that this could bite you in the @ss at some point (there are some malicious people around) you might want to take that into consideration next time! -
Hi there,
We were using the spring multipart for the purpose of uploading a file into our application running on Oracle Weblogic Server 10.3.2 using spring framework.
It was working fine until we upgraded our server to the version 10.3.6
After the upgrade, we started getting the below error while we try to submit the form after selecting the file to be uploaded.
2013-11-20 06:11:29,923 ERROR||[[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)']||[email protected]||org.springframework.web.portlet.DispatcherPortlet||Could not complete request
javax.portlet.PortletException: Error occured during request processing: javax/portlet/ActionRequest
at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:668)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:519)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.processAction(FrameworkPortlet.java:460)[org.springframework.web.portlet-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at com.bea.portlet.container.PortletStub.doAction(PortletStub.java:901)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.FilterChainGenerator.runFilterChain(FilterChainGenerator.java:96)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.PortletStub.processAction(PortletStub.java:314)[portlet-container.jar:10.3.6 ]
at com.bea.portlet.container.AppContainer.invokeProcessAction(AppContainer.java:679)[portlet-container.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.content.JavaPortletContent.fireProcessAction(JavaPortletContent.java:209)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.portlet.JavaPortlet.fireProcessAction(JavaPortlet.java:1299)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.controls.portlet.JavaPortlet.raiseChangeEvents(JavaPortlet.java:805)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlLifecycle$4.postVisitRoot(ControlLifecycle.java:316)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:341)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)[netuix_servlet.jar:10.3.6 ]
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:731)[netuix_servlet-full.jar:10.3.6 ]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)[javax.servlet_1.0.0.0_2-5.jar:2.5]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)[content_servlet.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)[p13n_ejb.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.GenericContentFilter.doFilter(GenericContentFilter.java:50)[GenericContentFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:82)[SessionExpiryFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.ServletExceptionFilter.doFilter(ServletExceptionFilter.java:54)[ServletExceptionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.seo.SEOUrlFilter.doFilter(SEOUrlFilter.java:87)[SEOUrlFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.BusinessContextDetectionFilter.doFilter(BusinessContextDetectionFilter.java:75)[BusinessContextDetectionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.rogers.business.servlet.filter.LanguageProvinceSelectionFilter.doFilter(LanguageProvinceSelectionFilter.java:160)[LanguageProvinceSelectionFilter.class:]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)[content_servlet.jar:10.3.6 ]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)[weblogic.jar:10.3.6.0]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)[com.bea.core.weblogic.security.identity_1.2.0.0.jar:1.2.0.0]
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)[com.bea.core.weblogic.security.wls_1.0.0.0_6-2-0-0.jar:6.2.0.0]
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)[weblogic.jar:10.3.6.0]
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)[weblogic.jar:10.3.6.0]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)[com.bea.core.weblogic.workmanager_1.11.0.0.jar:1.11.0.0]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)[com.bea.core.weblogic.workmanager_1.11.0.0.jar:1.11.0.0]
We are using "ActionMapping" to call the action method in our controller from the JSP form.
Have anyone faced this error before?
Any help would be much appreciated.
Thanks,
LanHi Lan,
Did you get any resolution for the above issue ?
If yes can you share it as we also ran into this.
Regards
Manu -
Hi!
I'm trying to configure java gemfire template to query data in spring application.
To create spring template I need to create client-region, to create client-region I need to create client-cache, to create client-cache I need to create pool.
One of the pool parameters is server-goup. I need gemfire template(s) to query several of them.
I didn't find pool to be configurable for several server goups, thus I've created two pools (with different server goups) two client caches two client regions and two templates and got an error.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.gemstone.gemfire.cache.GemFireCache] is defined: expected single bean but found
What I'm missing? How could I fix the error or manage to setup client region for several server groups?
Thanks.Try posting this in the WLS EJB forum:
WebLogic Server - EJB -
Org.springframework.beans.factory.BeanCreationException
In the perisistence.xml we are configured the subscription jndi, calling using this applicationContext.xml.
But our problem is that subscription jndi should be configured in jboss locally.
Where we have to configured that jndi in local server. I have given the applicationContext and persistence.xml file blow:
Also we have subscription-ds file in deploy folder of my JBoss5.1.2.
When ever we are going to run the testcases it throwing following Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: subscription not bound
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at com.hungama.subscription.test.LogUtilTest.<init>(LogUtilTest.java:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:209)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:258)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:255)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: javax.naming.NameNotFoundException: subscription not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:750)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
at org.springframework.jndi.Jndi
Following is my persistence.xml file which i kept in META-INF/persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="subscriptionUnitName" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/subscriptionDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
<!-- <property name="hibernate.hbm2ddl.auto" value="update"/> -->
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="jboss.entity.manager.jndi.name" value="java:/subscription"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/subscriptionFactory"/>
</properties>
</persistence-unit>
</persistence>
My applicationContext.sml file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<util:properties id="chrgingProperties" location="classpath:charging-jndi.properties"/>
<util:properties id="msgingProperties" location="classpath:messaging-jndi.properties"/>
<bean id="jndiPropeties" class="com.myCompany.subscription.services.config.model.JNDIProperties">
<property name="msgingProperties" ref="msgingProperties"></property>
<property name="chrgingProperties" ref="chrgingProperties"></property>
</bean>
<jee:jndi-lookup id="entityManagerFactory" jndi-name="java:/subscription"></jee:jndi-lookup>
<jee:jndi-lookup id="dataSource" jndi-name="java:/subscriptionDS"></jee:jndi-lookup>
<bean id="trasactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="java:/TransactionManager"/>
<property name="userTransactionName" value="UserTransaction"/>
</bean>
<aop:config>
<aop:pointcut id="productServiceMethods" expression="execution(* com.myCompany.subscription.services.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="productServiceMethods"/>
</aop:config>
<tx:advice id="txAdvice" transaction-manager="trasactionManager">
<tx:attributes>
<tx:method name="getError*" propagation="REQUIRES_NEW" read-only="true"/>
<tx:method name="save*" propagation="REQUIRED" rollback-for="com.myCompany.subscription.exception.SubscriptionServiceException"/>
<tx:method name="chargeAmount*" propagation="REQUIRED"/>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="get*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="*" propagation="SUPPORTS" read-only="true"/>
</tx:attributes>
</tx:advice>
<!-- Services Started -->
<bean id="generalDao" class="com.myCompany.subscription.services.dao.GeneralDao">
<property name="entityManagerFactory" ref="entityManagerFactory"></property>
</bean>
<bean id="logUtil" class="com.myCompany.subscription.services.util.LogUtil" init-method="initialize">
<property name="generalDao" ref="generalDao"/>
</bean>
<bean id="chargingMsgingClient" class="com.myCompany.subscription.services.client.SubscriptionJMSClient">
<property name="logUtil" ref="logUtil"></property>
<property name="properties" ref="chrgingProperties"></property>
<property name="connectionFactoryName" value="ConnectionFactory"></property>
<property name="topicName" value="topic/myCompanyChargingTopic"></property>
</bean>
<bean id="messagingJMSClient" class="com.myCompany.subscription.services.client.MessagingJMSClient">
<property name="logUtil" ref="logUtil"></property>
<property name="properties" ref="msgingProperties"></property>
<property name="connectionFactoryName" value="ConnectionFactory"></property>
<property name="topicName" value="topic/TempTopic"></property>
</bean>
<bean id="subscriptionParams" class="com.myCompany.subscription.services.config.model.SubscriptionServiceParams">
</bean>
<bean id="subscriptionConfigService" class="com.myCompany.subscription.services.config.SubscriptionConfigService" init-method="initialize" >
<property name="generalDao" ref="generalDao"></property>
<property name="paramType" value="MESG_GW"></property>
<property name="paramGroup" value="MESG_GW"></property>
<property name="msgUserName" value="MSG_USERNAME"></property>
<property name="msgUserPassword" value="MSG_PASSWORD"></property>
<property name="msgSourceMsisdn" value="MSG_SOURCE_MSISDN"></property>
<property name="messagingUrl" value="MESSAGING_URL"></property>
<property name="subscriptionParams" ref="subscriptionParams"></property>
<property name="msgAgencyId" value="MSG_AGENCYID"></property>
</bean>
<bean id="subServiceManager" class="com.myCompany.subscription.services.impl.SubscriptionServiceManager">
<property name="generalDao" ref="generalDao"/>
<property name="logUtil" ref="logUtil"></property>
<property name="ratingEngineService" ref="ratingEngineService"/>
<property name="callbackServiceManager" ref="callbackServiceManager"/>
<property name="subMsgingClient" ref="subMsgingClient"/>
<property name="chargingMsgingClient" ref="chargingMsgingClient"></property>
</bean>
<bean id="ratingEngineService" class="com.myCompany.rating.services.impl.RatingEngineService">
<property name="generalDao" ref="generalDao"/>
</bean>
<bean id="callbackServiceManager" class="com.myCompany.subscallback.services.impl.SubsCallbackServiceManager">
<property name="generalDao" ref="generalDao"/>
</bean>
<bean id="subscriptionService" class="com.myCompany.subscription.services.impl.SubscriptionService">
<property name="generalDao" ref="generalDao"/>
<property name="logUtil" ref="logUtil"></property>
<property name="subscriptionParamName" value="SUBSCRIPTION"></property>
<property name="subscriptionParamType" value="SUBSCRIPTION"></property>
<property name="subscriptionParamGroup" value="PLAN_MASTER_TYPE"></property>
</bean>
<bean id="subMsgingClient" class="com.myCompany.subscription.services.client.SubscriptionMessageClient">
<property name="logUtil" ref="logUtil"></property>
</bean>
<bean id="msgGwClient" class="com.myCompany.subscription.services.client.MessageGatewayClient">
<property name="subscriptionParams" ref="subscriptionParams"></property>
<property name="logUtil" ref="logUtil"></property>
</bean>
<bean id="schedulerService" class="com.myCompany.subscription.services.impl.SubscriptionSchedulerService">
<property name="generalDao" ref="generalDao"/>
<property name="msgClient" ref="subMsgingClient"></property>
<property name="logUtil" ref="logUtil"></property>
<property name="msgGwClient" ref="msgGwClient"></property>
<property name="subscriptionParams" ref="subscriptionParams"></property>
<property name="messagingJMSClient" ref="messagingJMSClient"></property>
<property name="subServiceManager" ref="subServiceManager"></property>
</bean>
<bean id="schedulerLock" class="com.myCompany.subscription.services.model.SchedulerLock">
</bean>
</beans>Greetings,
Your error implies that the classpath for the second deployment might be wrong. This cannot be the package if you are deploying an identical ear file. Can you look at the setup for the second container from the admin to see if there is an RMI connection configured incorrectly? Check your opmn.xml file for port info:
<port id="rmi" range="12401-12500"/>and check the server using netstat -a to see if the configured port is open for use before starting the OAS.
-Michael -
I am deploying an .ear file to an Oracle Application Server 10.1.2.0.2. In one container, it deploys correctly. In another conatiner on the same server and configured identically (or at least I believe), I try to deploy the same .ear file but I get the error:
Deployment failed: Nested exception
Resolution:
Base Exception:
com.evermind.server.rmi.OrionRemoteException
Class not found: org.springframework.beans.factory.BeanCreationException; nested exception is:
java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanCreationException. Class not found: org.springframework.beans.factory.BeanCreationException; nested exception is:
java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanCreationException
Anyone would have an idea why? Thanks in advance.Greetings,
Your error implies that the classpath for the second deployment might be wrong. This cannot be the package if you are deploying an identical ear file. Can you look at the setup for the second container from the admin to see if there is an RMI connection configured incorrectly? Check your opmn.xml file for port info:
<port id="rmi" range="12401-12500"/>and check the server using netstat -a to see if the configured port is open for use before starting the OAS.
-Michael -
Error 500: org.springframework.dao.IncorrectResultSizeDataA
I am getting the following error after having tried to set up webdav and/or file Resource Drivers. I am still getting it after I have disabled them.
org.springframework.dao.IncorrectResultSizeDataAcc essException: Incorrect result size: expected 1, actual 2
org.springframework.security.ldap.SpringSecurityLd apTemplate$3.executeWithContext(SpringSecurityLdap Template.java:204)
org.springframework.ldap.core.LdapTemplate.execute WithContext(LdapTemplate.java:807)
org.springframework.ldap.core.LdapTemplate.execute ReadOnly(LdapTemplate.java:793)Originally Posted by mramaker
I suspect it to be a filesystem access issue. chmod all files to the user:group running the Teaming process
I stumbled onto this thread as I'm having the same issue for SOME of my users. We are authenticating against LDAP and some users get this message when attempting to login.
I don't completely understand what you mean by your advice. Can you elaborate? -
Org.springframework.beans.FatalBeanException when trying to configure ocep
Hi,
I was trying to configure my custom jdbc driver to the oracle CEP and I see the below error. I did add weblogic.common.internal jar to my Test project. Still I get this below error.
<Jan 28, 2013 10:39:03 AM CST> <Notice> <evs4j> <BEA-2049007> <The cluster protocol is disabled>
<Jan 28, 2013 10:39:04 AM CST> <Notice> <BDBProvider> <BEA-2052004> <Created and registered BDBProvider default-provider>
<Jan 28, 2013 10:39:05 AM CST> <Notice> <Spring> <BEA-2047000> <The application context for "com.oracle.cep.cartridge.jdbc" was started successfully>
<Jan 28, 2013 10:39:06 AM CST> <Notice> <Spring> <BEA-2047000> <The application context for "com.bea.wlevs.dataservices" was started successfully>
<Jan 28, 2013 10:39:07 AM CST> <Notice> <Deployment> <BEA-2045000> <The application bundle "Test" was deployed successfully to file:/E:/Oracle/Middleware/user_projects/domains/ocep_domain/defaultserver/applications/Test/Test.jar with version 1359390936917>
<Jan 28, 2013 10:39:12 AM CST> <Error> <Deployment> <BEA-2045010> <The application context "Test" could not be started: org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:145)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:79)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:139)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activateRules(CQLProcessorImpl.java:958)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activate(CQLProcessorImpl.java:1005)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.afterConfigurationActive(CQLProcessorImpl.java:2689)
at com.bea.wlevs.spring.ActivationBeanPostProcessor.postProcessAfterContextInitialization(ActivationBeanPostProcessor.java:20)
at com.bea.wlevs.spring.DeferredBeanPostProcessor.afterConfigurationActive(DeferredBeanPostProcessor.java:27)
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:112)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:79)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:139)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.lang.NoClassDefFoundError: weblogic/common/internal/InteropWriteReplaceable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at weblogic.utils.classloaders.GenericClassLoader.defineCodeGenClass(GenericClassLoader.java:523)
at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:73)
at weblogic.utils.wrapper.WrapperFactory.generateWrapperClass(WrapperFactory.java:340)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:244)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:190)
at weblogic.jdbc.wrapper.JDBCWrapperFactory$1.run(JDBCWrapperFactory.java:164)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:161)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnectionObj(RmiDataSource.java:614)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:458)
at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:538)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491)
at oracle.cep.extensibility.datasource.JDBCExternalDataSource.getConnection(JDBCExternalDataSource.java:58)
at oracle.cep.interfaces.input.ExtSource.start(ExtSource.java:121)
at oracle.cep.execution.operators.RelSource.initialize(RelSource.java:448)
at oracle.cep.planmgr.codegen.RelSourceFactory.setupExecOpt(RelSourceFactory.java:300)
at oracle.cep.planmgr.codegen.ExecOptFactory.instantiate(ExecOptFactory.java:210)
at oracle.cep.planmgr.codegen.RelSourceFactory.instantiate(RelSourceFactory.java:112)
at oracle.cep.planmgr.codegen.OptInst.instOp(OptInst.java:136)
at oracle.cep.planmgr.codegen.CodeGenHelper.instantiate(CodeGenHelper.java:98)
at oracle.cep.planmgr.PlanManager.instantiate(PlanManager.java:1114)
at oracle.cep.metadata.QueryManager.instantiate(QueryManager.java:868)
at oracle.cep.metadata.QueryManager.startQuery(QueryManager.java:497)
at oracle.cep.metadata.QueryManager.startNamedQuery(QueryManager.java:283)
at oracle.cep.server.CommandDriver.QueryRefNodeDriver.execute(QueryRefNodeDriver.java:60)
at oracle.cep.server.CommandInterpreter.execute(CommandInterpreter.java:274)
at oracle.cep.server.CEPServer.executeDDL(CEPServer.java:188)
at oracle.cep.jdbc.CEPStatement.evaluateAndSend(CEPStatement.java:319)
at oracle.cep.jdbc.CEPStatement.executeUpdate(CEPStatement.java:301)
at com.oracle.cep.processor.cql.impl.CEPServerInstance.executeDDL(CEPServerInstance.java:257)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.executeDDL(CQLProcessorImpl.java:3174)
at com.oracle.cep.processor.cql.impl.CQLQuery.start(CQLQuery.java:48)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activateRules(CQLProcessorImpl.java:941)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activate(CQLProcessorImpl.java:1005)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.afterConfigurationActive(CQLProcessorImpl.java:2689)
at com.bea.wlevs.spring.ActivationBeanPostProcessor.postProcessAfterContextInitialization(ActivationBeanPostProcessor.java:20)
at com.bea.wlevs.spring.DeferredBeanPostProcessor.afterConfigurationActive(DeferredBeanPostProcessor.java:27)
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:112)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at org.sp<Jan 28, 2013 10:39:03 AM CST> <Notice> <evs4j> <BEA-2049007> <The cluster protocol is disabled>
<Jan 28, 2013 10:39:04 AM CST> <Notice> <BDBProvider> <BEA-2052004> <Created and registered BDBProvider default-provider>
<Jan 28, 2013 10:39:05 AM CST> <Notice> <Spring> <BEA-2047000> <The application context for "com.oracle.cep.cartridge.jdbc" was started successfully>
<Jan 28, 2013 10:39:06 AM CST> <Notice> <Spring> <BEA-2047000> <The application context for "com.bea.wlevs.dataservices" was started successfully>
<Jan 28, 2013 10:39:07 AM CST> <Notice> <Deployment> <BEA-2045000> <The application bundle "Test" was deployed successfully to file:/E:/Oracle/Middleware/user_projects/domains/ocep_domain/defaultserver/applications/Test/Test.jar with version 1359390936917>
<Jan 28, 2013 10:39:12 AM CST> <Error> <Deployment> <BEA-2045010> <The application context "Test" could not be started: org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
org.springframework.beans.FatalBeanException: Error in context lifecycle initialization; nested exception is com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:145)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:79)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:139)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: com.bea.wlevs.ede.api.StatementException: Could not start rule [myExampleQuery] due to error: weblogic/common/internal/InteropWriteReplaceable
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activateRules(CQLProcessorImpl.java:958)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activate(CQLProcessorImpl.java:1005)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.afterConfigurationActive(CQLProcessorImpl.java:2689)
at com.bea.wlevs.spring.ActivationBeanPostProcessor.postProcessAfterContextInitialization(ActivationBeanPostProcessor.java:20)
at com.bea.wlevs.spring.DeferredBeanPostProcessor.afterConfigurationActive(DeferredBeanPostProcessor.java:27)
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:112)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:79)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:139)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.lang.NoClassDefFoundError: weblogic/common/internal/InteropWriteReplaceable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at weblogic.utils.classloaders.GenericClassLoader.defineCodeGenClass(GenericClassLoader.java:523)
at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:73)
at weblogic.utils.wrapper.WrapperFactory.generateWrapperClass(WrapperFactory.java:340)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:244)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:190)
at weblogic.jdbc.wrapper.JDBCWrapperFactory$1.run(JDBCWrapperFactory.java:164)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:161)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnectionObj(RmiDataSource.java:614)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java:458)
at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:538)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491)
at oracle.cep.extensibility.datasource.JDBCExternalDataSource.getConnection(JDBCExternalDataSource.java:58)
at oracle.cep.interfaces.input.ExtSource.start(ExtSource.java:121)
at oracle.cep.execution.operators.RelSource.initialize(RelSource.java:448)
at oracle.cep.planmgr.codegen.RelSourceFactory.setupExecOpt(RelSourceFactory.java:300)
at oracle.cep.planmgr.codegen.ExecOptFactory.instantiate(ExecOptFactory.java:210)
at oracle.cep.planmgr.codegen.RelSourceFactory.instantiate(RelSourceFactory.java:112)
at oracle.cep.planmgr.codegen.OptInst.instOp(OptInst.java:136)
at oracle.cep.planmgr.codegen.CodeGenHelper.instantiate(CodeGenHelper.java:98)
at oracle.cep.planmgr.PlanManager.instantiate(PlanManager.java:1114)
at oracle.cep.metadata.QueryManager.instantiate(QueryManager.java:868)
at oracle.cep.metadata.QueryManager.startQuery(QueryManager.java:497)
at oracle.cep.metadata.QueryManager.startNamedQuery(QueryManager.java:283)
at oracle.cep.server.CommandDriver.QueryRefNodeDriver.execute(QueryRefNodeDriver.java:60)
at oracle.cep.server.CommandInterpreter.execute(CommandInterpreter.java:274)
at oracle.cep.server.CEPServer.executeDDL(CEPServer.java:188)
at oracle.cep.jdbc.CEPStatement.evaluateAndSend(CEPStatement.java:319)
at oracle.cep.jdbc.CEPStatement.executeUpdate(CEPStatement.java:301)
at com.oracle.cep.processor.cql.impl.CEPServerInstance.executeDDL(CEPServerInstance.java:257)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.executeDDL(CQLProcessorImpl.java:3174)
at com.oracle.cep.processor.cql.impl.CQLQuery.start(CQLQuery.java:48)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activateRules(CQLProcessorImpl.java:941)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.activate(CQLProcessorImpl.java:1005)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.afterConfigurationActive(CQLProcessorImpl.java:2689)
at com.bea.wlevs.spring.ActivationBeanPostProcessor.postProcessAfterContextInitialization(ActivationBeanPostProcessor.java:20)
at com.bea.wlevs.spring.DeferredBeanPostProcessor.afterConfigurationActive(DeferredBeanPostProcessor.java:27)
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(ApplicationContextLifecycle.java:112)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
<Jan 28, 2013 10:39:12 AM CST> <Notice> <Server> <BEA-2046000> <Server STARTED>
ringframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:204)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
<Jan 28, 2013 10:39:12 AM CST> <Notice> <Server> <BEA-2046000> <Server STARTED>just has to place the missing jar in the custom jars
-
Hi Guys,
I got here an Interface org.springframework.ws.server.endpoint.MessageEndpoint and I have implemented it into a class. I was reading their documentation and what I've read is this
Defines the basic contract for Web Services interested in the entire message payload.
The main entrypoint is invoke(MessageContext), which gets invoked with the message context. This context contains the request, and can be used to create a response.
I'm focusing on this part -> "*can be used to create a response.*". Can you guide me how?had a chance to look at this?
/people/jitender.chauhan/blog/2009/04/20/service-enabling-in-abap -
Kodo JDO with JCA provided by Jencks in Tomcat
I'm trying to use both JDO and JCR (Apache's Jackrabbit) in my project. Both support XA
Transactions, and my understanding is that to best ensure data integrity, I should start using them.
Currently, I'm running under Tomcat using the SpringFramework support for transactions. I'd like to
continue running in Tomcat because I already understand that environment and the other app-servers
all feel heavyweight by comparison - all I need is JNDI and XA Transactions. Tomcat itself doesn't
support XA Transactions and JCA, but the open source project jencks is able to provide JCA support
within Tomcat.
I've been looking at the Deployment section of the JDO reference guide (Chapter 8). If I'm reading
this right, all I need to do is set two properties in the jdo.properties file: kodo.TransactionMode
and kodo.ManagedRuntime.
I've done that in my project:
kodo.TransactionMode: managed
kodo.ManagedRuntime: invocation(
TransactionManagerMethod=edu.ucsc.whisper.transaction.KodoTransactionAccess.getTransactionManager )
The getTransactionManager() is a static function that returns the
javax.transaction.TransactionManager provided by Spring's JtaTransactionManager.
I have a unit test that checks the application's initialization process, and I've been using that to
work my way into JCA transactions. Based on that test, this seems to be working. My question is this:
Is it really that simple?
Don't get me wrong, I'll be thrilled if it is, but from everything I'm seeing about configuring the
"Big Iron" app servers (WebLogic, JBoss, etc.), it just seems like adding two properties is too easy
and that I'm probably missing something significant in the process. Can anyone confirm whether or
not I'm on the right track here?
I'm working on setting this up for my heavier-duty integration tests, but I'm concerned that if I am
missing something, I've done just enough to fake Kodo out and that it isn't actually working under
the hood.
Thanks,
MarkAbe White wrote:
I would be surprised if your transaction manager and JDBC driver
configured themselves for XA automatically, since it imposes some
overhead and is rarely actually needed. In particular, you typically
need an XADataSource for XA transactions, rather than just using the
standard JDBC driver through the DriverManager (as Kodo does internally
when you specify ConnectionDriverName). So I suggest you consult their
documentation. As far as Kodo is concerned, though, as long as you've
set the TransactionMode, ManagedRuntime,
DataSourceMode/ConnectionFactoryMode (depending on Kodo version), and
are using an XA DataSource, you are all set.Hi Abe,
I've been able to get Spring configured so that it uses its JtaTransactionManager, and I have Kodo
setup with the TransactionMode as Managed and the ManagedRuntime is configured to use a static
method I created that returns the TransactionManager. In my logs, I can see Kodo accessing a
non-null instance of the TransactionManager class through this method. The problem that I'm getting
is that the behavior in my unit and integration tests is different than the behavior I'm seeing when
running in Tomcat, even though the Spring and Kodo configuration are nearly identical (Kodo accesses
a different database in Tomcat than it does in testing, other than that, the configuration is the
same). All the unit and integration tests pass; this requires transactions to be created, data
written to the database through Kodo, and then read back through Kodo in a new transaction. When I
deploy the web-app to Tomcat though, Kodo suddenly thinks its running without transactions. Reading
from the database works fine because I've got non-transactional reads turned on, but as soon as I
try to alter any field of a persisted object, Kodo throws an InvalidStateException saying it doesn't
have a transaction. I've included my log output below to demonstrate.
The only thing I haven't done yet, based on your previous message, is configure my database driver
for access through JNDI within Tomcat. Would that cause errors like this, or should I be looking
elsewhere?
My jdo.properties file contains these settings:
# For use of JDOHelper
javax.jdo.PersistenceManagerFactoryClass: kodo.jdo.PersistenceManagerFactoryImpl
# For Kodo JDO 4.0 EA2 and higher
javax.jdo.option.Connection2DriverName: org.postgresql.Driver
javax.jdo.option.Connection2UserName: ------------
javax.jdo.option.Connection2Password: ------------
javax.jdo.option.Connection2URL: jdbc:postgresql://127.0.0.1:5432/my_db
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainState: true
javax.jdo.option.NontransactionalRead: true
kodo.FlushBeforeQueries=true
# For JCA Transaction support
kodo.TransactionMode: managed
kodo.ManagedRuntime: invocation(
TransactionManagerMethod=edu.ucsc.whisper.transaction.KodoTransactionAccess.getTransactionManager )
Thanks,
Mark
2006-04-04 02:03:13,891 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<mdslog - TransactionInterceptor starting create if necessary>
2006-04-04 02:03:13,891 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<mdslog - TransactionAspectSupport begin createTransactionIfNecessary()>
2006-04-04 02:03:13,891 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Getting transaction for edu.ucsc.whisper.service.UserService.setUserInformation>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager begin getTransaction>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <Using
transaction object [org.springframework.transaction.jta.JtaTransactionObject@42b645]>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] -
<Creating new transaction with name [edu.ucsc.whisper.service.UserService.setUserInformation]>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- JtaTransactionManager begin doBegin>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- JtaTransactionManager end doBegin>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager end getTransaction>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager begin newTransactionStatus>
2006-04-04 02:03:13,892 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Initializing
transaction synchronization>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager end newTransactionStatus>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<mdslog - TransactionAspectSupport end createTransactionIfNecessary()>
2006-04-04 02:03:13,892 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<mdslog - TransactionInterceptor finished create if necessary>
2006-04-04 02:03:13,892 INFO [edu.ucsc.whisper.service.DefaultUserService] - <setUserInformation begin>
2006-04-04 02:03:13,892 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] -
<Publishing event in context [WebApplicationContext for namespace 'xfire-servlet']:
org.acegisecurity.event.authorization.PublicInvocationEvent[source=invocation: method 'getUser',
arguments [mark]; target is of class [edu.ucsc.whisper.core.manager.DefaultUserManager]]>
2006-04-04 02:03:13,892 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] -
<Publishing event in context [Root WebApplicationContext]:
org.acegisecurity.event.authorization.PublicInvocationEvent[source=invocation: method 'getUser',
arguments [mark]; target is of class [edu.ucsc.whisper.core.manager.DefaultUserManager]]>
2006-04-04 02:03:13,892 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Opening JDO PersistenceManager, factory = kodo.jdo.PersistenceManagerFactoryImpl@c2c9af>
2006-04-04 02:03:13,893 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] - <New
JDO PersistenceManager = kodo.jdo.PersistenceManagerImpl@cc70c2, factory =
kodo.jdo.PersistenceManagerFactoryImpl@c2c9af>
2006-04-04 02:03:13,893 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Registering transaction synchronization for JDO PersistenceManager>
2006-04-04 02:03:13,893 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <mdslog -
TransactionSynchronizationManager registerSynchronization -
org.springframework.orm.jdo.PersistenceManagerFactoryUtils$PersistenceManagerSynchronization@ff0f8a>
2006-04-04 02:03:13,893 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Bound value
[org.springframework.orm.jdo.PersistenceManagerHolder@552f12] for key
[kodo.jdo.PersistenceManagerFactoryImpl@c2c9af] to thread [http-8443-Processor24]>
2006-04-04 02:03:13,893 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@552f12] for key
[kodo.jdo.PersistenceManagerFactoryImpl@c2c9af] bound to thread [http-8443-Processor24]>
2006-04-04 02:03:13,893 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Persistence manager kodo.jdo.PersistenceManagerImpl@cc70c2, factory
kodo.jdo.PersistenceManagerFactoryImpl@c2c9af is transactional: true>
2006-04-04 02:03:13,893 DEBUG [kodo.Query] - <Executing query: [SELECT UNIQUE FROM
edu.ucsc.whisper.core.DefaultUser WHERE username==searchName
PARAMETERS java.lang.String searchName] with parameters: {searchName=mark}>
2006-04-04 02:03:13,894 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> connection pool: active=0, idle=1>
2006-04-04 02:03:13,894 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> checkout>
2006-04-04 02:03:13,895 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> prepared statement cache: size=9,
max=50, requests=17, hits=8, created=9, redundant=0, overflow=0, leaked=0>
2006-04-04 02:03:13,902 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [5 ms] executing
prepstmnt 6033738 SELECT t0.userId, t0.TYP, t0.VERSN, t0.enabled, t0.password, t1.userInfoId,
t1.TYPE, t1.VERSN, t1.aboutText, t1.familyName, t1.firstName, t1.gender, t1.namePrefix,
t1.nameSuffix, t1.otherNames, t2.userId, t2.TYP, t2.VERSN, t2.enabled, t2.password, t2.USERINFO,
t2.username, t0.username FROM whisper_user t0 LEFT OUTER JOIN userinfo t1 ON t0.USERINFO =
t1.userInfoId LEFT OUTER JOIN whisper_user t2 ON t1.userInfoId = t2.USERINFO WHERE (t0.username = ?)
[params=(String) mark] [reused=3]>
2006-04-04 02:03:13,906 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [2 ms] executing
prepstmnt 12702178 SELECT t0.nameOrder, t0.previousName FROM userInfo_PreviousNames t0 WHERE
t0.userInfoId = ? ORDER BY t0.nameOrder ASC [params=(long) 2] [reused=3]>
2006-04-04 02:03:13,908 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [1 ms] executing
prepstmnt 7374726 SELECT t1.authorityId, t1.TYP, t1.VERSN, t1.authority FROM user_authorities t0
INNER JOIN authorities t1 ON t0.authorityId = t1.authorityId WHERE t0.userId = ? [params=(long) 2]
[reused=3]>
2006-04-04 02:03:13,912 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [2 ms] executing
prepstmnt 1745355 SELECT t0.organizationId, t0.TYPE, t0.VERSN, t0.city, t0.country, t0.isPrimary,
t0.orgName, t0.positionTitle, t0.postalCode, t0.state, t0.streetAddress1, t0.streetAddress2,
t0.streetAddress3, t0.userId FROM organization t0 WHERE t0.userId = ? [params=(long) 2] [reused=3]>
2006-04-04 02:03:13,912 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> return>
2006-04-04 02:03:13,912 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> [0 ms] close>
2006-04-04 02:03:13,913 INFO [edu.ucsc.whisper.security.WhisperAccessDecisionManager] - <voting on
access to: invocation: method 'getUserInfoForUser', arguments [{DefaultUser: username=mark;
password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}]; target is of class
[edu.ucsc.whisper.core.manager.DefaultUserManager], with auth:
edu.ucsc.whisper.security.WhisperClientAuthenticationToken@798d8: Username: {DefaultUser:
username=mark; password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}; Password:
[PROTECTED]; Authenticated: true; Details: null; Granted Authorities: {DefaultAuthority:
authority=ROLE_USER}>
2006-04-04 02:03:13,913 INFO [edu.ucsc.whisper.security.UserIsOwnerOrAdminVoter] - <voting with auth
= edu.ucsc.whisper.security.WhisperClientAuthenticationToken@798d8: Username: {DefaultUser:
username=mark; password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}; Password:
[PROTECTED]; Authenticated: true; Details: null; Granted Authorities: {DefaultAuthority:
authority=ROLE_USER}, o = invocation: method 'getUserInfoForUser', arguments [{DefaultUser:
username=mark; password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}]; target is of
class [edu.ucsc.whisper.core.manager.DefaultUserManager], config = [ROLE_USER, ROLE_ANONYMOUS,
AFTER_ACL_READ]>
2006-04-04 02:03:13,913 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] -
<Publishing event in context [WebApplicationContext for namespace 'xfire-servlet']:
org.acegisecurity.event.authorization.AuthorizedEvent[source=invocation: method
'getUserInfoForUser', arguments [{DefaultUser: username=mark;
password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}]; target is of class
[edu.ucsc.whisper.core.manager.DefaultUserManager]]>
2006-04-04 02:03:13,914 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] -
<Publishing event in context [Root WebApplicationContext]:
org.acegisecurity.event.authorization.AuthorizedEvent[source=invocation: method
'getUserInfoForUser', arguments [{DefaultUser: username=mark;
password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}]; target is of class
[edu.ucsc.whisper.core.manager.DefaultUserManager]]>
2006-04-04 02:03:13,914 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@552f12] for key
[kodo.jdo.PersistenceManagerFactoryImpl@c2c9af] bound to thread [http-8443-Processor24]>
2006-04-04 02:03:13,915 DEBUG [kodo.Query] - <Executing query: [SELECT FROM
edu.ucsc.whisper.core.UserAccessControl
WHERE aclObjectId.domainObjectId==searchObjectId.domainObjectId
PARAMETERS edu.ucsc.whisper.core.DomainObjectIdentity searchObjectId] with
parameters: {searchObjectId=edu.ucsc.whisper.core.DefaultUserInfo:mark}>
2006-04-04 02:03:13,917 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> connection pool: active=0, idle=1>
2006-04-04 02:03:13,917 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> checkout>
2006-04-04 02:03:13,917 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> prepared statement cache: size=9,
max=50, requests=21, hits=12, created=9, redundant=0, overflow=0, leaked=0>
2006-04-04 02:03:13,919 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [2 ms] executing
prepstmnt 11249989 SELECT t0.accessControlId, t0.VERSN, t0.aclObjectId, t0.aclObjectParentId,
t0.permit, t1.userId, t1.TYP, t1.VERSN, t1.enabled, t1.password, t2.userInfoId, t2.TYPE, t2.VERSN,
t2.aboutText, t2.familyName, t2.firstName, t2.gender, t2.namePrefix, t2.nameSuffix, t2.otherNames,
t3.userId, t3.TYP, t3.VERSN, t3.enabled, t3.password, t3.USERINFO, t3.username, t1.username FROM
user_access_control t0 LEFT OUTER JOIN whisper_user t1 ON t0.userId = t1.userId LEFT OUTER JOIN
userinfo t2 ON t1.USERINFO = t2.userInfoId LEFT OUTER JOIN whisper_user t3 ON t2.userInfoId =
t3.USERINFO WHERE (t0.aclObjectId = ?) [params=(String) edu.ucsc.whisper.core.DefaultUserInfo:mark]
[reused=1]>
2006-04-04 02:03:13,920 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> return>
2006-04-04 02:03:13,921 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> [1 ms] close>
2006-04-04 02:03:13,921 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@552f12] for key
[kodo.jdo.PersistenceManagerFactoryImpl@c2c9af] bound to thread [http-8443-Processor24]>
2006-04-04 02:03:13,921 DEBUG [kodo.Query] - <Executing query: [SELECT FROM
edu.ucsc.whisper.core.AuthorityAccessControl
WHERE aclObjectId.domainObjectId==searchObjectId.domainObjectId
PARAMETERS edu.ucsc.whisper.core.DomainObjectIdentity searchObjectId] with
parameters: {searchObjectId=edu.ucsc.whisper.core.DefaultUserInfo:mark}>
2006-04-04 02:03:13,923 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> connection pool: active=0, idle=1>
2006-04-04 02:03:13,924 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> checkout>
2006-04-04 02:03:13,924 DEBUG [kodo.jdbc.JDBC] - <<t 11706420> prepared statement cache: size=9,
max=50, requests=22, hits=13, created=9, redundant=0, overflow=0, leaked=0>
2006-04-04 02:03:13,927 DEBUG [kodo.jdbc.SQL] - <<t 11706420, conn 15885558> [2 ms] executing
prepstmnt 4389286 SELECT t0.accessControlId, t0.VERSN, t0.aclObjectId, t0.aclObjectParentId,
t0.permit, t1.authorityId, t1.TYP, t1.VERSN, t1.authority FROM authority_access_control t0 LEFT
OUTER JOIN authorities t1 ON t0.authorityId = t1.authorityId WHERE (t0.aclObjectId = ?)
[params=(String) edu.ucsc.whisper.core.DefaultUserInfo:mark] [reused=1]>
2006-04-04 02:03:13,928 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> return>
2006-04-04 02:03:13,928 DEBUG [kodo.jdbc.JDBC] - <<t 11706420, conn 15885558> [0 ms] close>
2006-04-04 02:03:13,928 INFO [edu.ucsc.whisper.core.dao.JdoAclDao] - <found the controls:
[{AuthorityAccessControl: aclObjectId=edu.ucsc.whisper.core.DefaultUserInfo:mark;
aclObjectParentId=null; permit=READ_WRITE; recipient={DefaultAuthority: authority=ROLE_ADMIN}},
{UserAccessControl: aclObjectId=edu.ucsc.whisper.core.DefaultUserInfo:mark; aclObjectParentId=null;
permit=READ_WRITE; recipient={DefaultUser: username=mark;
password=871deb9e1c3dd967da1d4f6d01999eb71a4eab71; isEnabled=true}}]>
2006-04-04 02:03:13,928 INFO [edu.ucsc.whisper.service.DefaultUserService] - <Updating user info for
mark>
2006-04-04 02:03:13,929 INFO [edu.ucsc.whisper.service.DefaultUserService] - <existing user info =
{DefaultUserInfo: prefix=null; firstName=null; otherNames=null; familyName=null; suffix=null;
previousNames=(); gender=0; aboutText=null}>
2006-04-04 02:03:13,929 INFO [edu.ucsc.whisper.service.DefaultUserService] - <new user info =
{UserInfoData: prefix=Mr.; firstName=Mark; otherNames=David; familyName=Slater; suffix=null;
previousNames=(); gender=0; aboutText=blah blah blah}>
2006-04-04 02:03:13,930 DEBUG
[org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] - <Applying rules to
determine whether transaction should rollback on <4|false|4.0.0EA4> kodo.util.InvalidStateException:
To perform writes on persistent data outside of a transaction, the "NontransactionalWrite" property
must be set on the Transaction.
FailedObject: edu.ucsc.whisper.core.DefaultUserInfo-2>
2006-04-04 02:03:13,930 DEBUG
[org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] - <Winning rollback rule
is: null>
2006-04-04 02:03:13,930 DEBUG
[org.springframework.transaction.interceptor.RuleBasedTransactionAttribute] - <No relevant rollback
rule found: applying superclass default>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Invoking rollback for transaction on edu.ucsc.whisper.service.UserService.setUserInformation due to
throwable [<4|false|4.0.0EA4> kodo.util.InvalidStateException: To perform writes on persistent data
outside of a transaction, the "NontransactionalWrite" property must be set on the Transaction.
FailedObject: edu.ucsc.whisper.core.DefaultUserInfo-2]>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager begin rollback>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager begin processRollback>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager begin triggerBeforeCompletion>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] -
<Triggering beforeCompletion synchronization>
2006-04-04 02:03:13,934 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager - synchronization =
org.springframework.orm.jdo.PersistenceManagerFactoryUtils$PersistenceManagerSynchronization@ff0f8a>
2006-04-04 02:03:13,934 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Removed value
[org.springframework.orm.jdo.PersistenceManagerHolder@552f12] for key
[kodo.jdo.PersistenceManagerFactoryImpl@c2c9af] from thread [http-8443-Processor24]>
2006-04-04 02:03:13,934 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Persistence manager kodo.jdo.PersistenceManagerImpl@cc70c2, factory
kodo.jdo.PersistenceManagerFactoryImpl@c2c9af is transactional: false>
2006-04-04 02:03:13,935 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Closing JDO PersistenceManager>
2006-04-04 02:03:13,935 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] - <
persistence manager = kodo.jdo.PersistenceManagerImpl@cc70c2, factory =
kodo.jdo.PersistenceManagerFactoryImpl@c2c9af>
2006-04-04 02:03:13,935 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] - <mdslog
- AbstractPlatformTransactionManager end triggerBeforeCompletion>
2006-04-04 02:03:13,935 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] -
<Initiating transaction rollback> -
Kodo 4.0.0EA3 JDOHelper.is...() state functions
I'm trying to write unit tests for some of my higher level classes, and I've run into trouble trying
to test functions that delete persistent objects. I'm using Spring Framework's
AbstractTransactionalSpringContextTests class as my harness (which derives from JUnit's TestCase).
It sets up a transaction before each test function and rolls the transaction back (by default, this
is editable) after each test function. Because of this, I decided to base the test on the results of
JDOHelper.isDelete( objectThatWasDeleted ). My tests fail though, and all of the JDOHelper.is...()
functions return false at all points during the test. I know things are getting deleted though,
because before the Spring created transaction is started, I create my own transaction and persist
some objects, and after the Spring transaction is finished (and the test case), I create another
transaction to remove them (both my transactions are committed). Even in the tear down function,
JDOHelper.is...() functions don't seem to work; for example, isDeleted() returns false even though
the object has been scheduled for deletion and is in fact deleted when the transaction commits.
Is this a known bug? I was under the impression that JDOHelper functions were working as of EA2 (I
know they weren't working before that and we had to use KodoHelper).
Thanks,
Mark
Here's the code in question:
* This function is called after the test and the transaction it ran in have been completed.
* By default, the transaction is rolled back, but this can be overridden. This function
* should ensure the tests have been cleaned up, including anything that was created by the
* companion function onSetUpBeforeTransaction().
* @see onSetUpBeforeTransaction()
protected void onTearDownAfterTransaction()
if( transactionManager != null )
getLogger().info( "Starting transaction for post-test tear down." );
TransactionStatus status =
transactionManager.getTransaction( new DefaultTransactionDefinition() );
if( status != null )
getLogger().info( "Transaction for post-test tear down has been created." );
UserManager userManager = (UserManager) applicationContext.getBean( "userManager" );
User userToAlter = userManager.getUser( USER_TO_ALTER_USERNAME );
userManager.removeUser( userToAlter );
getLogger().debug(
"userToAlter (Kodo) - isDirty = " + KodoJDOHelper.isDirty( userToAlter )
+ ", isNew = " + KodoJDOHelper.isNew( userToAlter )
+ ", isPersistent = " + KodoJDOHelper.isPersistent( userToAlter )
+ ", isDeleted = " + KodoJDOHelper.isDeleted( userToAlter ) );
getLogger().debug( "userToAlter - isDirty = " + JDOHelper.isDirty( userToAlter )
+ ", isNew = " + JDOHelper.isNew( userToAlter )
+ ", isPersistent = " + JDOHelper.isPersistent( userToAlter )
+ ", isDeleted = " + JDOHelper.isDeleted( userToAlter ) );
try
transactionManager.commit( status );
finally
status = null;
else
getLogger().info( "Could not create transaction for post-test tear down."
+ " Superclass' transactionManager is null." );
And here's the log output (I've put blank lines around the relevant output):
2005-11-10 12:50:17,669 INFO [edu.ucsc.whisper.test.integration.UserManagerIntegrationTest] -
<Rolled back transaction after test execution>
2005-11-10 12:50:17,669 INFO [edu.ucsc.whisper.test.integration.UserManagerIntegrationTest] -
<Starting transaction for post-test tear down.>
2005-11-10 12:50:17,670 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Using
transaction object [org.springframework.orm.jdo.JdoTransactionManager$JdoTransactionObject@82d44b]>
2005-11-10 12:50:17,670 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Creating new
transaction with name [null]>
2005-11-10 12:50:17,670 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Opened new
PersistenceManager [kodo.jdo.PersistenceManagerImpl@3faa8d] for JDO transaction>
2005-11-10 12:50:17,670 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Exposing JDO
transaction as JDBC transaction
[org.springframework.orm.jdo.DefaultJdoDialect$DataStoreConnectionHandle@285701]>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Bound value
[org.springframework.jdbc.datasource.ConnectionHolder@681dea] for key [datasource 9833630] to thread
[main]>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Bound value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] to thread [main]>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Initializing
transaction synchronization>
2005-11-10 12:50:17,671 INFO [edu.ucsc.whisper.test.integration.UserManagerIntegrationTest] -
<Transaction for post-test tear down has been created.>
2005-11-10 12:50:17,671 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory]
- <Returning cached instance of singleton bean 'userManager'>
2005-11-10 12:50:17,671 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory]
- <Bean with name 'userManager' is a factory bean>
2005-11-10 12:50:17,671 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Getting transaction for edu.ucsc.whisper.core.UserManager.getUser>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] bound to thread [main]>
2005-11-10 12:50:17,671 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Found
thread-bound PersistenceManager [kodo.jdo.PersistenceManagerImpl@3faa8d] for JDO transaction>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.jdbc.datasource.ConnectionHolder@681dea] for key [datasource 9833630] bound to
thread [main]>
2005-11-10 12:50:17,671 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Using
transaction object [org.springframework.orm.jdo.JdoTransactionManager$JdoTransactionObject@87f48e]>
2005-11-10 12:50:17,671 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Participating
in existing transaction>
2005-11-10 12:50:17,671 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] bound to thread [main]>
2005-11-10 12:50:17,672 DEBUG [kodo.Query] - <executing query: [SELECT UNIQUE FROM
edu.ucsc.whisper.core.DefaultUser WHERE username==searchName
PARAMETERS java.lang.String searchName] with parameters: {searchName=userToAlter}>
2005-11-10 12:50:17,674 DEBUG [kodo.jdbc.JDBC] - <<t 977184> connection pool: active=0, idle=1>
2005-11-10 12:50:17,674 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> checkout>
2005-11-10 12:50:17,674 DEBUG [kodo.jdbc.JDBC] - <<t 977184> prepared statement cache: size=8,
max=50, requests=12, hits=4, created=8, redundant=0, overflow=0, leaked=0>
2005-11-10 12:50:17,677 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [3 ms] executing prepstmnt
1168959 SELECT t0.userId, t0.VERSN, t0.enabled, t0.password, t1.userInfoId, t1.VERSN, t1.aboutText,
t1.familyName, t1.firstName, t1.gender, t1.namePrefix, t1.nameSuffix, t1.otherNames, t2.userId,
t2.VERSN, t2.enabled, t2.password, t2.USERINFO, t2.username, t0.username FROM whisper_user t0 LEFT
OUTER JOIN userinfo t1 ON t0.USERINFO = t1.userInfoId LEFT OUTER JOIN whisper_user t2 ON
t1.userInfoId = t2.USERINFO WHERE (t0.username = ?) [params=(String) userToAlter] [reused=1]>
2005-11-10 12:50:17,690 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [3 ms] executing prepstmnt
4297359 SELECT t0.previousName, t0.nameOrder FROM userInfo_PreviousNames t0 WHERE t0.userInfoId = ?
ORDER BY t0.nameOrder ASC [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,693 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [2 ms] executing prepstmnt
16585718 SELECT t1.authorityId, t1.VERSN, t1.authority FROM user_authorities t0 INNER JOIN
authorities t1 ON t0.authorityId = t1.authorityId WHERE t0.userId = ? [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,697 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [3 ms] executing prepstmnt
11277980 SELECT t0.organizationId, t0.VERSN, t0.city, t0.country, t0.isPrimary, t0.orgName,
t0.positionTitle, t0.postalCode, t0.state, t0.streetAddress1, t0.streetAddress2, t0.streetAddress3,
t0.userId FROM organization t0 WHERE t0.userId = ? [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,698 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> return>
2005-11-10 12:50:17,698 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> [0 ms] close>
2005-11-10 12:50:17,698 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Invoking commit for transaction on edu.ucsc.whisper.core.UserManager.getUser>
2005-11-10 12:50:17,698 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Getting transaction for edu.ucsc.whisper.core.UserManager.removeUser>
2005-11-10 12:50:17,698 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] bound to thread [main]>
2005-11-10 12:50:17,698 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Found
thread-bound PersistenceManager [kodo.jdo.PersistenceManagerImpl@3faa8d] for JDO transaction>
2005-11-10 12:50:17,698 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.jdbc.datasource.ConnectionHolder@681dea] for key [datasource 9833630] bound to
thread [main]>
2005-11-10 12:50:17,698 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Using
transaction object [org.springframework.orm.jdo.JdoTransactionManager$JdoTransactionObject@ba0b12]>
2005-11-10 12:50:17,699 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Participating
in existing transaction>
2005-11-10 12:50:17,700 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] bound to thread [main]>
2005-11-10 12:50:17,702 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Retrieved value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] bound to thread [main]>
2005-11-10 12:50:17,702 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] -
<Invoking commit for transaction on edu.ucsc.whisper.core.UserManager.removeUser>
2005-11-10 12:50:17,702 DEBUG [edu.ucsc.whisper.test.integration.UserManagerIntegrationTest] -
<userToAlter (Kodo) - isDirty = false, isNew = false, isPersistent = false, isDeleted = false>
2005-11-10 12:50:17,702 DEBUG [edu.ucsc.whisper.test.integration.UserManagerIntegrationTest] -
<userToAlter - isDirty = false, isNew = false, isPersistent = false, isDeleted = false>
2005-11-10 12:50:17,703 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Triggering
beforeCommit synchronization>
2005-11-10 12:50:17,703 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Triggering
beforeCompletion synchronization>
2005-11-10 12:50:17,703 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Initiating
transaction commit>
2005-11-10 12:50:17,703 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Committing JDO
transaction on PersistenceManager [kodo.jdo.PersistenceManagerImpl@3faa8d]>
2005-11-10 12:50:17,703 DEBUG [kodo.jdbc.JDBC] - <<t 977184> connection pool: active=0, idle=1>
2005-11-10 12:50:17,703 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> checkout>
2005-11-10 12:50:17,703 DEBUG [kodo.jdbc.JDBC] - <<t 977184> prepared statement cache: size=11,
max=50, requests=16, hits=5, created=11, redundant=0, overflow=0, leaked=0>
2005-11-10 12:50:17,705 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [1 ms] executing prepstmnt
1104991 DELETE FROM userInfo_PreviousNames WHERE userInfoId = ? [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,706 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [1 ms] executing prepstmnt
15986263 DELETE FROM user_authorities WHERE authorityId = ? [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,708 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [1 ms] executing prepstmnt
10794796 DELETE FROM user_authorities WHERE userId = ? [params=(long) 1] [reused=0]>
2005-11-10 12:50:17,710 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [2 ms] executing prepstmnt
16100636 DELETE FROM authorities WHERE authorityId = ? AND VERSN = ? [params=(long) 1, (int) 1]
[reused=0]>
2005-11-10 12:50:17,711 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [1 ms] executing prepstmnt
3677634 DELETE FROM userinfo WHERE userInfoId = ? AND VERSN = ? [params=(long) 1, (int) 1] [reused=0]>
2005-11-10 12:50:17,713 DEBUG [kodo.jdbc.SQL] - <<t 977184, conn 3700728> [1 ms] executing prepstmnt
2745891 DELETE FROM whisper_user WHERE userId = ? AND VERSN = ? [params=(long) 1, (int) 1] [reused=0]>
2005-11-10 12:50:17,828 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> [115 ms] commit>
2005-11-10 12:50:17,829 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> return>
2005-11-10 12:50:17,829 DEBUG [kodo.jdbc.JDBC] - <<t 977184, conn 3700728> [1 ms] close>
2005-11-10 12:50:17,830 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Triggering
afterCompletion synchronization>
2005-11-10 12:50:17,830 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Clearing transaction
synchronization>
2005-11-10 12:50:17,830 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Removed value
[org.springframework.orm.jdo.PersistenceManagerHolder@8424bd] for key
[kodo.jdo.PersistenceManagerFactoryImpl@aa994e] from thread [main]>
2005-11-10 12:50:17,830 DEBUG
[org.springframework.transaction.support.TransactionSynchronizationManager] - <Removed value
[org.springframework.jdbc.datasource.ConnectionHolder@681dea] for key [datasource 9833630] from
thread [main]>
2005-11-10 12:50:17,831 DEBUG [org.springframework.orm.jdo.JdoTransactionManager] - <Closing JDO
PersistenceManager [kodo.jdo.PersistenceManagerImpl@3faa8d] after transaction>
2005-11-10 12:50:17,831 DEBUG [org.springframework.orm.jdo.PersistenceManagerFactoryUtils] -
<Closing JDO PersistenceManager>Abe White wrote:
You need to make sure that when you enhance, you include JDO
enhancement, not just the base Kodo enhancement. Now that Kodo 4
supports EJB 3 users who might not want JDO, it doesn't enhance-in
dependencies on JDO unless you ask it to.
If you enhance on the command line, that means using the "jdoc" command
rather than "kodoc" ("jdoc" is actually just a shortcut for "kodoc -jdo
true"). If you use the PCEnhancerTask, it means setting the jdoEnhance
attribute:
<taskdef name="kodoc" classname="kodo.ant.PCEnhancer"/>
<kodoc jdoEnhance="true">
</kodoc>So, what are the primary differences between the enhancement done for EJB3
and JDO? I gather that "base Kodo enhancement" is EJB3.
Scott -
Query under Transaction Exception....
Hello all:
I have a exception for using kodo3.0
e.g
GroupSetting groupSetting = null;
String filter = "this.organGroup.groupID == groupID";
String parameters = "Integer groupID";
Collection col = this.getJdoTemplate().find(GroupSetting.class, filter,
parameters, new Object[] { new Integer(groupID)});
Iterator it = col.iterator();
while (it.hasNext()) {
groupSetting = (GroupSetting) it.next();
return groupSetting;
I use Spring JdoDaoSupport,
when i let this code under a transaction,some Exception happen..
but if leave this code under a transction,there allways good...
I think mybe the result is Optimistic transaction....
test.GroupSettingBusinessTest -
org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in
task 'JDO operation'; nested exception is
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in
task 'JDO operation'; nested exception is
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:67)
at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$400(LoggingConnectionDecorator.java:19)
at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:629)
at
com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:351)
at
com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:338)
at
kodo.jdbc.runtime.JDBCStoreManager.getResultInternal(JDBCStoreManager.java:843)
at kodo.jdbc.runtime.JDBCStoreManager.getResult(JDBCStoreManager.java:804)
at
kodo.jdbc.runtime.AbstractSelectResultObjectProvider.open(AbstractSelectResultObjectProvider.java:84)
at com.solarmetric.rop.WindowResultList.<init>(WindowResultList.java:46)
at
kodo.jdbc.runtime.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:136)
at
kodo.runtime.CopyOnWriteFetchConfiguration.newResultList(CopyOnWriteFetchConfiguration.java:159)
at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:718)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:640)
at
org.springframework.orm.jdo.JdoTemplate$12.doInJdo(JdoTemplate.java:367)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:199)
at
org.springframework.orm.jdo.JdoTemplate.executeFind(JdoTemplate.java:180)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:359)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:353)
at
com.hintsoft.pubwin.net.bean.member.persistence.dao.jdo.GroupSettingDaoJdo.findGroupSettingPersistence(GroupSettingDaoJdo.java:47)
at
com.hintsoft.pubwin.net.bean.member.persistence.dao.jdo.GroupSettingDaoJdo.findGroupSetting(GroupSettingDaoJdo.java:61)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness.findGroupSetting(GroupSettingBusiness.java:81)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness$$FastClassByCGLIB$$80d45d10.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:632)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness$$EnhancerByCGLIB$$e18f0ffa.findGroupSetting(<generated>)
at
com.hintsoft.pubwin.net.bean.member.testcase.test.GroupSettingBusinessTest.testFindGroupSetting(GroupSettingBusinessTest.java:69)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)Hi,
Could you clarify whether or not you're in a transaction when this
exception occurs? I noticed that there is a FOR UPDATE at the end of
the statement. That probably shouldn't be there outside of a
transaction. Please let us know if that's the problem.
Thanks,
Greg
jjyao wrote:
Hello all:
I have a exception for using kodo3.0
e.g
GroupSetting groupSetting = null;
String filter = "this.organGroup.groupID == groupID";
String parameters = "Integer groupID";
Collection col = this.getJdoTemplate().find(GroupSetting.class, filter,
parameters, new Object[] { new Integer(groupID)});
Iterator it = col.iterator();
while (it.hasNext()) {
groupSetting = (GroupSetting) it.next();
return groupSetting;
I use Spring JdoDaoSupport,
when i let this code under a transaction,some Exception happen..
but if leave this code under a transction,there allways good...
I think mybe the result is Optimistic transaction....
test.GroupSettingBusinessTest -
org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in
task 'JDO operation'; nested exception is
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in
task 'JDO operation'; nested exception is
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
com.solarmetric.jdbc.ReportingSQLException: DB2 SQL error: SQLCODE: -511,
SQLSTATE: 42829, SQLERRMC: null {prepstmnt 107840951 SELECT
t0.GROUPSETTINGID, t0.ALLOWDRAW, t0.ALLOWSTRIKE, t0.ALLOWTRANSFER,
t0.ASCENDONLY, t0.AUTOAPPROVE, t0.BARVISIBLE, t0.DEFAULTLEVELNAME,
t0.LASTMODIFY, t0.MAXDRAW, t0.MAXRECHARGE, t0.MAXROWS, t0.MAXSTRIKE,
t0.MAXTRANSFER, t0.MINDRAW, t0.MINRECHARGE, t0.MINSTRIKE, t0.MINTRANSFER,
t0.GROUPID, t0.RECHARGEABLE, t0.USERTYPEMODIFICATION FROM
OLTP.GROUPSETTING t0 INNER JOIN OLTP.ORGANGROUP t1 ON t0.GROUPID =
t1.GROUPID WHERE (t1.GROUPID = ?) FOR UPDATE [reused=0]} [code=-511,
state=42829]
at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:67)
at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$400(LoggingConnectionDecorator.java:19)
at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:629)
at
com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:351)
at
com.solarmetric.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:338)
at
kodo.jdbc.runtime.JDBCStoreManager.getResultInternal(JDBCStoreManager.java:843)
at kodo.jdbc.runtime.JDBCStoreManager.getResult(JDBCStoreManager.java:804)
at
kodo.jdbc.runtime.AbstractSelectResultObjectProvider.open(AbstractSelectResultObjectProvider.java:84)
at com.solarmetric.rop.WindowResultList.<init>(WindowResultList.java:46)
at
kodo.jdbc.runtime.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:136)
at
kodo.runtime.CopyOnWriteFetchConfiguration.newResultList(CopyOnWriteFetchConfiguration.java:159)
at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:718)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:640)
at
org.springframework.orm.jdo.JdoTemplate$12.doInJdo(JdoTemplate.java:367)
at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:199)
at
org.springframework.orm.jdo.JdoTemplate.executeFind(JdoTemplate.java:180)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:359)
at org.springframework.orm.jdo.JdoTemplate.find(JdoTemplate.java:353)
at
com.hintsoft.pubwin.net.bean.member.persistence.dao.jdo.GroupSettingDaoJdo.findGroupSettingPersistence(GroupSettingDaoJdo.java:47)
at
com.hintsoft.pubwin.net.bean.member.persistence.dao.jdo.GroupSettingDaoJdo.findGroupSetting(GroupSettingDaoJdo.java:61)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness.findGroupSetting(GroupSettingBusiness.java:81)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness$$FastClassByCGLIB$$80d45d10.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:632)
at
com.hintsoft.pubwin.net.bean.member.service.GroupSettingBusiness$$EnhancerByCGLIB$$e18f0ffa.findGroupSetting(<generated>)
at
com.hintsoft.pubwin.net.bean.member.testcase.test.GroupSettingBusinessTest.testFindGroupSetting(GroupSettingBusinessTest.java:69)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167) -
ExceptionInInitializerError when trying a CRUD operation
Hi Forum,
I'm fairly a new kodo user. I created mapping for my objects and upon running the application I see the following error. It happens whenever I try to attempt any CRUD operation. Has anyone seen this before?
TIA
java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at kodo.jdbc.meta.Mappings.forFieldMappingName(Mappings.java:734) at kodo.jdbc.meta.Mappings.newFieldMappingInstance(Mappings.java:722) at kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:207) at kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470) at kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:993) at kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:973) at kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:939) at kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:659) at kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:801) at kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:347) at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431) at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349) at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177) at kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:165) at kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2718) at kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2670) at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:92) at org.springframework.orm.jdo.JdoTemplate$9.doInJdo(JdoTemplate.java:396) at org.springframework.orm.jdo.JdoTemplate.execute(JdoTemplate.java:260) at org.springframework.orm.jdo.JdoTemplate.makePersistent(JdoTemplate.java:394) atYou can only make an HTTPS connection if the SWF was also
loaded via HTTPS. -
MappingInfoNotFoundException on CustomMapping
Hi,
i created a custom Field mapping:
<field name="active">
<extension vendor-name="kodo"
key="jdbc-field-map-name"
value="de.logentis.kodo.YesNoMapping">
</extension>
<extension vendor-name="kodo"
key="jdbc-field-map/column"
value="active">
</extension>
</field>
Of course the YesNoMapping is also existant in my webapp tree. The
YesNoMapping is nearly a 100% copy of the supplied IsMaleMapping from
Kodo. But i get this error log:
[ERROR] - ClientManagerAction.doExecute(41) |
org.springframework.orm.jdo.JdoUsa
geException: No mapping information was found for
"de.logentis.versysng.domain.C
lient.active".; nested exception is
kodo.jdbc.meta.MappingInfoNotFoundException:
No mapping information was found for
"de.logentis.versysng.domain.Client.active
I tripple checked the class and packagenames but everything is in place.
Is there something i forgot?
Thanks
marcMarc-
When you report things like "no mapping found" and "i got mapping
mismatch", we really need the complete error message and stack trace to
be able to help you: without those, we'll only be guessing as to the
source of the problem.
Your particular mapping looks correct, except that I don't think that
you want the "type" extension: that is only means to declare a concrete
type for a field whose declared type is an interface of superclass ...
it doesn't apply to your situation at all.
If you still have problems with this mapping, please post the following
information:
1. The complete error message you receive
2. The complete generated .jdo and .mapping files after you run
xdoclet on the source file
In article <[email protected]>, Marc Logemann wrote:
Stephen Kim wrote:
Note for simple type conversions, you can use our external-values
extension:
http://solarmetric.com/Software/Documentation/3.2.4/docs/ref_guide_mapping_fieldmapping.html#ref_guide_mapping_fieldmapping_externvalues
sorry, again me. This "simple" transformation thing drives me nuts. In
this time i would have implemented a distributed transaction strategy ;-)
I checked the docs, applied the example and voila, error:
Here is my xdoclet mapping:
* @jdo.field
* @jdo.class-vendor-extension vendor-name="kodo" key="type" value="char"
* @jdo.class-vendor-extension vendor-name="kodo" key="external-values"
value="true=Y, false=N"
* @jdo.field-vendor-extension vendor-name="kodo"
key="jdbc-field-map/column" value="active"
private boolean active;
This boolean should be stored to a CHAR field in my database. If i run
this, i get "no mapping found". If i put also a "jdbc-field-map" ->
value (which is not documented for the example) i got mapping mismatch.
I checked the samples directory, but there is no external-values example
in there, only the full blown externalisations.
Either i am completely crazy, or you cant copy and paste the example
from the docs (ok its not direclty copy/pasted, but to 80%).
Again, sorry to bother you with that, but i need that boolean->char
conversion thing running :-) Perhaps this is even a DBDictionary issue,
because it seems to be a general mapping i want to achieve.
Marc Prud'hommeaux
SolarMetric Inc. -
Error 500--Internal Server Error org.apache.tapestry
Hi.
I am getting the following error when access an application. Application give no error during deployment. Only get this error when trying to logon to the application.
How do I resolve this issue?
Thanks
Sayef
Error 500--Internal Server Error
org.apache.tapestry.ApplicationRuntimeException: Could not load class com.vitechinc.v3.core.view.HomeService from weblogic.utils.classloaders.ChangeAwareClassLoader@12816cb finder: weblogic.utils.classloaders.CodeGenClassFinder@19a917d annotation: [email protected]: com.vitechinc.v3.core.view.HomeService
at org.apache.tapestry.util.DefaultResourceResolver.findClass(DefaultResourceResolver.java:107)
at org.apache.tapestry.engine.AbstractEngine.createServiceMap(AbstractEngine.java:1868)
at org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.java:1346)
at com.vitechinc.core.VitechEngine.setupForRequest(VitechEngine.java:53)
at com.vitechinc.v3.core.view.V3Engine.setupForRequest(V3Engine.java:282)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:824)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.vitechinc.core.locale.ExtractLocaleFilter.doFilterInternal(ExtractLocaleFilter.java:43)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:106)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.ClassNotFoundException: com.vitechinc.v3.core.view.HomeService
at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
at org.apache.tapestry.util.DefaultResourceResolver.findClass(DefaultResourceResolver.java:103)
... 30 moreThe "com.vitechinc.v3.core.view.HomeService" class isn't part of the deployment package.
Maybe you are looking for
-
Cannot send photos via email from within iPhoto
Hi, I used to use the functionality to send photos directly from iphoeto by email, using the templates provided. It has always worked. I have not used it since the last update to iPhoto 9.3, but it does not work anymore. I get an error: "Your email d
-
Hello, I recently found a working HP laserjet 6l curbside recently and I am wondering what's the best way to connect it to my Mac G4. I read somewheres off of google search about it might work with some of the built in drivers in OSX but as far a con
-
To replace standard smartform by a custom form, to be used in PRINT PREVIEW
Hi, I have a requirement in CRM 2007 webUI. If we try to create a sales order, then we have a toolbar option button with title "PRINT PREVIEW". It uses the custom smart form "CRM_ORDER_CONFIRMATION_01. I have to replace this standard form by a Z cust
-
Change currency at header level in shopping cart
Hello I'm working with SRM 7.0 in classic scenario. We are facing an issue, because even if we change the currency at item level, when the PO is created in back-end it is the default currency of the supplier. We can change behaviour in Badi BBP_CREAT
-
Here is my code, I thought I was doing this right but can't get this to show up import javax.swing.*; import java.awt.event.*; import java.awt.*; * @author Administrator public class EditFrame extends JFrame{ LP editing_lp; JPanel editing_pa