我的prod服务器出现以下错误:
java.lang.NullPointerException
at org.objectweb.jonas.dbm.JManagedConnection.prepareStatement(JManagedConnection.java:616)
at org.objectweb.jonas.dbm.JManagedConnection.prepareStatement(JManagedConnection.java:628)
at org.objectweb.jonas.dbm.JConnection.prepareStatement(JConnection.java:101)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:257)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:232)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:779)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:265)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3613)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
at ft.remu.persistence.dao.impl.ICDAOImpl.getListeLignesPaiementDTOForICTraitee(ICDAOImpl.java:386)
at ft.remu.persistence.dao.impl.ICDAOImpl.getLignesPaiementForICTraitee(ICDAOImpl.java:450)
at ft.remu.persistence.dao.impl.ICDAOImpl.getLignesPaiementForICTraitee(ICDAOImpl.java:494)
at ft.remu.metier.moteur.AbstractCalculateurPeriodiqueEngine.traiterAnnulationIC(AbstractCalculateurPeriodiqueEngine.java:63)
at ft.remu.metier.moteur.RegleEngine.traiterAnnulationIC(RegleEngine.java:70)
at ft.remu.metier.manager.BatchManager.traiterAnnulations(BatchManager.java:264)
at ft.remu.metier.ejb.BatchServiceBean.traiterAnnulations(BatchServiceBean.java:105)
at org.objectweb.jonas_gen.ft.remu.metier.ejb.JOnASBatchService_468238783Remote.traiterAnnulations(JOnASBatchService_468238783Remote.java:63)
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:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.dispatch(JUnicastServerRef.java:143)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
我认为导致此问题的代码是:
critLP = session.createCriteria(PaymentPOJO.class)
.add(Expression.eq("idC", idC))
.add(Expression.eq("idMIL", idMIL))
.add(Expression.sql("{alias}.ELP_STATUS <> ? ", new Integer(40), Hibernate.INTEGER));
List listPaymentPOJO = criteria.list();
我在本地计算机上复制了部分数据并运行了相同的代码,但执行时没有任何错误 知道我应该在哪里解决这个问题吗? 这不是另一个问题的重复。