0

参照サーバーでのみ発生する奇妙な問題があり、ローカル環境で同じコードが期待どおりに機能します。いくつかのレコードを読み取った後、バッチ更新を実行しようとしています。

私が書いたJAVAコードは

public OrderDTO findRecurringOrder(Integer userId, Integer itemId) {
        Criteria criteria = getSession().createCriteria(OrderDTO.class)
                .createAlias("orderStatus", "s")
                .add(Restrictions.eq("s.id", Constants.ORDER_STATUS_ACTIVE))
                .add(Restrictions.eq("deleted", 0))
                .createAlias("baseUserByUserId", "u")
                .add(Restrictions.eq("u.id", userId))
                .createAlias("orderPeriod", "p")
                .add(Restrictions.ne("p.id", Constants.ORDER_PERIOD_ONCE))
                .createAlias("lines", "l")
                .createAlias("l.item", "i")
                .add(Restrictions.eq("i.id", itemId))
                .addOrder(Order.desc("id"))
                .setMaxResults(1);

        return findFirst(criteria);
    }

public T findFirst(Criteria criteria) {
        criteria.setFirstResult(0).setMaxResults(1);
        return (T) criteria.uniqueResult();

    }

私が得ているエラースタックトレースは次のとおりです。

groovy.lang.MissingMethodException: No signature of method: com.sapienter.jbilling.server.order.db.OrderLineDTO.validate() is applicable for argument types: (java.util.LinkedHashMap) values: [[deepValidate:false]] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.grails.orm.hibernate.support.ClosureEventTriggeringInterceptor.onPreUpdate(ClosureEventTriggeringInterceptor.groovy:168) at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:237) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:88) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328) at com.sapienter.jbilling.server.util.db.AbstractDAS.findFirst(AbstractDAS.java:212) at com.sapienter.jbilling.server.order.db.OrderDAS.findRecurringOrder(OrderDAS.java:88) at com.sapienter.jbilling.server.mediation.task.SubscriptionEventProcessor.doEventAction(SubscriptionEventProcessor.java:134) at com.sapienter.jbilling.server.mediation.task.AbstractResolverMediationTask.resolve(AbstractResolverMediationTask.java:126) at com.sapienter.jbilling.server.mediation.task.AbstractResolverMediationTask.process(AbstractResolverMediationTask.java:93) at com.sapienter.jbilling.server.mediation.MediationSessionBean.normalizeRecordGroup(MediationSessionBean.java:476) 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:309) 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 $Proxy75.normalizeRecordGroup(Unknown Source) at com.sapienter.jbilling.server.mediation.MediationSessionBean.performMediation(MediationSessionBean.java:232) 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:309) 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 $Proxy75.performMediation(Unknown Source) at com.sapienter.jbilling.server.mediation.MediationSessionBean$1.run(MediationSessionBean.java:182) at java.lang.Thread.run(Thread.java:662)

この Hibernate の例外について、私は本当にほとんど何も考えていませんか?

4

1 に答える 1

0

Hibernateエラーのようには見えません。最初の行を見てください:

groovy.lang.MissingMethodException: No signature of method: com.sapienter.jbilling.server.order.db.OrderLineDTO.validate() is applicable for argument types: (java.util.LinkedHashMap) values: [[deepValidate:false]]

どうやらどこか別の場所で、 OrderLineDTOタイプのオブジェクトでvalidate()を呼び出し、渡す必要があるのは(deepValidate:false)だけのときにマップ([deepValidate:false])を渡すことです。ここで確認できる検証のその他の使用法があります。

于 2012-07-06T17:21:01.150 に答える