You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Stephen Cameron <st...@gmail.com> on 2016/12/23 04:51:45 UTC

simpleapp archetype doesn't build

Hi,

I am try to a maven clean build on the SimpleApp archetype and get the
following error message.

Maybe something in the pom.xml files?

[INFO]
[INFO] SimpleApp Parent ................................... SUCCESS [
2.553 s]
[INFO] SimpleApp Simple Module ............................ FAILURE [
10.456 s]
[INFO] SimpleApp Application .............................. SKIPPED
[INFO] SimpleApp Webapp ................................... SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14.053 s
[INFO] Finished at: 2016-12-23T15:45:15+11:00
[INFO] Final Memory: 30M/981M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance (process-classes) on
project myapp-module-simple: Error executing DataNucleus tool
org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException:
Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure you
dont have multiple JAR versions of the same plugin in the classpath. The
URL
"file:/d:/maven/repository/org/datanucleus/datanucleus-api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
is already registered, and you are trying to register an identical plugin
located at URL
"file:/D:/maven/repository/org/datanucleus/datanucleus-api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR]   mvn <goals> -rf :myapp-module-simple

Re: simpleapp archetype doesn't build

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
I think the word "register" comes from DataNucleus, which might be using
some sort of mechanism such as ServiceLoader [1] or perhaps the way that
JDBC Drivers register themselves with DriverManager through a class static
initializer.  It obviously doesn't allow two JARs to attempt to re-register
the same implementation.

Ultimately the issue must come down to the way in which maven is building
the list of JARs to build or run, and it isn't realizing that the lower
case c:\... and upper case C:\... are the same file.  One clue from this
article [2] is the statement: "On Windows systems, the getCanonicalPath()
method will also uppercase the drive letter.", so I'm guessing that maven
is being fed "c:\..." and then different bits of Maven are inconsistent in
how that it is treated, with it being canonicalized along the way.

Just a thought... do you have M2_HOME or M2_REPO defined as environment
variables?  And if so, do they use the lower case c:\...  ?  In which case,
perhaps change them to uppercase might fix the problem.

Thx
Dan

[1] http://www.oracle.com/technetwork/articles/javase/extensible-137159.html
[2]
http://www.avajava.com/tutorials/lessons/whats-the-difference-between-a-files-path-absolute-path-and-canonical-path.html


On Thu, 29 Dec 2016 at 21:38 Stephen Cameron <st...@gmail.com>
wrote:

