Categories


Authors:
geri
opensource software

DataNucleus Enhancer integration

Products: IntelliJ IDEA

Vendor: sourceheads Information Technology GmbH

Email: N/A

Website: N/A

License: http://www.apache.org/licenses/LICENSE-2.0

Bugtracker page

Forum page

Description:

WARNING: THIS (1.1.0-beta) IS A BETA RELEASE!
Read the rest of this plugins' description carefully before upgrading. If peculiar with stability stay with 1.0.8!
Also if updating-/trying to use- DataNucleus 3.1.x continue reading this description!
Before adding negative comments, try to get your setup straight and inquire help at the forum ( DataNucleus Forum/Tools) - most of the problems occour due to erroneous mapping configuration or invalid usage of the underlying persistence implementation.

Integration of the DataNucleus JDO/JPA class enhancer in IDEA, including automatic class post-processing after compilation.
Since version 1.0.5 officially part of the DataNucleus project - Thanks to Andy Jefferson for all the help.

Due to the vast changes made since the last release and the limited time for testing this project, this beta is let out into the wild, knowing that it won't/can't be a final version.
Users of IDEA versions lower than 11.x will not benefit in any case from this "release", they won't even realize the changes (Due to compatibility issues only the old configuration dialogue - without any modification - is shown).
The extension API will stay backwards compatible, although the new feature(s) (manual enhancer dependencies) will not be supported (Extensions provided by myself will be updated soon)
Skip the next paragraph if you're not interested in supporting this plugin.

If you find this plugin useful/helpful please at least provide a rating on it's site (DataNucleus Enhancer integration) as there seem to be people out there who try to downrate without an appropriate reason (maybe just out of plain missing knowledge or inability to read documentation provided, but who knows? - just have a look at the comments).

Keep in mind that DataNucleus 3.1.x requires asm-4.x, which conflicts with any prior version. Sometimes asm is shipped even inside regular jar files or is included in a transitive fashion (e.g. via maven). As a result, get your dependencies cleaned up and also look inside the jars you include!

The datanucleus enhancer is not packaged with this plugin, but it's, by default, taken from (each) project module to avoid version conflicts.
When manually setting enhancer dependencies this plugin tries to ignore the enhancer-relevant dependencies from the project module during the enhancement process. This is done on a very simplistic (rather hacky) basis by just comparing the basenames (without version) of the manually added jars with the ones from the project module dependency list, so adapt the jar file names before adding them.
Tested with datanucleus-enhancer versions 3.0.x up to 3.1.x (Versions lower than that are not tested anymore, but -should- work)
See enhancer documentation for further information.

When inquiring help, please -at least- provide environment information (IDEA version, Plugin version, DataNucleus version,...) and a stack trace (from IDEA 'Messages' tab and/or IDEA log).
Inquiries missing such information will be ignored (In such cases nobody would waste -spare- time finding out).
Suggestions on how to improve the plugin itself are nevertheless very welcome (ofcourse without any preconditions like mentioned above ;) ).

Documentation can be found here: DataNucleus and IntelliJ IDEA
Please consult the forum at DataNucleus Forum/Tools in case of problems or improvement proposals - and -please- be aware that this is merely just a private project, so do not expect an utterly immediate response.

