Home » Support » Forum » a second mapping-file is ignored in persistence.xml by enhancer

a second mapping-file is ignored in persistence.xml by enhancer

#1

Hello Support-Team,

we have a problem with the enhancer.

In the persistence.xml are two mapping-files:

<mapping-file>META-INF/orm.xml</mapping-file>
<mapping-file>META-INF/ormreq.xml</mapping-file>

We start the enhancer and the entities of orm.xml will be enhanced by following output:

enhancer:
     [java] [ObjectDB 2.6.0_02 Enhancer]
     [java] 3 persistable types have been enhanced:
     [java]     com.btc.ep.base.bl.impl.ModelElementImpl
     [java]     com.btc.ep.base.bl.impl.NamedElementImpl
     [java]     com.btc.ep.base.bl.impl.ProfileImpl

 

And the entities of ormreq.xml will be enhanced by following output, because the enhancer is apparently ignored the ormreq.xml:

enhancer:
     [java] [ObjectDB 2.6.0_02 Enhancer]
     [java] 11 NON persistable types have been enhanced:
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl10
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl11
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl2
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl3
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl4
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl5
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl6
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl7
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl8
     [java]     com.btc.ep.requirement.bl.impl.RequirementImpl9

Why the second mapping-file is ignored?

 

The unit test has following result, because not all entities were enhanced (the activation code would be removed from objectdb.conf after enhancement):

com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit
at com.objectdb.o.MSG.d(MSG.java:62)
at com.objectdb.o.MST.UC(MST.java:1117)
at com.objectdb.o.WRA.UC(WRA.java:213)
at com.objectdb.o.TYS.x(TYS.java:768)
at com.objectdb.o.TYS.v(TYS.java:592)
at com.objectdb.o.TYM.ae(TYM.java:531)
at com.objectdb.o.TYM.ac(TYM.java:467)
at com.objectdb.o.TYM.ao(TYM.java:788)
at com.objectdb.o.TYM.at(TYM.java:873)
at com.objectdb.o.OBC.bm(OBC.java:1470)
at com.objectdb.jpa.EMImpl.merge(EMImpl.java:520)

Best regards, BTC-ES

#2

Please check how you invoke the Enhancer.

Do you use the -pu option to specify a persistence unit in which the second orm file is defined?
If you do, please describe how exactly you invoke the Enhancer.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Thank you very much.

That works fine.

 

Best regards, BTC-ES


Post Reply

To post a reply and/or subscribe to update notifications - please login