fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avik Ganguly <avikganguly...@gmail.com>
Subject OpenJPA Enhancement in Eclipse
Date Wed, 26 Apr 2017 11:05:22 GMT
Hi Michael,

I hope you are doing well. I am reaching out to you because I am facing a
little bit of difficulty in deploying the project using the main
ServerApplication from inside IDE (tomcatRunWar is working fine for me). A
GSoC candidate, Kumaranath was enquiring about the same as there seems to
be some issue with his gradlew tomcatRunWar command failing (his
cleanEclipse eclipse is running fine, will attach the logs later) but
previous year he was deploying Fineract inside his IDE.

Summarizing the effort I have made till now :-

Changed old references of mifosplatform-tenants and mifostenant-default to
fineract-tenants and fineract-default in the files DataSourceProperties,
MariaDB4jSetupService, jndi.xml and some of the flyway tasks in
build.gradle. On starting from inside IDE, after all migrations are
completed, it exits with error that it failed to enhance
AbstractPersistableCustom.

By following OpenJPA enhancement guide -
https://ci.apache.org/projects/openjpa/trunk/docbook/manual.html#ref_guide_pc_enhance,
I tried the following :-

   1. Omitting the OpenJPA enhancer using <property
   name="openjpa.RuntimeUnenhancedClasses" value="supported"/> for the
   persistence unit. Error remains same after this.
   2. Enhancing at runtime - Enabling javaagent and pointing it to the
   openjpa-all-2.4.1.jar  - this is failing as duplicate classes are being
   found as openjpa libs are already in classpath.
   3. Enhancing at build time -  Following
   https://openjpa.apache.org/enhancement-with-eclipse.html. On enabling
   OpenJPA plugin for eclipse enhancement - it's throwing a
   java.lang.VerifyError: Expecting a stackmap frame at branch target 37 for
   the classes AbstractPersistableCustom and Role. On trying the Ant task way
   of calling PCEnhancer, it logged that 0 classes enhanced. On mentioning
   fully qualified entity class name in persistence.xml, it is enhancing that
   class.
   4. Enhancing dynamically at runtime - I was expecting this to work
   without any changes but it seems to fail to find the persistent class list.

Since class tag in persistence.xml is not allowing wildcard expressions
like '**/domain/*.class' and option 1 is not working, I explored openjpa
forums a little. For those using maven projects, they are calling the maven
goal of enhance using the m2e plugin. I see we have a similar gradle task
of openjpaEnhance but how do we invoke it from eclipse for manual/auto
builds like the ant builder task using PCEnhancer. Any help will be greatly
appreciated.

Regards,
Avik.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message