> OK, I'll try to figure it out.
>
> I don't know what it means to 'register' something according to maven, that
> is a strange message, might have the read the manual, I deleted that jar
> from the local maven repository and it just complained again.
>
> If I just bump up the Isis version number on my own project to 1.13.2 in
> pom file that works fine, so something different in the pom files?.
> Initially I had a problem, so I tried the archetype, got a problem there,
> went back to my project and did a clean and then install and it was fine.
>
>
>
> On Fri, Dec 30, 2016 at 4:30 AM, Dan Haywood <dan@haywood-associates.co.uk
> >
> wrote:
>
> > Hi guys,
> >
> > thanks for reporting this, though unfortunately I can't reproduce.
> >
> > Looking at the error message, I do see one clue:
> >
> > "file:/d:/maven/repository/org/datanucleus/datanucleus-api-
> > jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
> >
> > is already registered, and you are trying to register an identical
> > plugin located
> > at URL
> >
> > "file:/D:/maven/repository/org/datanucleus/datanucleus-api-
> > jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
> >
> >
> > I see that the first is listed as d:, while the second is D:  Obviously
> > these are the same file, but I can imagine that using cygwin or msysgit
> or
> > similar might consider these as different files.
> >
> > Since there's nothing in the archetype (I'm aware of) that relates to
> > Windows per se, my guess is that this is some sort of issue with your
> > environment.  (For what it's worth, I develop on Windows, and "it works
> for
> > me").
> >
> > I've also had a go at building on a vanilla docker image (I used
> > frekele/maven on docker hub), and could also build both the archetype and
> > the app fine (was I also apt-get update && apt-get install git).
> >
> > If you can provide any other info, I'll take another look
> >
> > Thx
> > Dan
> >
> >
> >
> > On Fri, 23 Dec 2016 at 08:54 Vladimir Nišević <vn...@gmail.com>
> wrote:
> >
> > > Yes, I observe same issue, tried with artifact version 1.13.2
> > >
> > > BR,Vladimir
> > >
> > > 2016-12-23 5:51 GMT+01:00 Stephen Cameron <steve.cameron.62@gmail.com
> >:
> > >
> > > > Hi,
> > > >
> > > > I am try to a maven clean build on the SimpleApp archetype and get
> the
> > > > following error message.
> > > >
> > > > Maybe something in the pom.xml files?
> > > >
> > > > [INFO]
> > > > [INFO] SimpleApp Parent ................................... SUCCESS [
> > > > 2.553 s]
> > > > [INFO] SimpleApp Simple Module ............................ FAILURE [
> > > > 10.456 s]
> > > > [INFO] SimpleApp Application .............................. SKIPPED
> > > > [INFO] SimpleApp Webapp ................................... SKIPPED
> > > > [INFO]
> > > > ------------------------------------------------------------
> > ------------
> > > > [INFO] BUILD FAILURE
> > > > [INFO]
> > > > ------------------------------------------------------------
> > ------------
> > > > [INFO] Total time: 14.053 s
> > > > [INFO] Finished at: 2016-12-23T15:45:15+11:00
> > > > [INFO] Final Memory: 30M/981M
> > > > [INFO]
> > > > ------------------------------------------------------------
> > ------------
> > > > [ERROR] Failed to execute goal
> > > > org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance
> > (process-classes)
> > > > on
> > > > project myapp-module-simple: Error executing DataNucleus tool
> > > > org.datanucleus.enhancer.DataNucleusEnhancer:
> > InvocationTargetException:
> > > > Plugin (Bundle) "org.datanucleus.api.jdo" is already registered.
> Ensure
> > > you
> > > > dont have multiple JAR versions of the same plugin in the classpath.
> > The
> > > > URL
> > > > "file:/d:/maven/repository/org/datanucleus/datanucleus-
> > > > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
> > > > is already registered, and you are trying to register an identical
> > plugin
> > > > located at URL
> > > > "file:/D:/maven/repository/org/datanucleus/datanucleus-
> > > > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
> > > > -> [Help 1]
> > > > [ERROR]
> > > > [ERROR] To see the full stack trace of the errors, re-run Maven with
> > the
> > > -e
> > > > switch.
> > > > [ERROR] Re-run Maven using the -X switch to enable full debug
> logging.
> > > > [ERROR]
> > > > [ERROR] For more information about the errors and possible solutions,
> > > > please read the following articles:
> > > > [ERROR] [Help 1]
> > > > http://cwiki.apache.org/confluence/display/MAVEN/
> > MojoExecutionException
> > > > [ERROR]
> > > > [ERROR] After correcting the problems, you can resume the build with
> > the
> > > > command
> > > > [ERROR]   mvn <goals> -rf :myapp-module-simple
> > > >
> > >
> >
>

Re: simpleapp archetype doesn't build

Posted by Stephen Cameron <st...@gmail.com>.
OK, I'll try to figure it out.

I don't know what it means to 'register' something according to maven, that
is a strange message, might have the read the manual, I deleted that jar
from the local maven repository and it just complained again.

If I just bump up the Isis version number on my own project to 1.13.2 in
pom file that works fine, so something different in the pom files?.
Initially I had a problem, so I tried the archetype, got a problem there,
went back to my project and did a clean and then install and it was fine.



