Giter Club home page Giter Club logo

Comments (8)

andyjefferson avatar andyjefferson commented on July 2, 2024 1

So in summary you just want to state the same as the OP?
The answer is simple, read my responses, and if that doesn't meet with your satisfaction then you get the code and develop something; this is why code is open source.

from datanucleus-maven-plugin.

gtskaushik avatar gtskaushik commented on July 2, 2024 1

I did the following to solve the issue for myself:-

  1. Removed the symbolic link
  2. Copied the data from my maven repo into ~/.m2/repository
    Post this it was not throwing any error. But when we create a symbolic link, it complains that it is already registered in following locations:-
    a. ~/.m2/repository (Symbolic link)
    b. Actual Maven repo
    So, though there is only one entry the presence of symbolic link cause a problem for the data-nucleus plugin.

Though I may not be able to work on this, I wanted to keep this as record so that someone who is looking for a solution will be thankful.

from datanucleus-maven-plugin.

andyjefferson avatar andyjefferson commented on July 2, 2024

Datanucleus simply informs you of multiple jars in the classpath. Solution is to remove dups. Also the versions stated are not supported, so upgrade to the latest. Thx

Sadly we do not have resource to run non-standard tests, i.e non-datanucleus software included.

from datanucleus-maven-plugin.

julianhyde avatar julianhyde commented on July 2, 2024

To be clear: are you claiming that this is not a bug? Do you believe that is fixed in the latest version?

There are no duplicates on the classpath, but just multiple paths to the same file. The classpath in this case is /tmp/repository2. Something internal to datanucleus (or perhaps maven) is expanding the classpath, seeing two occurrences of the same file via different paths, and claiming that these are duplicates.

Regarding test case. I don't have time to create a minimal test case. I thought you'd like to know about this bug, so I provided a test case that someone could execute if they didn't believe the bug was real. If someone fixes the bug of course they should create a better more minimal test case. I don't need a fix, because now I've figured out the cause, I have a workaround. It's a bit inconvenient that ~/.m2/repository has to be on the same filesystem as ~/.m2, but I can live with it. I logged a bug just so that the next person to run into this would be aware of the workaround.

from datanucleus-maven-plugin.

andyjefferson avatar andyjefferson commented on July 2, 2024

DataNucleus jars have an extension mechanism. datanucleus-core plugin handler will call getResources for "plugin.xml". You have multiple representing the same thing (datanucleus-core.jar). Having a check for such a thing makes perfect sense, since the user may expect to be using one version and have another. Your case is simply that you have 2 of the same, and so you should remove one. At runtime people can specify persistence properties such as datanucleus.plugin.pluginRegistryBundleCheck to decide what happens in this situation.

But again, the versions you quote are not supported anyway, nor is this a problem with the DN Maven plugin (where it is raised). Marking as "won't fix".

Testcases are defined in http://www.datanucleus.org/documentation/problem_reporting.html.

from datanucleus-maven-plugin.

gtskaushik avatar gtskaushik commented on July 2, 2024

Faced the same issue today. When I have the maven repo as a symbolic link, it creates a problem

from datanucleus-maven-plugin.

theosib-amazon avatar theosib-amazon commented on July 2, 2024

I'm running into a similar problem, but my "~/.m2/repository" is NOT a symlink. Despite that, I get an error like what y'all were seeing two years ago.

[ERROR] Failed to execute goal org.datanucleus:datanucleus-maven-plugin:3.3.0-release:enhance (default) on project hive-metastore: Error executing DataNucleus tool org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL "file:/home/theosib/.m2/repository/org/datanucleus/datanucleus-core/3.2.10/datanucleus-core-3.2.10.jar" is already registered, and you are trying to register an identical plugin located at URL "file:/local/home/theosib/.m2/repository/org/datanucleus/datanucleus-core/3.2.10/datanucleus-core-3.2.10.jar." -> [Help 1]

from datanucleus-maven-plugin.

andyjefferson avatar andyjefferson commented on July 2, 2024

As the docs say v3.x hasn't been supported for many years. Debug your problem, perhaps using "maven --debug".

from datanucleus-maven-plugin.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.