• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entities in different jars  RSS feed

Manju Sebastian
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have one complex application which is already existing for 3-4 years. There is a new approach to split up the modules, so that the new modules they make in new RAD projects, and will be deployed as new ears or jars. So in future the application will be independent from all coupling.

The manager decided to make new jar for entities named Outmate, so that, the old ones (Common) will be in the classpath, we extends some Commands and created new commands. Just copied the persistence.xml for the Common one to the new module Outmate. Now we are getting an error on the invocation of a command to fetch all OutmateClasses ,
Caused by: org.hibernate.hql.ast.QuerySyntaxException: OutmateClasses is not mapped [select o from OutmateClasses o where o.validFrom < '2009-09-03 13:09:34.225' AND (o.validTo > '2009-09-03 13:09:34.225' OR o.validTo is NULL) and o.parentOutmateClass is null ORDER BY o.outmateClass]
OutmateClasses is a new entity in the new jar. This is called from the Common command (fetch all classes), which is in the common jar. The error says, common cannot find the outmate, that is why entity Outmateclasses which is inside outmate jar is not mapped in common. hope you got some idea, what is happening.
What is your opinion. How to resolve this issue, from persistence xml? If we use this new spliting, we should not make use of common commands, or we should have seperate commands in the new outmate for all the outmate related things. what is your opinion?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!