cancel
Showing results for 
Search instead for 
Did you mean: 

Hibernate: Re-Deploy destroys WebService

Former Member
0 Kudos

Hi all,

I'm working with NetWeaver 2004s and Hibernate 3. I've developped a stateless SessionBean wrapped by a WebService. One of its business methods performs a Hibernate-HQL-query.

Testing the business method works fine as long as I do not re-deploy the application. Re-Deploy of the application causes an error at next call of the business method. This is even true if I do not modify anything in my source.

After re-starting the whole NetWeaver, everything works fine again.

Deleting the application and the WebService before re-deployment does not help.

Does anybody have an idea what I'm doing wrong?

The error message when calling the business method is:

Caused by: org.hibernate.HibernateException: org.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.karmann.applman.hibernate.ConfigValueHelperPK.?

at com.karmann.applman.ssb.CVHBean.loadValues(CVHBean.java:210)

at com.karmann.applman.ssb.CVHBean.getTextOfSymbol(CVHBean.java:124)

at com.karmann.applman.ssb.CVHLocalLocalObjectImpl0.getTextOfSymbol(CVHLocalLocalObjectImpl0.java:247)

... 28 more

Caused by: org.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.karmann.applman.hibernate.ConfigValueHelperPK.?

at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:42)

at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:257)

at org.hibernate.type.ComponentType.isEqual(ComponentType.java:111)

at org.hibernate.cache.CacheKey.equals(CacheKey.java:42)

at java.util.HashMap.eq(HashMap.java:274)

at java.util.HashMap.getEntry(HashMap.java:360)

at java.util.LinkedHashMap.get(LinkedHashMap.java:266)

at net.sf.ehcache.store.MemoryStore.get(MemoryStore.java:129)

at net.sf.ehcache.Cache.searchInMemoryStore(Cache.java:721)

at net.sf.ehcache.Cache.get(Cache.java:549)

at net.sf.ehcache.Cache.get(Cache.java:529)

at org.hibernate.cache.EhCache.get(EhCache.java:110)

at org.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:153)

at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:126)

at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:452)

at org.hibernate.loader.Loader.doQuery(Loader.java:406)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)

at org.hibernate.loader.Loader.doList(Loader.java:1499)

at org.hibernate.loader.Loader.list(Loader.java:1482)

at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:365)

at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:268)

at org.hibernate.impl.SessionImpl.list(SessionImpl.java:782)

at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)

at com.karmann.applman.ssb.CVHBean.loadValues(CVHBean.java:197)

... 30 more

Caused by: java.lang.ClassCastException

at com.karmann.applman.hibernate.ConfigValueHelperPK$$BulkBeanByCGLIB$$cbead80b.getPropertyValues(<generated>)

at net.sf.cglib.beans.BulkBean.getPropertyValues(BulkBean.java:48)

at org.hibernate.tuple.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:39)

... 53 more

org.hibernate.HibernateException: org.hibernate.PropertyAccessException: exception getting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) getter of com.karmann.applman.hibernate.ConfigValueHelperPK.?

at com.karmann.applman.ssb.CVHBean.loadValues(CVHBean.java:210)

at com.karmann.applman.ssb.CVHBean.getTextOfSymbol(CVHBean.java:124)

at com.karmann.applman.ssb.CVHLocalLocalObjectImpl0.getTextOfSymbol(CVHLocalLocalObjectImpl0.java:247)

at com.karmann.applman.ssb.SoftwareComponentBean.hibernateToDTO(SoftwareComponentBean.java:544)

at com.karmann.applman.ssb.SoftwareComponentBean.getComponent(SoftwareComponentBean.java:294)

at com.karmann.applman.ssb.SoftwareComponentLocalLocalObjectImpl0.getComponent(SoftwareComponentLocalLocalObjectImpl0.java:175)

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

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Christoph,

This seems like a classloading issue. Please make sure that you also redeploy all other components that your application depends on. (If you have specified those dependencies in the application-j2ee-engine.xml this should happen automatically.)

HTH!

-Vladimir

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vladimir,

great, that's it! Thank you so much for saving hours of work!

Christoph