Hibernate warnings : WARN org.hibernate.engine.loading.internal.LoadContexts - java

I am getting below warning followed by exception which causing not loading records.
I don't think so, it is problem with the code because the same build working without issue in all the environments. It is failing only on the higher environment.
is it related to any Hibernate properties or dbcp2?
2803716 [qtp1835244107-215] WARN org.hibernate.engine.loading.internal.LoadContexts - HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext#3405d05b<rs=org.apache.commons.dbcp2.DelegatingResultSet#5da1f5a3>
2803717 [qtp1835244107-215] WARN org.hibernate.engine.loading.internal.CollectionLoadContext - HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
which is leading below error stack trace
com.gwtplatform.dispatch.rpc.server.AbstractDispatchServiceImpl execute
WARNING: Service exception while executing abc.xyz.LookOrder: Service exception executing action "LookOrder", org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: abc.xyz.DConfig
com.gwtplatform.dispatch.rpc.shared.ServiceException: Service exception executing action "LookOrder", org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: abc.xyz.DConfig
at com.gwtplatform.dispatch.rpc.server.AbstractDispatchImpl.doExecute(AbstractDispatchImpl.java:164)
at com.gwtplatform.dispatch.rpc.server.AbstractDispatchImpl.execute(AbstractDispatchImpl.java:110)
at com.gwtplatform.dispatch.rpc.server.AbstractDispatchServiceImpl.execute(AbstractDispatchServiceImpl.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at com.gwtplatform.dispatch.rpc.server.spring.DispatchServiceImpl.handleRequest(DispatchServiceImpl.java:63)
at org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:711)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1632)
at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:213)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1632)
at com.gwtplatform.dispatch.rpc.server.AbstractHttpSessionSecurityCookieFilter.doFilter(AbstractHttpSessionSecurityCookieFilter.java:67)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1624)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1112)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:479)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1046)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:462)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:281)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: abc.xyz.DConfig
at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:114)
at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:136)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:730)
at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:4565)
at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1313)
at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1302)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1618)
at org.hibernate.loader.Loader.getRow(Loader.java:1509)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:719)
at org.hibernate.loader.Loader.processResultSet(Loader.java:949)
at org.hibernate.loader.Loader.doQuery(Loader.java:917)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:318)
at org.hibernate.loader.Loader.loadCollection(Loader.java:2262)
at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:65)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:674)
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:86)
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1774)
at org.hibernate.collection.internal.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:694)
at org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:1028)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:353)
at org.hibernate.loader.Loader.doList(Loader.java:2550)
at org.hibernate.loader.Loader.doList(Loader.java:2536)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366)
at org.hibernate.loader.Loader.list(Loader.java:2361)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:357)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:198)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1194)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at abc.xyz.dao.impl.OrderDaoImpl.searchOrders(OrderDaoImpl.java:39)
at abc.xyz,service.impl.OrderServiceImpl.search(OrderServiceImpl.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy117.search(Unknown Source)
at abc.xyz.admin.server.handler.OrderLookOrderHandler.doExecute(OrderLookOrderHandler.java:49)
at abc.xyz.admin.server.handler.OrderLookOrderHandler.doExecute(OrderLookOrderHandler.java:18)
at abc.xyz.web.server.handler.AbstractActionHandler.execute(AbstractActionHandler.java:83)
at com.gwtplatform.dispatch.rpc.server.AbstractDispatchImpl.doExecute(AbstractDispatchImpl.java:154)
... 44 more
I have checked the Hibernate properties and only difference I found is hibernate.hbm2ddl.auto=none. In the success environment, it is set to default.

Related

How to stop log4j2 load class in exception stack?

Log4j2 will load class when print exception stack trace, but it will use the incorrect class loader(org.eclipse.jetty.webapp.WebAppClassLoader, extends URLClassLoader, load class synchronized) to load the class generated by aop (such as sun.reflect.GeneratedMethodAccessor<\digit>, only can load by DelegateClassLoader), and it can never load successfully.
Here is the exception stack trace in my service:
2018-11-30 14:43:09.425 - - [ERROR] com.myservice.mobile.message.group.deal.RPCGroupDealService-2-thread-30 ThriftServerInvoker #XMDT#{__ptTest__=true __traceId__=4869019290298993826}#XMDT# mtthrift server invoker Exception:null, cause:
Error querying database. Cause: java.sql.SQLException: com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 50, active 20, maxActive 20
at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1155)
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:977)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:957)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:947)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:102)
at com.mycompany.zebra.single.jdbc.SingleDataSource.getConnectionOrigin(SingleDataSource.java:212)
at com.mycompany.zebra.single.jdbc.SingleDataSource.access$000(SingleDataSource.java:31)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:197)
at com.mycompany.zebra.filter.wall.WallFilter.getSingleConnection(WallFilter.java:120)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:195)
at com.mycompany.zebra.filter.DefaultJdbcFilter.getSingleConnection(DefaultJdbcFilter.java:75)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:195)
at com.mycompany.zebra.filter.DefaultJdbcFilter.getSingleConnection(DefaultJdbcFilter.java:75)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:195)
at com.mycompany.zebra.filter.DefaultJdbcFilter.getSingleConnection(DefaultJdbcFilter.java:75)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:195)
at com.mycompany.zebra.monitor.filter.CatFilter.getSingleConnection(CatFilter.java:114)
at com.mycompany.zebra.single.jdbc.SingleDataSource$2.getSingleConnection(SingleDataSource.java:195)
at com.mycompany.zebra.single.jdbc.SingleDataSource.getConnection(SingleDataSource.java:201)
at com.mycompany.zebra.single.jdbc.SingleDataSource.getConnection(SingleDataSource.java:184)
at com.mycompany.zebra.group.datasources.LoadBalancedDataSource.getConnection(LoadBalancedDataSource.java:114)
at com.mycompany.zebra.group.datasources.LoadBalancedDataSource.getConnection(LoadBalancedDataSource.java:80)
at com.mycompany.zebra.group.jdbc.GroupConnection.getReadConnection(GroupConnection.java:176)
at com.mycompany.zebra.group.jdbc.GroupConnection.getRealConnection(GroupConnection.java:192)
at com.mycompany.zebra.group.jdbc.GroupPreparedStatement.executeQuery(GroupPreparedStatement.java:140)
at com.mycompany.zebra.group.jdbc.GroupPreparedStatement.execute(GroupPreparedStatement.java:97)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:39)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:243)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:117)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:79)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:73)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:350)
at com.sun.proxy.$Proxy44.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:190)
at com.myservice.mobile.group.biz.domain.dao.DealPoiDao.selectByPoiidsAndDpStatus(DealPoiDao.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.myservice.deal.aspects.aj.MonitorAspect.wrap(MonitorAspect.java:72)
at com.myservice.deal.aspects.aj.MonitorAspect.wrapMethod(MonitorAspect.java:41)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.myservice.mobile.group.biz.common.aspect.DaoFlowControlAspect.doFlowControl(DaoFlowControlAspect.java:25)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy45.selectByPoiidsAndDpStatus(Unknown Source)
at com.myservice.mobile.group.biz.service.PoiDealService.getPoiDealFromDB(PoiDealService.java:118)
at com.myservice.mobile.group.biz.service.PoiDealService.getPoiDealMap(PoiDealService.java:91)
at com.myservice.mobile.group.octo.DealThriftProcessor.listDidByEqualsPoiidsAndDpStatus(DealThriftProcessor.java:283)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.myservice.deal.aspects.aj.MonitorAspect.wrap(MonitorAspect.java:72)
at com.myservice.deal.aspects.aj.MonitorAspect.wrapMethod(MonitorAspect.java:41)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy48.listDidByEqualsPoiidsAndDpStatus(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.myservice.mobile.mtthrift.proxy.ThriftServerInvoker.invoke(ThriftServerInvoker.java:187)
at com.sun.proxy.$Proxy48.listDidByEqualsPoiidsAndDpStatus(Unknown Source)
at com.myservice.mobile.message.group.deal.RPCGroupDealService$Processor$listDidByEqualsPoiidsAndDpStatus.getResult(RPCGroupDealService.java:726)
at com.myservice.mobile.message.group.deal.RPCGroupDealService$Processor$listDidByEqualsPoiidsAndDpStatus.getResult(RPCGroupDealService.java:715)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at com.myservice.mobile.mtthrift.proxy.ThriftServerPublisher$MtTProcessor.process(ThriftServerPublisher.java:416)
at com.myservice.mobile.mtthrift.server.netty.DefaultServerHandler.handleRequest(DefaultServerHandler.java:138)
at com.myservice.mobile.mtthrift.server.netty.DefaultServerHandler$1.run(DefaultServerHandler.java:106)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
When massive exceptions occurred suddenly, worker thread will blocked on the log4j2 class loader load the GeneratedMethodAccessor<\digit>.
Here is my worker thread stack locked on the method loadClass:
This issue is caused by the class loading that happens while formatting "extended stack traces", which appears as ThrowableProxy.toExtendedStackTrace in your example.
You can disable extended stack traces by adding alwaysWriteExceptions="false" to your PatternLayout (and then adding your own exception formatter, such as %ex, instead), e.g.:
<PatternLayout pattern="%d{ISO8601}{GMT} %m%n%ex" alwaysWriteExceptions="false"/>
I have verified that this fixes the problem for me.
Note that not only does this problem cause locking, it can also cause poor performance due to the JAR unzipping that happens inside e.g. Tomcat's classloader.

Karaf - exception when persisting a simple POJO

I am writing some code which I am deploying under Karaf. I am trying to save a simple POJO object into a table.
I am getting the exception below.
This reportRequestID is the PK field, I have it properly annotated, I think.
#Id
#GeneratedValue(strategy = GenerationType.AUTO)
#Column(name = "ReportRequestID", unique = true, nullable = false)
public Integer getReportRequestID() {
return reportRequestID;
}
public void setReportRequestID(Integer reportRequestID) {
this.reportRequestID = reportRequestID;
}
The DB table has no foreign keys. I am saying this since I see the stack trace has this ForeignKeys.isTransient which I find weird.
So I have no idea what is wrong here. I tried googling for this error, I find many hits, but I don't find anything which is really related to my use case.
javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.hibu.microservices.dataaccess.sql.bean.KeywordReportQueue.reportRequestID
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1187)
at com.hibu.microservices.dataaccess.sql.dao.KeywordReportQueueDao.insertCustomerGoogleReportRequest2(KeywordReportQueueDao.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
at com.hibu.microservices.dataaccess.sql.dao.$KeywordReportQueueDao1640762817.insertCustomerGoogleReportRequest2(Unknown Source)
at com.hibu.microservices.impl.customer.CustomerGenerateGoogleReportServiceImpl.requestReport(CustomerGenerateGoogleReportServiceImpl.java:31)
at com.hibu.microservices.impl.customer.CustomerGenerateGoogleReportServiceImpl.generateReport(CustomerGenerateGoogleReportServiceImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.hibu.microservices.dataaccess.sql.bean.KeywordReportQueue.reportRequestID
at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:192)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:346)
at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:4746)
at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:4465)
at org.hibernate.engine.internal.ForeignKeys.isTransient(ForeignKeys.java:243)
at org.hibernate.event.internal.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:511)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:116)
at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75)
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:811)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:784)
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:789)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181)
... 52 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException#6e91316a
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:169)
... 63 more
In my karaf.log file I am also seeing this.
java.lang.ClassNotFoundException: Unable to load class 'org.hibernate.proxy.HibernateProxy' because the bundle wiring for com.hibu.microservices.data-access is no longer valid.
I don't know if it's related or how to fix it.
I just solved this by changing the hibernate dialect value.
from
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
to
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServer2008Dialect"/>
Note that I am using SQL Server 2008 DB.