On Fri, Dec 30, 2016 at 4:30 AM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi guys,
>
> thanks for reporting this, though unfortunately I can't reproduce.
>
> Looking at the error message, I do see one clue:
>
> "file:/d:/maven/repository/org/datanucleus/datanucleus-api-
> jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
>
> is already registered, and you are trying to register an identical
> plugin located
> at URL
>
> "file:/D:/maven/repository/org/datanucleus/datanucleus-api-
> jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
>
>
> I see that the first is listed as d:, while the second is D:  Obviously
> these are the same file, but I can imagine that using cygwin or msysgit or
> similar might consider these as different files.
>
> Since there's nothing in the archetype (I'm aware of) that relates to
> Windows per se, my guess is that this is some sort of issue with your
> environment.  (For what it's worth, I develop on Windows, and "it works for
> me").
>
> I've also had a go at building on a vanilla docker image (I used
> frekele/maven on docker hub), and could also build both the archetype and
> the app fine (was I also apt-get update && apt-get install git).
>
> If you can provide any other info, I'll take another look
>
> Thx
> Dan
>
>
>
> On Fri, 23 Dec 2016 at 08:54 Vladimir Nišević <vn...@gmail.com> wrote:
>
> > Yes, I observe same issue, tried with artifact version 1.13.2
> >
> > BR,Vladimir
> >
> > 2016-12-23 5:51 GMT+01:00 Stephen Cameron <st...@gmail.com>:
> >
> > > Hi,
> > >
> > > I am try to a maven clean build on the SimpleApp archetype and get the
> > > following error message.
> > >
> > > Maybe something in the pom.xml files?
> > >
> > > [INFO]
> > > [INFO] SimpleApp Parent ................................... SUCCESS [
> > > 2.553 s]
> > > [INFO] SimpleApp Simple Module ............................ FAILURE [
> > > 10.456 s]
> > > [INFO] SimpleApp Application .............................. SKIPPED
> > > [INFO] SimpleApp Webapp ................................... SKIPPED
> > > [INFO]
> > > ------------------------------------------------------------
> ------------
> > > [INFO] BUILD FAILURE
> > > [INFO]
> > > ------------------------------------------------------------
> ------------
> > > [INFO] Total time: 14.053 s
> > > [INFO] Finished at: 2016-12-23T15:45:15+11:00
> > > [INFO] Final Memory: 30M/981M
> > > [INFO]
> > > ------------------------------------------------------------
> ------------
> > > [ERROR] Failed to execute goal
> > > org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance
> (process-classes)
> > > on
> > > project myapp-module-simple: Error executing DataNucleus tool
> > > org.datanucleus.enhancer.DataNucleusEnhancer:
> InvocationTargetException:
> > > Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure
> > you
> > > dont have multiple JAR versions of the same plugin in the classpath.
> The
> > > URL
> > > "file:/d:/maven/repository/org/datanucleus/datanucleus-
> > > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
> > > is already registered, and you are trying to register an identical
> plugin
> > > located at URL
> > > "file:/D:/maven/repository/org/datanucleus/datanucleus-
> > > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
> > > -> [Help 1]
> > > [ERROR]
> > > [ERROR] To see the full stack trace of the errors, re-run Maven with
> the
> > -e
> > > switch.
> > > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > > [ERROR]
> > > [ERROR] For more information about the errors and possible solutions,
> > > please read the following articles:
> > > [ERROR] [Help 1]
> > > http://cwiki.apache.org/confluence/display/MAVEN/
> MojoExecutionException
> > > [ERROR]
> > > [ERROR] After correcting the problems, you can resume the build with
> the
> > > command
> > > [ERROR]   mvn <goals> -rf :myapp-module-simple
> > >
> >
>

Re: simpleapp archetype doesn't build

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi guys,

thanks for reporting this, though unfortunately I can't reproduce.

Looking at the error message, I do see one clue:

"file:/d:/maven/repository/org/datanucleus/datanucleus-api-
jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"

is already registered, and you are trying to register an identical
plugin located
at URL

"file:/D:/maven/repository/org/datanucleus/datanucleus-api-
jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."


I see that the first is listed as d:, while the second is D:  Obviously
these are the same file, but I can imagine that using cygwin or msysgit or
similar might consider these as different files.

