问题描述
我在下面有一个类,我从数据库加载这个对象,但是当我用JNDI地址调用这个方法时,给出一些有关 java.util.List 的kullainiciGrups属性的错误,if这个属性被删除,它毫无例外地工作。堆栈跟踪位于代码块的下面;
您对这个persistenceBag异常有什么看法?
谢谢。
package enlil.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/ **
* PACS00_001数据库表的持久类。
*
* /
@Entity
@Table(name =PACS00_001)
public class Kullanici实现Serializable {
private static final long serialVersionUID = 1L;
@Column(name =A_ACIKLAMAYETKI)
private BigDecimal aAciklamayetki;
@Column(name =A_ADI)
private String aAdi;
@Lob()
@Column(name =A_AYARLAR)
private String aAyarlar;
@Column(name =A_HBYSDOKKOD)
private String aHbysdokkod;
@Column(name =A_HBYSUSERKOD)
private String aHbysuserkod;
@Column(name =A_IPUCU)
private String aIpucu;
@Id
@Column(name =A_KODU)
private String aKodu;
@Column(name =A_MENUTARAMARAPORLARIYETKI)
private BigDecimal aMenutaramaraporlariyetki;
@Column(name =A_PAROLA)
private String aParola;
@Column(name =A_SOYADI)
私人字符串aSoyadi;
@Column(name =A_YETKITUR)
private BigDecimal aYetkitur;
@Temporal(TemporalType.DATE)
@Column(name =T_ISLEMTAR)
私人日期tIslemtar;
@Column(name =T_USERID)
private String tUserid;
//双向多到一个关联到KullaniciGrup
@OneToMany(的mappedBy = kullaniciGruplari,取= FetchType.LAZY)
私人列表与LT; KullaniciGrup> kullaniciGrups;
public Kullanici(){
}
public BigDecimal getAAciklamayetki(){
return this.aAciklamayetki;
}
public void setAAciklamayetki(BigDecimal aAciklamayetki){
this.aAciklamayetki = aAciklamayetki;
}
public String getAAdi(){
return this.aAdi;
}
public void setAAdi(String aAdi){
this.aAdi = aAdi;
}
public String getAAyarlar(){
return this.aAyarlar;
}
public void setAAyarlar(String aAararlar){
this.aAyarlar = aAararlar;
}
public String getAHbysdokkod(){
return this.aHbysdokkod;
}
public void setAHbysdokkod(String aHbysdokkod){
this.aHbysdokkod = aHbysdokkod;
}
public String getAHbysuserkod(){
return this.aHbysuserkod;
}
public void setAHbysuserkod(String aHbysuserkod){
this.aHbysuserkod = aHbysuserkod;
}
public String getAIpucu(){
return this.aIpucu;
}
public void setAIpucu(String aIpucu){
this.aIpucu = aIpucu;
}
public String getAKodu(){
return this.aKodu;
}
public void setAKodu(String aKodu){
this.aKodu = aKodu;
}
public BigDecimal getAMenutaramaraporlariyetki(){
return this.aMenutaramaraporlariyetki;
}
public void setAMenutaramaraporlariyetki(BigDecimal aMenutaramaraporlariyetki){
this.aMenutaramaraporlariyetki = aMenutaramaraporlariyetki;
}
public String getAParola(){
return this.aParola;
}
public void setAParola(String aParola){
this.aParola = aParola;
}
public String getASoyadi(){
return this.aSoyadi;
}
public void setASoyadi(String aSoyadi){
this.aSoyadi = aSoyadi;
}
public BigDecimal getAYetkitur(){
return this.aYetkitur;
}
public void setAYetkitur(BigDecimal aYetkitur){
this.aYetkitur = aYetkitur;
}
public Date getTIslemtar(){
return this.tIslemtar;
}
public void setTIslemtar(Date tIslemtar){
this.tIslemtar = tIslemtar;
}
public String getTUserid(){
return this.tUserid;
}
public void setTUserid(String tUserid){
this.tUserid = tUserid;
$ b / **
* @param kullanici将kullaniciGrups设置为设置
* /
public void setKullaniciGrups(List< KullaniciGrup> kullaniciGrups){
this.kullaniciGrups = kullaniciGrups;
}
/ **
* @返回kullaniciGrups
* /
public List< KullaniciGrup> getKullaniciGrups(){
返回kullaniciGrups;
}
}
堆栈跟踪;
2010-12-10T10:46:42.181 + 0200 | WARNING | sun-appserver2.1 | javax.enterprise.resource.corba.ee。 S1AS-ORB.rpc.encoding | _ThreadID = 18; _ThreadName = httpSSLWorkerThread-8080-1; org.hibernate.collection.PersistentBag;<<上下文:读写器[值(enlil.domain.Kullanici)〕:enlil.domain。 Kullanici.kullaniciGrups>> ;; _ RequestID = 1c9792ff-406f-44d0-8315-0d9260807842; |IOP00810257:(MARSHAL)无法加载类org.hibernate.collection.PersistentBag<<<<<> ReaderWriter< enlil.domain。 Kullanici)〕:enlil.domain.Kullanici.kullaniciGrups>>中
org.omg.CORBA.MARSHAL:vmcid:SUN次要代码:257已完成:也许
在com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9772)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9787)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java :1042)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField (IIOPInputStream.java:2009)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2240)
at com.sun.corba.ee.impl.io .IIOPInputStream.inputObject(IIOPInputStream.java:1224)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:427)
at com.sun.corba.ee .impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0。 java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream。 read_value(CDRInputStream.java:475)
在com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl $ 14.read(DynamicMethodMarshallerImpl.java:382)
在com.sun.corba.ee .impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:483)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:195)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke( BCELStubBase.ja VA:在enlil.pacs.kullanici._IKullaniciFayda_Wrapper.oturumAcanKullaniciyiGetir 225)
。在enlil.pacs.kullanici .__ IKullaniciFayda_Remote_DynamicStub.oturumAcanKullaniciyiGetir(恩利尔/ PACS / kullanici / __ IKullaniciFayda_Remote_DynamicStub.java)
(恩利尔/ PACS / kullanici / _IKullaniciFayda_Wrapper.java)
在enlil.pacs.server.modul.KullaniciYonetimiServlet.kullaniciYetkileriniGetir(KullaniciYonetimiServlet.java:70)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
在阳光下。 reflection.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java: 597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall( RemoteServiceServlet.java:207)
,位于com.google.gwt.user.server.rpc.RemoteS erviceServlet.processPost(RemoteServiceServlet.java:243)
位于com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
位于javax.servlet.http.HttpServlet。服务(HttpServlet.java:754)
位于javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
位于org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java: 427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at enlil.pacs.server.guvenlik.SistemeGirisFiltresi.doFilter(SistemeGirisFiltresi.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.St andardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:218)
在org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
在org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java: 593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)$ b在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
$ b在org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
。在组织.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
在org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org。 apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
处org.apache.catalina org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
。 core.StandardPipeline.invoke(StandardPipeline.java:587)
处org.apache.coyote.tomcat5.CoyoteAdapter org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
。 service(CoyoteAdapter.java:291)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
at com.sun.enterprise.web.connector。 grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
at com.sun.enterprise。我们b.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com。 sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
在com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
您正在发送一个hibernate实体/集合。有几个问题:
- 集合可能未加载
- 端点可能没有因此在发送它之前,你应该初始化集合并取消它的代理(即获得原始集合)。这可能仍然不起作用,因为hibernate会设置自己的集合来实现
java.util.List
。所以从那里你有两个选择:
$ b $ ul
- create
new ArrayList(originalCollection)
- 这会将元素复制到端点的类路径中的ArrayList
- 添加hibernate中。
I have a class below and I load this object from the DB but when I call this method through with JNDI address, give some error about kullainiciGrups attribute which is a java.util.List, if this attribute removed, it works without exception. Stack trace is below the code block;
What do you think about this persistenceBag exception?Thanks.
package enlil.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* The persistent class for the PACS00_001 database table.
*
*/
@Entity
@Table(name="PACS00_001")
public class Kullanici implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name="A_ACIKLAMAYETKI")
private BigDecimal aAciklamayetki;
@Column(name="A_ADI")
private String aAdi;
@Lob()
@Column(name="A_AYARLAR")
private String aAyarlar;
@Column(name="A_HBYSDOKKOD")
private String aHbysdokkod;
@Column(name="A_HBYSUSERKOD")
private String aHbysuserkod;
@Column(name="A_IPUCU")
private String aIpucu;
@Id
@Column(name="A_KODU")
private String aKodu;
@Column(name="A_MENUTARAMARAPORLARIYETKI")
private BigDecimal aMenutaramaraporlariyetki;
@Column(name="A_PAROLA")
private String aParola;
@Column(name="A_SOYADI")
private String aSoyadi;
@Column(name="A_YETKITUR")
private BigDecimal aYetkitur;
@Temporal( TemporalType.DATE)
@Column(name="T_ISLEMTAR")
private Date tIslemtar;
@Column(name="T_USERID")
private String tUserid;
//bi-directional many-to-one association to KullaniciGrup
@OneToMany(mappedBy="kullaniciGruplari", fetch = FetchType.LAZY)
private List<KullaniciGrup> kullaniciGrups;
public Kullanici() {
}
public BigDecimal getAAciklamayetki() {
return this.aAciklamayetki;
}
public void setAAciklamayetki(BigDecimal aAciklamayetki) {
this.aAciklamayetki = aAciklamayetki;
}
public String getAAdi() {
return this.aAdi;
}
public void setAAdi(String aAdi) {
this.aAdi = aAdi;
}
public String getAAyarlar() {
return this.aAyarlar;
}
public void setAAyarlar(String aAyarlar) {
this.aAyarlar = aAyarlar;
}
public String getAHbysdokkod() {
return this.aHbysdokkod;
}
public void setAHbysdokkod(String aHbysdokkod) {
this.aHbysdokkod = aHbysdokkod;
}
public String getAHbysuserkod() {
return this.aHbysuserkod;
}
public void setAHbysuserkod(String aHbysuserkod) {
this.aHbysuserkod = aHbysuserkod;
}
public String getAIpucu() {
return this.aIpucu;
}
public void setAIpucu(String aIpucu) {
this.aIpucu = aIpucu;
}
public String getAKodu() {
return this.aKodu;
}
public void setAKodu(String aKodu) {
this.aKodu = aKodu;
}
public BigDecimal getAMenutaramaraporlariyetki() {
return this.aMenutaramaraporlariyetki;
}
public void setAMenutaramaraporlariyetki(BigDecimal aMenutaramaraporlariyetki) {
this.aMenutaramaraporlariyetki = aMenutaramaraporlariyetki;
}
public String getAParola() {
return this.aParola;
}
public void setAParola(String aParola) {
this.aParola = aParola;
}
public String getASoyadi() {
return this.aSoyadi;
}
public void setASoyadi(String aSoyadi) {
this.aSoyadi = aSoyadi;
}
public BigDecimal getAYetkitur() {
return this.aYetkitur;
}
public void setAYetkitur(BigDecimal aYetkitur) {
this.aYetkitur = aYetkitur;
}
public Date getTIslemtar() {
return this.tIslemtar;
}
public void setTIslemtar(Date tIslemtar) {
this.tIslemtar = tIslemtar;
}
public String getTUserid() {
return this.tUserid;
}
public void setTUserid(String tUserid) {
this.tUserid = tUserid;
}
/**
* @param kullaniciGrups the kullaniciGrups to set
*/
public void setKullaniciGrups(List<KullaniciGrup> kullaniciGrups) {
this.kullaniciGrups = kullaniciGrups;
}
/**
* @return the kullaniciGrups
*/
public List<KullaniciGrup> getKullaniciGrups() {
return kullaniciGrups;
}
}
Stack Trace;
2010-12-10T10:46:42.181+0200|WARNING|sun-appserver2.1|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.encoding|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;org.hibernate.collection.PersistentBag;<<Context:ReaderWriter[value(enlil.domain.Kullanici)]:enlil.domain.Kullanici.kullaniciGrups>>;_RequestID=1c9792ff-406f-44d0-8315-0d9260807842;|"IOP00810257: (MARSHAL) Could not load class org.hibernate.collection.PersistentBag<<Context:ReaderWriter[value(enlil.domain.Kullanici)]:enlil.domain.Kullanici.kullaniciGrups>>"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9772)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9787)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1042)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2009)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2240)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1224)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:427)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:330)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:382)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:483)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:195)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at enlil.pacs.kullanici.__IKullaniciFayda_Remote_DynamicStub.oturumAcanKullaniciyiGetir(enlil/pacs/kullanici/__IKullaniciFayda_Remote_DynamicStub.java)
at enlil.pacs.kullanici._IKullaniciFayda_Wrapper.oturumAcanKullaniciyiGetir(enlil/pacs/kullanici/_IKullaniciFayda_Wrapper.java)
at enlil.pacs.server.modul.KullaniciYonetimiServlet.kullaniciYetkileriniGetir(KullaniciYonetimiServlet.java:70)
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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at enlil.pacs.server.guvenlik.SistemeGirisFiltresi.doFilter(SistemeGirisFiltresi.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
You are sending a hibernate entity / collection. There are a few issues:
- the collection might not be loaded
- the endpoint might not have hibernate on its classpath.
So before sending it, you should initialize the collection and unproxy it (i.e. obtain the original collection). That may still not work, because hibernate sets its own collections that implement java.util.List
. So from there you have two options:
- create
new ArrayList(originalCollection)
- this will copy the elements in aArrayList
- add hibernate on the classpath of the endpoint.
这篇关于无法加载类persistentBag的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!