hibernate stream corrupted exception

In a spring mvc application using hibernate, I am getting a could not deserialize error when I change the FetchType to EAGER in a OneToMany relationship between two entities, Encounter and Referral. The error gets thrown whenever any data-driven url in my app gets called, even though I only changed the FetchType in one relationship.
Note: Some of the code for this posting has been placed at a file sharing site, which you can access by clicking the links below.
Also Note: I tried FetchType.Lazy, but that triggers errors relating to failing to lazily initiate... no session. So I need to use FetchType.EAGER.
The relevant property definition in Encounter is:
#OneToMany(fetch=FetchType.EAGER, cascade = CascadeType.ALL, mappedBy="encounter")
private Set<Referral> referrals = new HashSet<Referral>();
The entire code for the Encounter entity can be read at a file sharing site by clicking on this link.
The relevant property definition in Referral is:
#ManyToOne(fetch=FetchType.EAGER)
#JoinColumn(name="encounter_id")
protected Encounter encounter;
The entire code for the Referral entity can be read at a file sharing site by clicking on this link.
Here is the complete stack trace:
Hibernate: select referrals0_.encounter_id as encounte5_11_13_, referrals0_.id as id1_32_13_, referrals0_.id as id1_32_12_, referrals0_.contact_id as contact4_32_12_, referrals0_.scheduled_date as schedule2_32_12_, referrals0_.encounter_id as encounte5_32_12_, referrals0_.office_id as office6_32_12_, referrals0_.patient_id as patient7_32_12_, referrals0_.provider_id as provider8_32_12_, referrals0_.reason as reason3_32_12_, officecont1_.id as id1_17_0_, officecont1_.first_name as first2_17_0_, officecont1_.last_name as last3_17_0_, facilityad2_.id as id1_13_1_, facilityad2_.address as address2_13_1_, facilityad2_.city as city3_13_1_, facilityad2_.company_id as company7_13_1_, facilityad2_.facilityname as facility4_13_1_, facilityad2_.isHQ as isHQ5_13_1_, facilityad2_.type_id as type8_13_1_, facilityad2_.state_id as state9_13_1_, facilityad2_.zip as zip6_13_1_, providerco3_.id as id1_23_2_, providerco3_.name as name2_23_2_, locationty4_.id as id1_16_3_, locationty4_.name as name2_16_3_, state5_.id as id1_33_4_, state5_.name as name2_33_4_, patient6_.id as id1_21_5_, patient6_.first_name as first2_21_5_, patient6_.last_name as last3_21_5_, patient6_.date_of_birth as date4_21_5_, patient6_.ethnic_id as ethnic5_21_5_, patient6_.languagecode as language6_21_5_, patient6_.race_id as race7_21_5_, patient6_.sex_id as sex8_21_5_, ethnicity7_.id as id1_12_6_, ethnicity7_.name as name2_12_6_, language8_.code as code1_15_7_, language8_.name as name2_15_7_, race9_.id as id1_31_8_, race9_.name as name2_31_8_, gender10_.id as id1_14_9_, gender10_.name as name2_14_9_, provider11_.id as id1_30_10_, provider11_.first_name as first2_30_10_, provider11_.last_name as last3_30_10_, provider11_.title_id as title4_30_10_, providerti12_.id as id1_29_11_, providerti12_.name as name2_29_11_ from referrals referrals0_ left outer join officeContacts officecont1_ on referrals0_.contact_id=officecont1_.id left outer join facilityAddresses facilityad2_ on referrals0_.office_id=facilityad2_.id left outer join providerCompanies providerco3_ on facilityad2_.company_id=providerco3_.id left outer join locationTypes locationty4_ on facilityad2_.type_id=locationty4_.id left outer join states state5_ on facilityad2_.state_id=state5_.id left outer join patients patient6_ on referrals0_.patient_id=patient6_.id left outer join ethnicity ethnicity7_ on patient6_.ethnic_id=ethnicity7_.id left outer join languages language8_ on patient6_.languagecode=language8_.code left outer join race race9_ on patient6_.race_id=race9_.id left outer join gender gender10_ on patient6_.sex_id=gender10_.id left outer join providers provider11_ on referrals0_.provider_id=provider11_.id left outer join provider_titles providerti12_ on provider11_.title_id=providerti12_.id where referrals0_.encounter_id=?
WARN LoadContexts - HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext#48b9e55c<rs=com.mysql.jdbc.JDBC4ResultSet#757583b9>
WARN CollectionLoadContext - HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
WARN warn - Handler execution resulted in exception
org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:690) ~[spring-orm-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:106) ~[spring-orm-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:403) ~[spring-orm-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.samples.knowledgemanager.util.CallMonitoringAspect.invoke(CallMonitoringAspect.java:80) ~[CallMonitoringAspect.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at $Proxy39.findByLastName(Unknown Source) ~[na:na]
at org.springframework.samples.knowledgemanager.service.ClinicServiceImpl.findPatientByLastName(ClinicServiceImpl.java:104) ~[ClinicServiceImpl.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at $Proxy49.findPatientByLastName(Unknown Source) ~[na:na]
at org.springframework.samples.knowledgemanager.web.PatientController.processFindForm(PatientController.java:78) ~[PatientController.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) ~[spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686) ~[spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) ~[spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) [spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) [spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) [spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) [spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) [spring-webmvc-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42]
at com.github.dandelion.datatables.core.web.filter.DatatablesFilter.doFilter(DatatablesFilter.java:73) [datatables-core-0.9.2.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42]
at com.github.dandelion.datatables.extras.servlet2.filter.DatatablesFilter.doFilter(DatatablesFilter.java:71) [datatables-servlet2-0.9.2.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.42]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.42]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.42]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.42]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) [catalina.jar:7.0.42]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.42]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.42]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.42]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) [tomcat-coyote.jar:7.0.42]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) [tomcat-coyote.jar:7.0.42]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) [tomcat-coyote.jar:7.0.42]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_29]
Caused by: org.hibernate.type.SerializationException: could not deserialize
at org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:262) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.util.SerializationHelper.deserialize(SerializationHelper.java:306) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:140) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:121) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:44) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:67) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:332) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2912) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1672) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1604) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.getRow(Loader.java:1504) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:712) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.processResultSet(Loader.java:942) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:910) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.loadCollection(Loader.java:2234) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:65) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:674) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1849) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:681) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.engine.internal.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:1030) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:346) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2522) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2508) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2338) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.Loader.list(Loader.java:2333) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:490) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:264) ~[hibernate-entitymanager-4.2.1.Final.jar:4.2.1.Final]
at org.springframework.samples.knowledgemanager.repository.jpa.JpaPatientRepositoryImpl.findByLastName(JpaPatientRepositoryImpl.java:63) ~[JpaPatientRepositoryImpl.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) ~[spring-tx-3.2.5.RELEASE.jar:3.2.5.RELEASE]
... 77 common frames omitted
Caused by: java.io.StreamCorruptedException: invalid stream header: 32303134
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782) ~[na:1.6.0_29]
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279) ~[na:1.6.0_29]
at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:328) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:318) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
at org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:237) ~[hibernate-core-4.2.1.Final.jar:4.2.1.Final]
... 123 common frames omitted
The property date of type org.joda.time.LocalDate is probably the culprit. The Jadira usertype library can handle these types.
Add the library to your classpath and annotate the LocalDate field with:
#Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDate")

