开发者

could not load class persistentBag

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 a ArrayList
  • add hibernate on the classpath of the endpoint.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