Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

org.springframework.orm.hibernate3.HibernateSystemException: could not set a field value by reflecti

 
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to hibernate. I am getting this exception on running my main class

/**
* Campaign priority
*/
private int priority = 0;

/**
* @return the priority
*/
public int getPriority() {
return priority;
}

/**
* @param priority the priority to set
*/
public void setPriority(int priority) {
this.priority = priority;
}


the priority field create in the table but its value not set by default o . and i am got these exception how i am resolve it please help me.

org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@109f81a targetAction = org.springframework.webflow.action.LocalBeanInvokingAction@17f9037, attributes = map[[empty]]] in state 'listCampaigns' of flow 'campaign-manager-flow'; nested exception is org.springframework.binding.method.MethodInvocationException: Unable to invoke method [ClassMethodKey@1e8ff29 type = CampaignManager, methodName = 'loadAll', parameterTypes = array<Class>[[empty]]] with arguments array<Object>[[empty]]; nested exception is java.lang.reflect.InvocationTargetException
Caused by: org.springframework.binding.method.MethodInvocationException: Unable to invoke method [ClassMethodKey@1e8ff29 type = CampaignManager, methodName = 'loadAll', parameterTypes = array<Class>[[empty]]] with arguments array<Object>[[empty]]; nested exception is java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.binding.method.MethodInvoker.invoke(MethodInvoker.java:98)
at org.springframework.webflow.action.AbstractBeanInvokingAction.doExecute(AbstractBeanInvokingAction.java:150)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:215)
at org.springframework.webflow.AnnotatedAction.execute(AnnotatedAction.java:137)
at org.springframework.webflow.ActionExecutor.execute(ActionExecutor.java:54)
at org.springframework.webflow.ActionList.execute(ActionList.java:162)
at org.springframework.webflow.State.enter(State.java:191)
at org.springframework.webflow.Flow.start(Flow.java:568)
at org.springframework.webflow.execution.impl.FlowExecutionControlContextImpl.start(FlowExecutionControlContextImpl.java:187)
at org.springframework.webflow.execution.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:172)
at org.springframework.webflow.executor.FlowExecutorImpl.launch(FlowExecutorImpl.java:177)
at org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:115)
at org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:196)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
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.Http11AprProcessor.process(Http11AprProcessor.java:833)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.orm.hibernate3.HibernateSystemException: could not set a field value by reflection setter of com.versata.fdds.model.campaign.GroupCampaign.priority; nested exception is org.hibernate.PropertyAccessException: could not set a field value by reflection setter of com.versata.fdds.model.campaign.GroupCampaign.priority
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:668)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:408)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
at org.springframework.orm.hibernate3.HibernateTemplate.loadAll(HibernateTemplate.java:524)
at com.versata.fdds.model.managers.HibernateDao.loadAll(HibernateDao.java:70)
at com.versata.fdds.model.managers.GenericManager.loadAll(GenericManager.java:349)
at com.versata.fdds.model.managers.GenericManager$$FastClassByCGLIB$$3a76c975.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:644)
at com.versata.fdds.model.managers.CampaignManager$$EnhancerByCGLIB$$29b2be2b.loadAll(<generated>)
... 37 more
Caused by: org.hibernate.PropertyAccessException: could not set a field value by reflection setter of com.versata.fdds.model.campaign.GroupCampaign.priority
at org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:82)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3499)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2144)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
at org.hibernate.loader.Loader.list(Loader.java:2023)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:95)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at org.springframework.orm.hibernate3.HibernateTemplate$5.doInHibernate(HibernateTemplate.java:528)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)
... 44 more
Caused by: java.lang.IllegalArgumentException
at sun.reflect.UnsafeIntegerFieldAccessorImpl.set(UnsafeIntegerFieldAccessorImpl.java:62)
at java.lang.reflect.Field.set(Field.java:657)
at org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:79)
... 59 more


 
Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!