[Javalist] Web app: két persistence unit
György Gajdics
ggtech65 at gmail.com
2017. Júl. 18., K, 13:31:58 UTC
Sziasztok!
Van egy primitív (azaz most már teljesen lecsupaszított: egy entity, két
pu) web alkalmazás (NetBeans, Maven, Glassfish, REST service), amelynek
fordítása egy persistence unit esetén hibamentes, de két pu esetén az
alábbi hiba dobódik már compile time:
A feladat az lenne, hogy az entitások a kérésnek megfelelő pu által
reprezentált kapcsolatból töltődjenek be.
NB alatt az alábbi trükk működik, de build szerven ugye ez nem megoldás:
- az egyik pu-ból kiveszem az "include all entity..." check box-ot
- Clean and Build
- Run
- visszateszem a check box-ot (immár mindkettő be lett állítva)
- Save, és ekkor az auto deploy sikeresen felteszi és működik
Van valami annotáció, vagy beállítás, ami elkerülte a figyelmemet?
Ha lenne valami ötletetek, nagy segítség volna.
Köszönettel
gg
NB compile:
BUILD FAILURE
------------------------------------------------------------------------
Total time: 3.242s
Finished at: Tue Jul 18 14:43:08 CEST 2017
Final Memory: 33M/375M
------------------------------------------------------------------------
Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile
(default-compile) on project Services: Fatal error compiling:
java.lang.RuntimeException: javax.annotation.processing.FilerException:
Attempt to recreate a file for type hu.services.backend.partner.Partner_ ->
[Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read
the following articles:
[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
mvn compile -X (számomra ez sem értelmezhetőbb hibaüzenet):
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.702 s
[INFO] Finished at: 2017-07-18T14:53:23+01:00
[INFO] Final Memory: 31M/257M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile
(default-compile) on project Services: Fatal error compiling:
java.lang.RuntimeException: javax.annotation.processing.FilerException:
Attempt to recreate a file for type hu.services.backend.partner.Partner_ ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile
(default-compile) on project Services: Fatal error compiling
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error
compiling
at
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:954)
at
org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:137)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException:
java.lang.RuntimeException: javax.annotation.processing.FilerException:
Attempt to recreate a file for type hu.services.backend.partner.Partner_
at
org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:173)
at
org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
at
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:943)
... 22 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
javax.annotation.processing.FilerException: Attempt to recreate a file for
type hu.services.backend.partner.Partner_
at com.sun.tools.javac.main.Main.compile(Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at
org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
... 24 more
Caused by: java.lang.RuntimeException:
javax.annotation.processing.FilerException: Attempt to recreate a file for
type hu.services.backend.partner.Partner_
at
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:411)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at
com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 27 more
Caused by: javax.annotation.processing.FilerException: Attempt to recreate
a file for type hu.services.backend.partner.Partner_
at
com.sun.tools.javac.processing.JavacFiler.checkNameAndExistence(JavacFiler.java:522)
at
com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:396)
at
com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:378)
at
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.generateCanonicalModelClass(CanonicalModelProcessor.java:97)
at
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.generateCanonicalModelClasses(CanonicalModelProcessor.java:225)
at
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)
... 35 more
[ERROR]
[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
--------- következő rész ---------
Egy csatolt HTML állomány át lett konvertálva...
URL: <http://lists.javaforum.hu/pipermail/javalist/attachments/20170718/1df22551/attachment.html>
További információk a(z) Javalist levelezőlistáról