In our java application We have got an exception like
ERROR net.acs.sdd.pkop.bo.TreatmentMessageDispatcher - could not execute query
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:88)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:65)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:64)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:68)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:145)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.findProcessDefinitionByKey(RepositorySessionImpl.java:143)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:57)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:37)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInExistingTx(JtaTransactionInterceptor.java:65)
at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:51)
at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithoutRetry(JtaRetryInterceptor.java:56)
at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:48)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:78)
at net.acs.sdd.scvv.bo.BaseBusinessProcessor.startProcess(BaseBusinessProcessor.java:209)
at net.acs.sdd.scvv.bo.BaseBusinessProcessor.startProcess(BaseBusinessProcessor.java:203)
at net.acs.sdd.scvv.bo.command.StartProcessCommand.execute(StartProcessCommand.java:25)
at net.acs.sdd.pkop.bo.command.GnivcRtuDecisionCommand.execute(GnivcRtuDecisionCommand.java:49)
at net.acs.sdd.scvv.bo.MessageDispatcher.processInputMessageObject(MessageDispatcher.java:175)
at net.acs.sdd.scvv.bo.MessageDispatcher.processInputMessage(MessageDispatcher.java:130)
at net.acs.sdd.scvv.bo.MessageDispatcher.processInputMessage(MessageDispatcher.java:101)
at net.acs.sdd.scvv.bo.RollbackMessageDispatcher.processInputMessage(RollbackMessageDispatcher.java:55)
at net.acs.sdd.scvv.transport.BaseMessageReceiver.processInputMessage(BaseMessageReceiver.java:66)
at net.acs.sdd.scvv.transport.SCVVMessageReceiver.onMessageInternal(SCVVMessageReceiver.java:135)
at net.acs.sdd.scvv.transport.BaseMessageReceiver.onMessage(BaseMessageReceiver.java:39)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
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: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 $Proxy10.onMessage(Unknown Source)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1096)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1088)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:985)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: javax.resource.ResourceException: SystemException: Failed to add the resource due to error in the resource : oracle.jdbc.xa.OracleXAException errorcode : -7
at oracle.oc4j.sql.spi.ManagedConnectionImpl.setupTransaction(ManagedConnectionImpl.java:841)
at oracle.oc4j.sql.spi.ConnectionHandle.oc4j_intercept(ConnectionHandle.java:305)
at oracle_jdbc_driver_LogicalConnection_Proxy.prepareStatement()
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
... 54 more
Caused by: javax.resource.ResourceException: SystemException: Failed to add the resource due to error in the resource : oracle.jdbc.xa.OracleXAException errorcode : -7
at com.evermind.server.connector.ConnectionContext.setupForJTATransaction(ConnectionContext.java:378)
at com.evermind.server.connector.ConnectionContext.setupForTransaction(ConnectionContext.java:303)
at com.evermind.server.connector.ConnectionContext.setupForTransaction(ConnectionContext.java:288)
at com.evermind.server.connector.ApplicationConnectionManager.lazyEnlist(ApplicationConnectionManager.java:2149)
at oracle.j2ee.connector.OracleConnectionManager.lazyEnlist(OracleConnectionManager.java:312)
at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.enlist(ManagedConnectionFactoryImpl.java:532)
at oracle.oc4j.sql.spi.ManagedConnectionImpl.setupTransaction(ManagedConnectionImpl.java:839)
... 63 more
And I don't know how to find any connection with that 'errorcode : -7'
I went into OracleXAException to find, at least some decription. And there is
public static final int XA_HEURCOM = 7;
and if I found correct this is description of my error.
But it doesn't help me.
Which way should I follow to find the root of that exception, Could some help me with that?
P.S.
And, also I want to add, that we have working application.That exception happened in the middle of a day and after that were also about 10 exceptions like that but after them there were not exceptions in log.
Related
I have got a strange problem with Adobe CQ5 versioning.
I'm doing two different operations(one is adding and the other updates) using the same user login.
28.07.2017 06:30:52.846 *ERROR* [Response--12] [publishing.create.commentary.PSI43457815.int-emp] com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl Update publication failed com.ubs.f35.content.sdk.data.DaoException: com.day.cq.wcm.api.WCMException: Unable to create version.
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl.updatePublication(PublicationDaoImpl.java:208)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl$$FastClassByCGLIB$$b8ac430f.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.ubs.f35.content.cms.common.aop.StopwatchMethodInterceptor.invoke(StopwatchMethodInterceptor.java:21)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.executeMethod(SessionRequiredInterceptor.java:106)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.invoke(SessionRequiredInterceptor.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl$$EnhancerByCGLIB$$d66ec20a.updatePublication(<generated>)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.unpermissionedUpdatePublicationInternal(PublicationServiceImpl.java:345)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.updatePublicationInternal(PublicationServiceImpl.java:322)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.updateSalesCommentary(PublicationServiceImpl.java:226)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl$$FastClassByCGLIB$$7c3b2aad.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.ubs.f35.content.cms.common.aop.StopwatchMethodInterceptor.invoke(StopwatchMethodInterceptor.java:21)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.executeMethod(SessionRequiredInterceptor.java:106)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.invoke(SessionRequiredInterceptor.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl$$EnhancerByCGLIB$$449170e6.updateSalesCommentary(<generated>)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor.updatePublication(PublishPublicationMessageProcessor.java:92)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor.handleObject(PublishPublicationMessageProcessor.java:44)
at com.ubs.f35.content.messaging.AbstractMessageProcessor.invoke(AbstractMessageProcessor.java:61)
at com.ubs.f35.content.messaging.AbstractMessageProcessor$$FastClassByCGLIB$$6f62e747.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor$$EnhancerByCGLIB$$c3ef3346.invoke(<generated>)
at com.ubs.f35.common.transport.events.lbm.ReceiveReplyCallbackHandler.processMessage(ReceiveReplyCallbackHandler.java:119)
at com.ubs.f35.common.transport.events.threadpool.ThreadPoolReceiveReplyCallbackHandler.access$001(ThreadPoolReceiveReplyCallbackHandler.java:11)
at com.ubs.f35.common.transport.events.threadpool.ThreadPoolReceiveReplyCallbackHandler$1.run(ThreadPoolReceiveReplyCallbackHandler.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1027)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationTemplate.createRevision(PublicationTemplate.java:410)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl.updatePublication(PublicationDaoImpl.java:205)
... 38 more
Caused by: javax.jcr.RepositoryException: org.apache.jackrabbit.core.state.StaleItemStateException: 124a7e07-1345-4bf7-81d2-c3c625ed62bc/{http://www.jcp.org/jcr/1.0}isCheckedOut has been modified externally
at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerImplBase.java:218)
at org.apache.jackrabbit.core.VersionManagerImpl.access$300(VersionManagerImpl.java:73)
at org.apache.jackrabbit.core.VersionManagerImpl$2.perform(VersionManagerImpl.java:142)
at org.apache.jackrabbit.core.VersionManagerImpl$2.perform(VersionManagerImpl.java:135)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96)
at org.apache.jackrabbit.core.VersionManagerImpl.checkout(VersionManagerImpl.java:135)
at org.apache.jackrabbit.core.NodeImpl.checkout(NodeImpl.java:2875)
at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1094)
... 41 more
Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 124a7e07-1345-4bf7-81d2-c3c625ed62bc/{http://www.jcp.org/jcr/1.0}isCheckedOut has been modified externally
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:670)
at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1473)
at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1503)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:398)
at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:373)
at org.apache.jackrabbit.core.version.VersionManagerImplBase$WriteOperation.save(VersionManagerImplBase.java:469)
at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerImplBase.java:215)
... 49 more
28.07.2017 06:30:52.846 *DEBUG* [Response--12] [STOPWATCH] com.ubs.f35.content.cms.common.aop.StopwatchMethodInterceptor PublicationServiceImpl.updateSalesCommentary=14m 27s
28.07.2017 06:30:52.847 *DEBUG* [Response--12] [null] com.ubs.f35.content.sdk.session.SessionRequiredInterceptor Ending transaction
28.07.2017 06:30:52.847 *ERROR* [Response--12] [null] com.ubs.f35.content.messaging.AbstractMessageProcessor 612ed2de-e27b-4f21-9039-46c40435a469 Invoke failed with code: SERVICE_ERROR com.ubs.f35.content.messaging.service.ServiceException: Update publication failed
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.unpermissionedUpdatePublicationInternal(PublicationServiceImpl.java:353)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.updatePublicationInternal(PublicationServiceImpl.java:322)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.updateSalesCommentary(PublicationServiceImpl.java:226)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl$$FastClassByCGLIB$$7c3b2aad.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.ubs.f35.content.cms.common.aop.StopwatchMethodInterceptor.invoke(StopwatchMethodInterceptor.java:21)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.executeMethod(SessionRequiredInterceptor.java:106)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.invoke(SessionRequiredInterceptor.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl$$EnhancerByCGLIB$$449170e6.updateSalesCommentary(<generated>)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor.updatePublication(PublishPublicationMessageProcessor.java:92)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor.handleObject(PublishPublicationMessageProcessor.java:44)
at com.ubs.f35.content.messaging.AbstractMessageProcessor.invoke(AbstractMessageProcessor.java:61)
at com.ubs.f35.content.messaging.AbstractMessageProcessor$$FastClassByCGLIB$$6f62e747.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617)
at com.ubs.f35.content.cms.publishing.internal.messaging.publication.PublishPublicationMessageProcessor$$EnhancerByCGLIB$$c3ef3346.invoke(<generated>)
at com.ubs.f35.common.transport.events.lbm.ReceiveReplyCallbackHandler.processMessage(ReceiveReplyCallbackHandler.java:119)
at com.ubs.f35.common.transport.events.threadpool.ThreadPoolReceiveReplyCallbackHandler.access$001(ThreadPoolReceiveReplyCallbackHandler.java:11)
at com.ubs.f35.common.transport.events.threadpool.ThreadPoolReceiveReplyCallbackHandler$1.run(ThreadPoolReceiveReplyCallbackHandler.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ubs.f35.content.sdk.data.DaoException: com.day.cq.wcm.api.WCMException: Unable to create version.
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl.updatePublication(PublicationDaoImpl.java:208)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl$$FastClassByCGLIB$$b8ac430f.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.ubs.f35.content.cms.common.aop.StopwatchMethodInterceptor.invoke(StopwatchMethodInterceptor.java:21)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.executeMethod(SessionRequiredInterceptor.java:106)
at com.ubs.f35.content.sdk.session.SessionRequiredInterceptor.invoke(SessionRequiredInterceptor.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl$$EnhancerByCGLIB$$d66ec20a.updatePublication(<generated>)
at com.ubs.f35.content.cms.publishing.internal.service.PublicationServiceImpl.unpermissionedUpdatePublicationInternal(PublicationServiceImpl.java:345)
... 26 more
Caused by: com.day.cq.wcm.api.WCMException: Unable to create version.
at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1145)
at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1027)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationTemplate.createRevision(PublicationTemplate.java:410)
at com.ubs.f35.content.cms.publishing.internal.dao.publication.PublicationDaoImpl.updatePublication(PublicationDaoImpl.java:205)
... 38 more
Caused by: javax.jcr.RepositoryException: org.apache.jackrabbit.core.state.StaleItemStateException: 124a7e07-1345-4bf7-81d2-c3c625ed62bc/{http://www.jcp.org/jcr/1.0}isCheckedOut has been modified externally
at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerImplBase.java:218)
at org.apache.jackrabbit.core.VersionManagerImpl.access$300(VersionManagerImpl.java:73)
at org.apache.jackrabbit.core.VersionManagerImpl$2.perform(VersionManagerImpl.java:142)
at org.apache.jackrabbit.core.VersionManagerImpl$2.perform(VersionManagerImpl.java:135)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96)
at org.apache.jackrabbit.core.VersionManagerImpl.checkout(VersionManagerImpl.java:135)
at org.apache.jackrabbit.core.NodeImpl.checkout(NodeImpl.java:2875)
at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1094)
... 41 more
Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 124a7e07-1345-4bf7-81d2-c3c625ed62bc/{http://www.jcp.org/jcr/1.0}isCheckedOut has been modified externally
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:670)
at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1473)
at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1503)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:398)
at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:373)
at org.apache.jackrabbit.core.version.VersionManagerImplBase$WriteOperation.save(VersionManagerImplBase.java:469)
at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerImplBase.java:215)
... 49 more
I believe that concurrent access might be the issue as the user is trying to update before the add operation even succeeds(we have got a pipeline that does the job of saving under the hood,but to the user, we show that the add operation is successful beforehand). We've also implemented thread locking mechanism so that only one operation(add/update) can be allowed at a time.
As a workaround, we've also tried to refresh the JCR session for the user using session.refresh method so that the state of the item can be updated before saving.
But nothing seems to be working.
Any help will be highly appreciated.
I'm working on a JavaEE application where I have the following entity:
#Entity
public class EncMedicamento implements Serializable {
#Id
#GeneratedValue
private int cod_encomenda;
private Medicamento med;
private int unidades;
#Temporal(TemporalType.DATE)
private GregorianCalendar data_prevista;
#Temporal(TemporalType.DATE)
private GregorianCalendar data_encomenda;
}
When I try to make this query:
select e from EncMedicamento e where e.med like :m
An error occurs. Here is the complete stacktrace:
Exception in thread "main" javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
at com.sun.proxy.$Proxy235.criar_encomenda_medicamento(Unknown Source)
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:483)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:143)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:173)
at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatchToServant(ServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:199)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequestRequest(MessageMediatorImpl.java:1549)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:1425)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleInput(MessageMediatorImpl.java:930)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:213)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:694)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.dispatch(MessageMediatorImpl.java:496)
at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.doWork(MessageMediatorImpl.java:2222)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "LIKE" at line 1, column 146.
Error Code: 30000
Call: SELECT t1.COD_ENCOMENDA, t1.DATA_ENCOMENDA, t1.DATA_PREVISTA, t1.UNIDADES, t1.MED_COD_MEDICAMENTO FROM MEDICAMENTO t0, ENCMEDICAMENTO t1 WHERE ( LIKE ? AND (t0.COD_MEDICAMENTO = t1.MED_COD_MEDICAMENTO))
bind => [1 parameter bound]
Query: ReadAllQuery(referenceClass=EncMedicamento sql="SELECT t1.COD_ENCOMENDA, t1.DATA_ENCOMENDA, t1.DATA_PREVISTA, t1.UNIDADES, t1.MED_COD_MEDICAMENTO FROM MEDICAMENTO t0, ENCMEDICAMENTO t1 WHERE ( LIKE ? AND (t0.COD_MEDICAMENTO = t1.MED_COD_MEDICAMENTO))")
at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:378)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469)
at Sessions.HospitalManagement.criar_encomenda_medicamento(HospitalManagement.java:812)
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:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
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:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
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:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:205)
... 19 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "LIKE" at line 1, column 146.
Error Code: 30000
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:682)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
... 52 more
Caused by: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "LIKE" at line 1, column 146.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:586)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:255)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareCachedStatement(ConnectionWrapper40.java:52)
at com.sun.gjc.spi.ManagedConnectionImpl.prepareCachedStatement(ManagedConnectionImpl.java:992)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.prepareStatement(ConnectionWrapper40.java:173)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1556)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1505)
at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:778)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:619)
... 72 more
Caused by: org.apache.derby.client.am.SqlException: Syntax error: Encountered "LIKE" at line 1, column 146.
at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
... 82 more
Can please someone help me find the error in my query?
Following is what the spec says the JPQL LIKE expression should look like -
string_expression [NOT] LIKE pattern_value [ESCAPE escape_character]
I believe, the parse failure is because e.med in your query is not an string expression, but a path expression with resulting type - Medicamento.
What you could try instead is - where e.med.theFieldToCompare like :m (assuming that an association to Medicamento exist).
When generating the reports using the DynamicJasper API, the below exception is getting thrown. In my logic, around 5000 to 10000 reports will be generating in single execution.
Due to this exception, the report generation exception is totally blocked. Please suggest how to fix this solution without increasing the ulimit option as we can not increase depends on the no.of reports.
net.sf.jasperreports.engine.JRException: Error compiling report java source files : /home/gscsfo/Report_1409558503418_133890.java
com.bnp.scm.services.common.exception.BNPApplicationException: net.sf.jasperreports.engine.JRException: Error compiling report java source files : /home/gscsfo/Report_1409558503418_133890.java
at com.bnp.scm.services.scheduler.common.SystemLogger.profile(SystemLogger.java:54)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.bnp.scm.services.scheduler.events.EmailAlertAttachment$$EnhancerByCGLIB$$3c6f687d.getPDFAttachment(<generated>)
at com.bnp.scm.services.scheduler.events.ScheduleEmailEvent.processEvent(ScheduleEmailEvent.java:1039)
at com.bnp.scm.services.scheduler.events.ScheduleEmailEvent$$FastClassByCGLIB$$84dbc7ef.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.bnp.scm.services.scheduler.common.SystemLogger.profile(SystemLogger.java:54)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.bnp.scm.services.scheduler.events.ScheduleEmailEvent$$EnhancerByCGLIB$$f22c0d43.processEvent(<generated>)
at com.bnp.scm.scheduler.job.handler.EmailNotificationJob.run(EmailNotificationJob.java:52)
at com.bnp.scm.scheduler.job.AbstractJob.execute(AbstractJob.java:79)
at com.bnp.scm.scheduler.job.AbstractJob$$FastClassByCGLIB$$d1c345af.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.bnp.scm.services.scheduler.common.SystemLogger.profile(SystemLogger.java:54)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at com.bnp.scm.scheduler.job.handler.EmailNotificationJob$$EnhancerByCGLIB$$b1534990.execute(<generated>)
at org.quartz.core.JobRunShell.run(JobRunShell.java:206)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)
Caused by: net.sf.dynamicreports.report.exception.DRException: net.sf.jasperreports.engine.JRException: Error compiling report java source files : /home/gscsfo/Report_1409558503418_133890.java
at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:279)
at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperPrint(JasperReportBuilder.java:309)
at com.bnp.scm.services.scheduler.events.EmailAlertAttachment.getPDFAttachment(EmailAlertAttachment.java:183)
... 56 more
Caused by: net.sf.jasperreports.engine.JRException: Error compiling report java source files : /home/gscsfo/Report_1409558503418_133890.java
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:89)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:63)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:188)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)
at net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toJasperReport(JasperReportBuilder.java:276)
... 58 more
Caused by: java.io.IOException: Cannot run program "javac": java.io.IOException: error=24, Too many open files
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:58)
... 62 more
Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 65 more
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?
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.