I would highly appreciate any help.
After I add new field in an existing table, when I try to access and view data I get error (see the stack trace below).
The way that I use to access data is through a related table.
Hibernate version: 3
Mapping documents: hibernate-mapping-3.0
Stack Trace:
* agile.orthoz.dbo.patient.contract.Pp$$BulkBeanByCGLIB$$b90643af.setPropertyValues(<generated>)
* org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:200)
* org.hibernate.tuple.PojoTuplizer.setPropertyValues(PojoTuplizer.java:173)
* org.hibernate.persister.entity.BasicEntityPersister.setPropertyValues(BasicEntityPersister.java:2919)
* org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
* org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:530)
* org.hibernate.loader.Loader.doQuery(Loader.java:436)
* org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
* org.hibernate.loader.Loader.loadCollection(Loader.java:1434)
* org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111)
* org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
* org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
* org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430)
* org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:280)
* org.hibernate.engine.PersistenceContext.initializeNonLazyCollections(PersistenceContext.java:796)
* org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
* org.hibernate.loader.Loader.loadCollection(Loader.java:1434)
* org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:111)
* org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
* org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
* org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1430)
* org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:176)
* org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48)
* org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:118)
* agile.orthoz.view.patient.explorerTree.PatientTreeContentProvider.processContracts(PatientTreeContentProvider.java:59)
* agile.orthoz.view.patient.explorerTree.PatientTreeContentProvider.<init>(PatientTreeContentProvider.java:37)
* agile.orthoz.view.MainSearchComponent.selectPatient(MainSearchComponent.java:117)
* sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
* sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
* sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
* java.lang.reflect.Method.invoke(Method.java:585)
* org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
* org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:155)
* org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:124)
* org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:69)
* org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:51)
* org.apache.tapestry.binding.ListenerMethodBinding.actionTriggered(ListenerMethodBinding.java:77)
* org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:51)
* $ListenerInvoker_11681926f27.invokeListener($ListenerInvoker_11681926f27.java)
* org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:105)
* net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.triggerComponent(AjaxDirectServiceImpl.java:337)
* net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.service(AjaxDirectServiceImpl.java:243)
* $AjaxDirectService_11681926f7b.service($AjaxDirectService_11681926f7b.java)
* org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66)
* org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
* org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
* $WebRequestServicer_11681926f5d.service($WebRequestServicer_11681926f5d.java)
* $WebRequestServicer_11681926f59.service($WebRequestServicer_11681926f59.java)
* org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
* $ServletRequestServicer_11681926f3d.service($ServletRequestServicer_11681926f3d.java)
* org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
* $ServletRequestServicerFilter_11681926f39.service($ServletRequestServicerFilter_11681926f39.java)
* $ServletRequestServicer_11681926f3f.service($ServletRequestServicer_11681926f3f.java)
* org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
* $ServletRequestServicerFilter_11681926f37.service($ServletRequestServicerFilter_11681926f37.java)
* $ServletRequestServicer_11681926f3f.service($ServletRequestServicer_11681926f3f.java)
* org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
* $ServletRequestServicerFilter_11681926f3b.service($ServletRequestServicerFilter_11681926f3b.java)
* $ServletRequestServicer_11681926f3f.service($ServletRequestServicer_11681926f3f.java)
* $ServletRequestServicer_11681926f31.service($ServletRequestServicer_11681926f31.java)
* org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
* org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
* javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
* javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
* org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
* org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
* org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172)
* org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
* org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
* org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
* org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
* org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
* org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
* org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
* org.mortbay.http.HttpServer.service(HttpServer.java:909)
* org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
* org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
* org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
* org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
* org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
* org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Using database:postgresql7.4.8.
As a matter of this I cannot add any more fields to the existing tables unless there is no data recorded.
Is the only solution, adding new tables with necessary data?
Thanks for help
|