JonH
JonH

Reputation: 501

Map a class in hibernate that is in a referenced project

I am using classes that are a in referenced project as the mapping for hibernate project - I am able to use the classes in Java code but cannot refer to the classes in the hibernate config file. I get WARN: HHH000183: no persistent classes found for query class

so in the hibernate mapping config file I am using:

...

<mapping package="com.me.my.proj.oracle"/>
<mapping class="com.me.my.proj.oracle.WDI_HBD_PSNG_SMRY"/>
</session-factory> ###end of hibernate config file###

Is it possible to reference a class in a reference project using hibernate?

Upvotes: 0

Views: 370

Answers (1)

Yogendra Singh
Yogendra Singh

Reputation: 34367

Your referenced project (Java) is added as JAR file in your current project's classpath. I think you need to use mappingJarLocation with location as your ReferenceProjectName.jar.

    <property name="mappingJarLocations" value="file:**/ReferenceProjectName.jar"/>

Upvotes: 1

Related Questions