NullPointerException in getHibernateLazyInitializer of entity class

I'm experiencing the following exception:
java.lang.NullPointerException
at javassist.util.proxy.RuntimeSupport$DefaultMethodHandler.invoke(RuntimeSupport.java:38)
at com.Customer_$$_javassist_1.getHibernateLazyInitializer(Customer_$$_javassist_1.java)
at org.hibernate.Hibernate.isInitialized(Hibernate.java:429)
at org.hibernate.engine.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:530)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.reassociateIfUninitializedProxy(DefaultSaveOrUpdateEventListener.java:99)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:82)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:673)
at org.springframework.orm.hibernate3.HibernateTemplate$16.doInHibernate(HibernateTemplate.java:740)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737)
at com.HibernateCustomerService.create(HibernateCustomerService.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at sun.proxy.$Proxy62.create(Unknown Source)
This tends to happen shortly after application startup under moderate/high load. Further Instantiation of the com.Customer class fail with the same exception so the application is effectively broken until we restart.
I've traced through the code and can't see how the DefaultMethodHandler would ever be invoked in theCustomer_$$_javassist_1 since it's set in the JavassistLazyInitializer.
This is on Hibernate 3.6.8-Final with javassist 3.16.1
Has anyone seen this before? Is there any workaround possible?

could not initialize class org.apache.xerces.jaxp.datatype.xmlgregoriancalendar

I am using web services(a custom/tailor made service for the component) to send and receive information. The request is being formed properly and I am also getting a response. However, during the the mapping of the response to actual DTO, I am getting the following error:
could not initialize class org.apache.xerces.jaxp.datatype.xmlgregoriancalendar
There are some calednar date form in the response, but I am not sure, why it is not able to initialize xmlgregoriancalendar class. I run it on my local with stubs, and it give me no problems at all.
any adivse would be helpful...Thanks in advance
Complete Stack Trace is as follows:
FindOrderController :: Exception encountered :: OrderRef :: 1185130652 :: UserId :: null : com.bt.collaboration.order.web.controller.FindOrderController-(340)
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:144)
at $Proxy489.querySimplifiedOrder(Unknown Source)
at com.bt.collaboration.customer.client.mcso.McsoSyncPortClientImpl.findHeavyOrderByOrderRef(McsoSyncPortClientImpl.java:146)
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:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy490.findHeavyOrderByOrderRef(Unknown Source)
at com.bt.collaboration.customer.service.OrderServiceImpl.findHeavyOrderByOrderRef(OrderServiceImpl.java:65)
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:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bt.netc.frameworks.throttle.ThrottleInterceptorImpl.invoke(ThrottleInterceptorImpl.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy498.findHeavyOrderByOrderRef(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy498.findHeavyOrderByOrderRef(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy499.findHeavyOrderByOrderRef(Unknown Source)
at com.bt.collaboration.order.web.controller.FindOrderController.handleRequestInternal(FindOrderController.java:255)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.java:83)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.bt.collaboration.order.web.filter.PropertySetupFilter.doFilter(PropertySetupFilter.java:36)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:771)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:190)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2177)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2057)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1982)
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
... 83 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl
at org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:583)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:662)
at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247)
at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:515)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:339)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:217)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:186)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:368)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:347)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:749)
... 102 more
I also got this error: NoClassDefFoundError: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl
Here is how I fixed it. Add in weblogic.xml this line:
{prefer-web-inf-classes}true{/prefer-web-inf-classes}
By default it's false.
This fix tells me there are jar version conflicts. But I have no idea exactly which jars in what folder that cause the conflicts.

Categories