Since there's nothing in the archetype (I'm aware of) that relates to
Windows per se, my guess is that this is some sort of issue with your
environment.  (For what it's worth, I develop on Windows, and "it works for
me").

I've also had a go at building on a vanilla docker image (I used
frekele/maven on docker hub), and could also build both the archetype and
the app fine (was I also apt-get update && apt-get install git).

If you can provide any other info, I'll take another look

Thx
Dan



On Fri, 23 Dec 2016 at 08:54 Vladimir Nišević <vn...@gmail.com> wrote:

> Yes, I observe same issue, tried with artifact version 1.13.2
>
> BR,Vladimir
>
> 2016-12-23 5:51 GMT+01:00 Stephen Cameron <st...@gmail.com>:
>
> > Hi,
> >
> > I am try to a maven clean build on the SimpleApp archetype and get the
> > following error message.
> >
> > Maybe something in the pom.xml files?
> >
> > [INFO]
> > [INFO] SimpleApp Parent ................................... SUCCESS [
> > 2.553 s]
> > [INFO] SimpleApp Simple Module ............................ FAILURE [
> > 10.456 s]
> > [INFO] SimpleApp Application .............................. SKIPPED
> > [INFO] SimpleApp Webapp ................................... SKIPPED
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 14.053 s
> > [INFO] Finished at: 2016-12-23T15:45:15+11:00
> > [INFO] Final Memory: 30M/981M
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] Failed to execute goal
> > org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance (process-classes)
> > on
> > project myapp-module-simple: Error executing DataNucleus tool
> > org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException:
> > Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure
> you
> > dont have multiple JAR versions of the same plugin in the classpath. The
> > URL
> > "file:/d:/maven/repository/org/datanucleus/datanucleus-
> > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
> > is already registered, and you are trying to register an identical plugin
> > located at URL
> > "file:/D:/maven/repository/org/datanucleus/datanucleus-
> > api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
> > -> [Help 1]
> > [ERROR]
> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e
> > switch.
> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > [ERROR]
> > [ERROR] For more information about the errors and possible solutions,
> > please read the following articles:
> > [ERROR] [Help 1]
> > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> > [ERROR]
> > [ERROR] After correcting the problems, you can resume the build with the
> > command
> > [ERROR]   mvn <goals> -rf :myapp-module-simple
> >
>

Re: simpleapp archetype doesn't build

Posted by Vladimir Nišević <vn...@gmail.com>.
Yes, I observe same issue, tried with artifact version 1.13.2

BR,Vladimir

2016-12-23 5:51 GMT+01:00 Stephen Cameron <st...@gmail.com>:

> Hi,
>
> I am try to a maven clean build on the SimpleApp archetype and get the
> following error message.
>
> Maybe something in the pom.xml files?
>
> [INFO]
> [INFO] SimpleApp Parent ................................... SUCCESS [
> 2.553 s]
> [INFO] SimpleApp Simple Module ............................ FAILURE [
> 10.456 s]
> [INFO] SimpleApp Application .............................. SKIPPED
> [INFO] SimpleApp Webapp ................................... SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 14.053 s
> [INFO] Finished at: 2016-12-23T15:45:15+11:00
> [INFO] Final Memory: 30M/981M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance (process-classes)
> on
> project myapp-module-simple: Error executing DataNucleus tool
> org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException:
> Plugin (Bundle) "org.datanucleus.api.jdo" is already registered. Ensure you
> dont have multiple JAR versions of the same plugin in the classpath. The
> URL
> "file:/d:/maven/repository/org/datanucleus/datanucleus-
> api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar"
> is already registered, and you are trying to register an identical plugin
> located at URL
> "file:/D:/maven/repository/org/datanucleus/datanucleus-
> api-jdo/4.1.1/datanucleus-api-jdo-4.1.1.jar."
> -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR]   mvn <goals> -rf :myapp-module-simple
>