-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate on Linux
PostPosted: Tue Jul 19, 2005 2:57 am 
Newbie

Joined: Tue Jul 19, 2005 2:48 am
Posts: 2
I am using Hibernate 3.0 and the application is deployed in WebSphere. Application is working perfect on Windows, but as I deploy this EAR file on Linux it throws Exception unable to compile Mapping file and Hibernate changes the package of the class and gives property not found exception.<br>

Code:
7/19/05 11:36:03:760 PKT] 00000040 HbmBinder     I   Mapping class: lmkr.moit.dto.ic.SaveSearchDTO -> tIC_SavedSearches
[7/19/05 11:36:03:768 PKT] 00000040 Configuration E   Could not compile the mapping document
[7/19/05 11:36:03:773 PKT] 00000040 Configuration E   TRAS0014I: The following exception was logged org.hibernate.PropertyNotFoundException: field not found: type
        at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:96)
        at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:103)
        at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:103)
        at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:111)
        at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:90)
        at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:78)
        at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:254)
        at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:1753)
        at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1742)
        at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:317)
        at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
        at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
        at org.hibernate.cfg.Configuration.add(Configuration.java:359)
        at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:396)
        at org.hibernate.cfg.Configuration.addResource(Configuration.java:445)
        at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1312)
        at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1284)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1266)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1233)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1161)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1147)
        at lmkr.moit.hibernate.HibernateService.configure(HibernateService.java:46)
        at lmkr.moit.hibernate.HibernateService.<clinit>(HibernateService.java:35)
        at lmkr.moit.blc.ComponentService.<init>(ComponentService.java:17)
        at lmkr.moit.blc.service.LoginService.<init>(LoginService.java:25)
        at lmkr.moit.blc.service.LoginService.getInstance(LoginService.java:31)
        at lmkr.moit.blc.ic.controller.ICSessionControllerBean.login(ICSessionControllerBean.java:109)
        at lmkr.moit.blc.ic.controller.EJSRemoteStatelessICSessionController_12f9fe6b.login(Unknown Source)
        at lmkr.moit.blc.ic.controller._ICSessionController_Stub.login(_ICSessionController_Stub.java:399)
        at lmkr.moit.gui.common.security.page.LoginPage.login(LoginPage.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:40 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
Code:
[7/19/05 11:36:03:760 PKT] 00000040 HbmBinder     I   Mapping class: lmkr.moit.dto.ic.SaveSearchDTO -> tIC_SavedSearches
[7/19/05 11:36:03:768 PKT] 00000040 Configuration E   Could not compile the mapping documen

File names in Unix/Linux are case-sensitive. Check the name of the mapping file for lmkr.moit.dto.ic.SaveSearchDTO class, it should be SaveSearchDTO.hbm.xml

_________________
Leonid Shlyapnikov


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:43 am 
Regular
Regular

Joined: Tue Jan 27, 2004 12:22 pm
Posts: 103
This is also the case for database table/column names. (empty!=EMPTY)

_________________
Dencel
- The sun has never seen a shadow -


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 2:09 am 
Newbie

Joined: Tue Jul 19, 2005 2:48 am
Posts: 2
Leonid Shlyapnikov!,

I have checked names of all mapping files, and attribute names. To elaborate more, Hibernate is able to read that file but while reading any field it simply says, unable to find that attribute in the class.

One more thing to mention, Hibernate reads a mapping file and that mapping file is for class named lmkr.moit.dto.ic.DocumentDTO which is mapped to table tIC_Document. After reading this file, Hibernate tries to find the class in lmkr.moit.dto package not in lmkr.moit.dot.ic.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 8:59 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
Could you post the mapping for DocumentDTO and SaveSearchDTO.

And try these:

In the mapping for DocumentDTO specify the full class name
<class name="lmkr.moit.dto.ic.DocumentDTO">...

Check the mapping for lmkr.moit.dto.ic.SaveSearchDTO. If SaveSearchDTO has reference to DocumentDTO, specify the full class name for that association.

_________________
Leonid Shlyapnikov


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.