-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: Mapping Exception: class not found while looking for propert
PostPosted: Thu Mar 17, 2005 6:29 pm 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
Hibernate version:
3.1 rc1

I am unable to reverse generate using the IDE with just the POJO generation. Here is how to duplicate this error.

1. New --> Other --> Hibernate Artifact Generation
2. OutputDirectory -> Browse -> DataAccess/src
3. Check Generate domain code
4. Click Finish.


I don't get why I'm receiving this error. The file shouldn't be there, I'm trying to generate it. Any Ideas?

Mapping documents:
Code:
<hibernate-mapping package="com.llic.business">
  <class name="Document" table="Document" polymorphism="implicit">
   
   <meta attribute="implements">LaserBusiness</meta>
   
    <id name="id" column="documentid">
      <meta attribute="scope-get">private</meta>
     
      <generator class="native" />
     
    </id>
   
    <property name="contentMgrUniqueKey" column="contentMgrUniqueKey" type="string" not-null="true" />
   
    <property name="dateReceived" column="DATERECEIVED" type="java.util.Date" not-null="true" />
   
    <property name="scanPacketNumber" column="packetnumber" type="string" />
   
   <property name="documentSubTypeID" column="documentSubTypeID" type="java.lang.Long" not-null="true"/>
   
    <many-to-one name="policyNumber" column="policyNumberId" class="PolicyNumber" cascade="save-update"/>
  </class>
</hibernate-mapping>



Code:
<hibernate-mapping package="com.llic.business">
 
  <joined-subclass name="Application" extends="Document" table="Application" >
   
    <key column="documentId"/>
   
    <property name="policyDate" column="policydate" type="java.util.Date" not-null="false" />
   
    <property name="applicationDate" column="applicationDate" type="java.util.Date" not-null="false" />
   
    <set name="appEntityRoles" table="APPENTITYROLE" inverse="true" lazy="false" cascade="all">
      <!-- foreign key in appentityrole is application id which references the local property applicationId -->
      <key column="documentid"/>
      <one-to-many class="com.llic.business.ApplicationEntityRole" />
    </set>
   
   
  </joined-subclass>
 
</hibernate-mapping>



Code:
<hibernate-mapping package="com.llic.business" >
   
   <class  name="PolicyNumber" table="PolicyNumber" >
   
   <meta attribute="implements">LaserBusiness</meta>
   
      <id name="id" column="policyNumberId" type="java.lang.Long">
         <generator class="native"/>   
      </id>
      
      <property name="policyPrefix" column="policyPrefix" type="string" not-null="true"/>
      
      <property name="policyBase" column="policyBase" type="string" not-null="true"/>
      
      <property name="policySuffix" column="policySuffix" type="string" not-null="true"/>
   
   </class>
   
</hibernate-mapping>



Code:
<hibernate-mapping package="com.llic.business" >
   
   <class  name="ApplicationEntityRole" table="AppEntityRole" >
   
   <meta attribute="implements">LaserBusiness</meta>

      <id name="id" column="appEntityRoleId" type="java.lang.Long">
         <generator class="native"/>   
      </id>
      
      <property name="entityRoleSubType" column="entityRoleSubTypeId" type="java.lang.Long" not-null="true"/>
   
      <property name="entityId" column="entityId" type="java.lang.Long" not-null="true"/>   
   
   </class>
   
</hibernate-mapping>


Full stack trace of any exception that occurs:
Code:
!ENTRY org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-17 17:00:59.972
!MESSAGE Error under artifact generation
!STACK 0
org.hibernate.MappingException: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:242)
   at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:162)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:225)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Caused by: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:483)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1787)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:238)
   ... 6 more
Caused by: java.lang.ClassNotFoundException: com.llic.business.Document
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
   at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   ... 12 more
!SUBENTRY 1 org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-03-17 17:00:59.972
!MESSAGE org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
!STACK 0
org.hibernate.MappingException: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:242)
   at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:162)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:225)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Caused by: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:483)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1787)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:238)
   ... 6 more
Caused by: java.lang.ClassNotFoundException: com.llic.business.Document
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
   at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   ... 12 more
!SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-03-17 17:00:59.972
!MESSAGE org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
!STACK 0
org.hibernate.MappingException: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:242)
   at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:162)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:225)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Caused by: org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:483)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1787)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:238)
   ... 6 more
Caused by: java.lang.ClassNotFoundException: com.llic.business.Document
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
   at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   ... 12 more
!SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-03-17 17:00:59.972
!MESSAGE class com.llic.business.Document not found while looking for property: id
!STACK 0
org.hibernate.MappingException: class com.llic.business.Document not found while looking for property: id
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:483)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1787)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:238)
   at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:162)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:225)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)
Caused by: java.lang.ClassNotFoundException: com.llic.business.Document
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
   at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   ... 12 more
!SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-03-17 17:00:59.972
!MESSAGE com.llic.business.Document
!STACK 0
java.lang.ClassNotFoundException: com.llic.business.Document
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
   at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:483)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1787)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addFile(Configuration.java:238)
   at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:162)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:225)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
   at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:105)



Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 6:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
how do you exepct hbm2java to generate code for you when you dont tell it what type you want for your properties ? ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 17, 2005 8:07 pm 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
Jeez.....