Features:

  • JDO and JPA support (API selectable via plugin configuration dialog).
  • Automatic datanucleus project module detection (enhancer and according dependencies have to be in the module classpath, except when using manual enhancer dependencies settings.
  • Manual enhancer dependencies settings, leaving it up to the user in which project modules enhancement should take place.
  • Annotation and metadata-file based enhancement.
  • Enhancer can be activated/deactivated for specific project modules.
  • Enhancement of test classes in separate build target folder (maven style).
  • Extension mechanism for adding additional enhancers (Since 1.0.6).

Additional Information:

  • Manually setting enhancer dependencies requires IDEA 11.x - Versions prior to 11.x will display the old configuration dialog and not gain any further advantage.
  • Initial activation (via selection in the configuration ui - for inclusion in enhancement process) of modules necessary after plugin installation.
  • Updating older plugin versions to >1.0.4 does not work, they must! be manually uninstalled before upgrading.
  • At least one build is required to update the list of affected classes (configuration dialog; only affects version lower than 1.0.6).
  • Since DataNucleus 3.1.x check your dependencies for rouge asm versions lower than 4.x (maybe also included directly into regular jar dependencies).

Known Issues:

  • After changing the implementation (Extension users only) or the api a click on the 'Apply' button is necessary to update the 'Affected Modules' list.
  • Checking out a project containing an .ipr/.ipl file and letting IDEA directly opening it in a new window can cause IDEA to block a modal plugin error message with a progress bar dialogue, thus rendering whole IDEA unusable. A workaround is to first do the checkout and then opening the project manually.
  • In IDEA versions 10.5.3 and below (not tested with 10.5.4) a full-rebuild sometimes exits with an Exception - as a workaround click the build button or restart IDEA (last resort 'solution').

Downloads: 4310
Rating:
Participated in rating: 2
Version Since Build Until Build File/URL Size (Kb) Date Details
1.1.0-beta1. 107.105. . Download 133.36 2012-10-10 08:52:56 details
1.0.8. 80.8000. . Download 82.04 2012-10-04 22:00:34 details
. .
6 updates are hidden show all updates
Screenshot #13987
Screenshot #13988
Screenshot #9187

Recent change notes:

1.1.0-beta
Minimum required IDEA version is 10.5!
Tested with IDEA 10.5.4 only (Sorry for that, but my spare time is very limited), so be careful when upgrading!
Functionality -should- be retained for older IDEA versions, but is completely untested, so please really be careful.
- Manual enhancer dependencies (Will only be available for IDEA 11.x. Previous functionality (=v1.0.8) is retained for IDEA 10.5 and tested with 10.5.4 only!)
- Improved progress display (based on project module completion as there's no way to have a generic progress interface for multiple (completely independent) enhancers)
- Interruptable on a project module process basis (IDEA UI may stall until completion/error of the actual process in case of manual interruption; seems to be IDEA related)

1.0.8
- DataNucleus 3.1.x support

1.0.7
- Fixed test classes enhancement (additional bug, no regression)
- Fixed npe in 'Build' menu entry when no project is opened (additional bug, no regression - reported by Chris Colman)

1.0.6
- Support for IDEA's incremental compilation (Only process classes that changed since last compilation)
- Extension API for including other enhancers

1.0.5
- Fixed Exception when trying to access 'Build' menu entry without having any projects open
- Added missing JPA Annotations to metadata search (MappedSuperclass and Embeddable)
- Fixed parsing to include JDO .orm and JPA metadata files
- Additionally show class names affected by enhancer process (Configuration dialog)
- Automatically add metadata file extensions to 'Settings -> Compiler -> Resource patterns'

1.0.4
- Added JPA support
- Fixed classes detection ("include test classes" exclusively selected just the test classes)
- Renamed project from "DataNucleus JDO enhancer integration" to "DataNucleus Enhancer integration"

1.0.3
- Fixed OutOfMemoryError (PermGen; known (that was a hard one) - also reported in a post to the plugin's comments by an anonymous user)
- Fixed enabling/disabling enhancer per module (reduces warnings)
- Fixed enabling/disabling enhancer in build menu

1.0.2
- Switched build to Maven 3
- Added license information
- Added minimal project setup documentation
- Prepared project for going open source

1.0.1
- Updated plugin description

Comments:

geri
2012-10-04 22:18:01
Comment below maybe related to missing support for DataNucleus 3.1.x. Fixed with version 1.0.8 @paalgyula: Comments like yours do not help anybody, you're not even providing a minimum set of information needed to find out what's wrong, neither did you inquire help at the DataNucleus forum.
.
paalgyula
Rated:
2012-10-03 16:14:27
Not working...
.
geri
2011-05-06 01:44:11
Wasn't aware that new comments are added on top, so the comment below ofcourse relates to the message further below.

This plugin works with enhancer versions > 2.1 as well, as I went through the whole list until 3.0-m3 without having problems.

Since plugin version 1.0.3 have an in-depth look on npe's as they are usually thrown in case of metadata problems by the enhancer itself (verified for enhancer version 3.0-m3 only - before, I didn't have to change my classes metadata).
.
geri
2011-04-15 21:09:33
The NullPointerException mentioned above (Version 1.0.2) was caused by an OutOfMemoryError (PermGen space) due to classloader issues. Fixed since 1.0.3
.
Anonymous
Rated:
2011-02-23 06:00:58
Great plugin - works really well and saves lots of time.

Using 1.0.2 - after hours of development I get an NPE that requires restart:

An unexpected error occurred in the Datanucleus plugin. Stacktrace:
java.lang.NullPointerException
at org.datanucleus.util.Localiser.getMessage(Localiser.java:359)
at org.datanucleus.util.Localiser.msg(Localiser.java:190)
at org.datanucleus.util.Localiser.msg(Localiser.java:271)
at org.datanucleus.plugin.PluginRegistryFactory.newInstance(PluginRegistryFactory.java:105)
at org.datanucleus.plugin.PluginRegistryFactory.newPluginRegistry(PluginRegistryFactory.java:63)
at org.datanucleus.plugin.PluginManager.(PluginManager.java:46)
at org.datanucleus.OMFContext.(OMFContext.java:171)
at org.datanucleus.enhancer.DataNucleusEnhancer.(DataNucleusEnhancer.java:178)
at org.datanucleus.enhancer.DataNucleusEnhancer.(DataNucleusEnhancer.java:156)
at org.datanucleus.jdo.JDODataNucleusEnhancer.(JDODataNucleusEnhancer.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sourceheads.idea.datanucleus.EnhancerProxy.(EnhancerProxy.java:55)
at com.sourceheads.idea.datanucleus.DNEComputable.enhancePerModule(DNEComputable.java:233)
at com.sourceheads.idea.datanucleus.DNEComputable.enhanceInModules(DNEComputable.java:194)
at com.sourceheads.idea.datanucleus.DNEComputable.compute(DNEComputable.java:131)
at com.sourceheads.idea.datanucleus.DNEComputable.compute(DNEComputable.java:56)
at com.intellij.openapi.application.impl.ApplicationImpl$10.run(ApplicationImpl.java:727)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:697)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:725)
at com.sourceheads.idea.datanucleus.DNEProjectComponent$1.execute(DNEProjectComponent.java:105)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:1876)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:790)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:474)
at com.intellij.compiler.impl.CompileDriver.access$700(CompileDriver.java:98)
at com.intellij.compiler.impl.CompileDriver$6.run(CompileDriver.java:417)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:141)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:428)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:198)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:223)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:189)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:343)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:331)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)


Also now have an issue since migrating from 2.2.3 (14 Feb) to 2.2.3 (22 Feb).
.