I'm sorry for the two stupid posts in a row. It's been a long day :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 4:40 pm 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:26 am
Posts: 22
hi there I seem to be having the same problem and cannot figure out what is happening.
I compiled these mapping and tested them locally on my machine and it works fine .After that i integrated it into my web application and it gives me this error of the property not found. I have checked the file and it exists with all my other mappings and it loads all the other mappings fine except this one.
This maps a link table .

Any ideas why it doesnt work now ?

Quote:
max
how do you exepct hbm2java to generate code for you when you dont tell it what type you want for your properties ? ;)
.

I did not follow this , could you explain which properties ?


version : Hibernate 3.0 beta 4
oracle : 9i

Code:
mapping
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.orm.beans">

    <class name="UserGroupApplicationFunction" table="PD_USER_GRP_APP_FUNC" lazy="true">
             
        <composite-id name="id" class="UserGroupApplicationFunction$Id" unsaved-value="any">

        <key-property name="functionId"
                      access="field"
                      column="APP_FUNC_ID"
                      length="10"/>

        <key-property name="groupId"
                      access="field"
                      column="USER_GRP_ID"
                      length="10"/>
            </composite-id>
       

        <property name="dteCreated" column="DTE_CREATED" type="java.util.Date"  update="false" not-null="true" />
        <property name="idLogonCreated" column="ID_LOGON_CREATED" type="java.lang.String" update="false" not-null="true" />
        <property name="dteLastUpdated" column="DTE_LAST_UPDATED" type="java.util.Date" update="false" not-null="true" />
        <property name="idLogonLastUpdated" column="ID_LOGON_LAST_UPDATED" type="java.lang.String" update="false" not-null="true" />

        <many-to-one name="function"
                           column="APP_FUNC_ID"
                           class="ApplicationFunction"
                           insert="false"
                           update="false"
                           not-null="true" />

        <many-to-one name="userGroup"
                           column="USER_GRP_ID"
                           class="UserGroup"
                           insert="false"
                           update="false"
                           not-null="true" />
       
    </class>
   
</hibernate-mapping>




Code:
2005-03-23 15:06:33,890 INFO org.hibernate.cfg.Environment.<clinit>() - 451 - Hibernate 3.0 beta 4
2005-03-23 15:06:33,906 INFO org.hibernate.cfg.Environment.<clinit>() - 464 - hibernate.properties not found
2005-03-23 15:06:33,906 INFO org.hibernate.cfg.Environment.<clinit>() - 497 - using CGLIB reflection optimizer
2005-03-23 15:06:33,906 INFO org.hibernate.cfg.Environment.<clinit>() - 527 - using JDK 1.4 java.sql.Timestamp handling
2005-03-23 15:06:33,906 INFO org.hibernate.cfg.Configuration.configure() - 1216 - configuring from resource: /hibernate.cfg.xml
2005-03-23 15:06:33,906 INFO org.hibernate.cfg.Configuration.getConfigurationInputStream() - 1187 - Configuration resource: /hibernate.cfg.xml
2005-03-23 15:06:33,968 DEBUG org.hibernate.util.DTDEntityResolver.resolveEntity() - 42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
2005-03-23 15:06:33,968 DEBUG org.hibernate.util.DTDEntityResolver.resolveEntity() - 53 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
2005-03-23 15:06:34,015 DEBUG org.hibernate.cfg.Configuration.addProperties() - 1173 - show_sql=false
2005-03-23 15:06:34,015 DEBUG org.hibernate.cfg.Configuration.addProperties() - 1173 - connection.datasource=jdbc/localhost/orcl1/scott
2005-03-23 15:06:34,015 DEBUG org.hibernate.cfg.Configuration.addProperties() - 1173 - hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
2005-03-23 15:06:34,015 DEBUG org.hibernate.cfg.Configuration.addProperties() - 1173 - transaction.manager_lookup_class=org.hibernate.transaction.WeblogicTransactionManagerLookup
2005-03-23 15:06:34,015 DEBUG org.hibernate.cfg.Configuration.addProperties() - 1173 - hibernate.transaction.auto_close_session=true

2005-03-23 15:06:34,312 DEBUG org.hibernate.util.DTDEntityResolver.resolveEntity() - 53 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
2005-03-23 15:06:34,328 INFO org.hibernate.cfg.HbmBinder.bindRootClass() - 439 - Mapping class: org.njsp.invest.common.orm.beans.UserGroupApplicationFunction -> PD_USER_GRP_APP_FUNC
2005-03-23 15:06:34,343 ERROR org.hibernate.cfg.Configuration.add() - 358 - Could not compile the mapping document
org.hibernate.MappingException: class org.orm.beans.UserGroupApplicationFunction$Id not found while looking for property: functionId
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:81)
   at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:230)
   at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:1532)
   at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1306)
   at org.hibernate.cfg.HbmBinder.bindCompositeId(HbmBinder.java:1207)
   at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:500)
   at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1867)
   at org.hibernate.cfg.Configuration.add(Configuration.java:355)
   at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:392)
   at org.hibernate.cfg.Configuration.addResource(Configuration.java:441)
   at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1369)
   at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1341)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1323)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1290)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1218)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1204)
   at org.njsp.invest.pvtdet.common.mvc.model.hbn.ConfigureHibernate.init(ConfigureHibernate.java:42)
   at org.njsp.invest.pvtdet.common.ejb.InitEjb.ejbCreate(InitEjb.java:86)
   at org.njsp.invest.pvtdet.common.ejb.Init_alsfdp_Impl.ejbCreate(Init_alsfdp_Impl.java:135)
   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:324)
   at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:172)
   at weblogic.ejb20.pool.Pool.createInitialBeans(Pool.java:254)
   at weblogic.ejb20.manager.StatelessManager.initializePool(StatelessManager.java:376)
   at weblogic.ejb20.deployer.EJBDeployer.initializePools(EJBDeployer.java:1607)
   at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1474)
   at weblogic.ejb20.deployer.EJBModule.start(EJBModule.java:689)
   at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127)
   at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168)
   at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2115)
   at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3082)
   at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1751)
   at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359)
   at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
   at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
   at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
   at weblogic.Server.main(Server.java:32)
Caused by: java.lang.ClassNotFoundException: org.njsp.invest.common.orm.beans.UserGroupApplicationFunction$Id
   at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:199)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
   at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
   ... 39 more
Quote:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 4:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it cannot find your class - has nothing to do with the original issue which were about generating code.

yours is about running the mappings.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 11:26 pm 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:26 am
Posts: 22
I had ran these mapping in a stand alone program and had them in the org.orm.beans jar package. I see all the class files in this package. I ran the test files and it works fine .
After that I when I am using weblogic and hibernate , it seems to pick all the mappings from the beans package except the mapping above. It says the innerclass defined for this mapping cannot be loaded even though its in the jar file.
I have defined the key to be a composite id and is mapped in the java object by an inner class like in the cavet example
Does it have to do anything with weblogic's class loader ? Any thoughts ...

Thank you
Reeve


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 24, 2005 6:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
seriously have no definite answer - can only say that it cant find the class. This is normal classloading stuff - if you remove this particular mapping does it work then ?

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 24, 2005 11:19 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:26 am
Posts: 22
yes i tried it out by commenting it from the hibernate.xml and during werblogic startup , hibernate loads all the mappings fine from the package. But as soon as I put the link table mapping it says class is not found, but when i open the jar it is present.

this is the xml mapping of the link table

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.njsp.invest.common.orm.beans">

    <class name="AgencyEmployee" table="PD_AGENCY_EMPLOYEES">
         <composite-id name="id" class="AgencyEmployeePk" unsaved-value="any">
              <key-property name="agencyId"
                            access="field"
                            column="AGY_LICENSE_ID"
                            length="10"/>
      
              <key-property name="employeeId"
                            access="field"
                            column="EMP_ID"
                            length="10"/>       
            </composite-id>
         
               
               
            
        <property name="dteCreated" column="DTE_CREATED" type="java.util.Date"  not-null="true" />
        <property name="idLogonCreated" column="ID_LOGON_CREATED" type="java.lang.String"  not-null="true" />
        <property name="dteLastUpdated" column="DTE_LAST_UPDATED" type="java.util.Date"  not-null="true" />
        <property name="idLogonLastUpdated" column="ID_LOGON_LAST_UPDATED" type="java.lang.String"  not-null="true" />
         
            <!-- changed pdTitles from object to set and vice versa
                PdTitles pdTitles   == > PdTitles pdTitle
                & added  Set pdTitles so chnaged teh assocaietion from a object to source
               <many-to-one name="pdTitles" column="TITLE_ID" class="PdTitles"  not-null="true" />
              -->
             <many-to-one name="agency"   column="AGY_LICENSE_ID" class="Agency"       insert="false" update="false" not-null="true"/>
             <many-to-one name="employee" column="EMP_ID"             class="Employee"  insert="false" update="false" not-null="true"/>
             <many-to-one name="title"       column="TITLE_ID"          class="Title"        not-null="true"/>
            
            <!--
             <one-to-one name="agencyEmployeeContact" class="AgencyEmpContact" constrained="true"/>
            -->

            
            
    </class>
   
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 24, 2005 2:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
...and you say the mappings work fine outside the containe r?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 8:25 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:26 am
Posts: 22
Sorry could not respond earlier as i had left for the holidays .
yes ,the mappings work fine outside the container


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 29, 2005 8:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then i would look for classloader issues.

does your app classes exist in the same classloader as hibernate.jar ?

if not - are they bundled/packaged/deployed so the thread context classloader contains your app classes ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 9:44 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:26 am
Posts: 22
thank you for taking time to help me out ...
yes the app classes exist in the same classloader as hibernate.jar ?

I will try some other options as well and let me result be know later
Reeve


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.