Menu

#653 error when building with mvn install

Bug
open
nobody
None
1
2022-10-09
2019-07-26
No

I cloned the repository and run mvn install in the 'parent' folder
but I got this error
I'm on Debian Buster

[INFO] Compiling 1 source file to /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] com.reflexit.magiccards.parent 1.5.1-SNAPSHOT ...... SUCCESS [01:35 min]
[INFO] rcp_master 1.5.1-SNAPSHOT .......................... SUCCESS [  1.109 s]
[INFO] com.reflexit.magiccards.db 1.5.1-SNAPSHOT .......... FAILURE [ 23.046 s]
[INFO] com.reflexit.magiccards.core 1.5.1-SNAPSHOT ........ SKIPPED
[INFO] com.reflexit.magiccards.core.nl1 1.5.1-SNAPSHOT .... SKIPPED
[INFO] com.reflexit.magicassistant.p2 1.5.1-SNAPSHOT ...... SKIPPED
[INFO] com.reflexit.magiccards.help 1.5.1-SNAPSHOT ........ SKIPPED
[INFO] com.reflexit.magiccards.ui.chart 1.5.1-SNAPSHOT .... SKIPPED
[INFO] com.reflexit.magiccards.ui 1.5.1-SNAPSHOT .......... SKIPPED
[INFO] com.reflexit.magiccards.ui.graphics 1.5.1-SNAPSHOT . SKIPPED
[INFO] com.reflexit.mtgtournament.core 1.5.1-SNAPSHOT ..... SKIPPED
[INFO] com.reflexit.mtgtournament.ui 1.5.1-SNAPSHOT ....... SKIPPED
[INFO] com.reflexit.magiccards_rcp 1.5.1-SNAPSHOT ......... SKIPPED
[INFO] com.reflexit.mtgtournament.feature 1.5.1-SNAPSHOT .. SKIPPED
[INFO] com.reflexit.magicassistant.p2.feature 1.5.1-SNAPSHOT SKIPPED
[INFO] com.reflexit.magiccards.feature 1.5.1-SNAPSHOT ..... SKIPPED
[INFO] com.reflexit.magiccards.feature.rcp 1.5.1-SNAPSHOT . SKIPPED
[INFO] com.reflexit.unittesting 1.0.0-SNAPSHOT ............ SKIPPED
[INFO] com.reflexit.magiccards.core.test 1.0.0 ............ SKIPPED
[INFO] com.reflexit.magicassistant.ui.tests 1.5.1-SNAPSHOT  SKIPPED
[INFO] magic.product 1.5.1-SNAPSHOT ....................... SKIPPED
[INFO] com.reflexit.magicassistant.swtbot.tests 1.0.0-SNAPSHOT SKIPPED
[INFO] com.reflexit.mtgtournament.core.tests 1.5.1-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11:18 min
[INFO] Finished at: 2019-07-26T12:31:42+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on project com.reflexit.magiccards.db: Compilation failure: Compilation failure: 
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.io.IOException cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.io.InputStream cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.lang.Throwable cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.lang.Exception cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[1] 
[ERROR]         package com.reflexit.magiccards.db;
[ERROR]         ^
[ERROR] The type java.lang.Cloneable cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[3] 
[ERROR]         import java.io.IOException;
[ERROR]                ^^^^^^^^^^^^^^^^^^^
[ERROR] The import java.io.IOException cannot be resolved
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[4] 
[ERROR]         import java.io.InputStream;
[ERROR]                ^^^^^^^^^^^^^^^^^^^
[ERROR] The import java.io.InputStream cannot be resolved
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[16] 
[ERROR]         public class DbActivator extends Plugin {
[ERROR]                      ^^^^^^^^^^^
[ERROR] The hierarchy of the type DbActivator is inconsistent
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[18] 
[ERROR]         public static final String PLUGIN_ID = "com.reflexit.magiccards.db";
[ERROR]                             ^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[22] 
[ERROR]         public static final String DB_LOADED = "db_loaded";
[ERROR]                             ^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[27] 
[ERROR]         public DbActivator() {
[ERROR]                ^^^^^^^^^^^^^
[ERROR] Implicit super constructor Object() is undefined. Must explicitly invoke another constructor
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[36] 
[ERROR]         @Override
[ERROR]          ^^^^^^^^
[ERROR] Override cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[37] 
[ERROR]         public void start(BundleContext context) throws Exception {
[ERROR]                                                         ^^^^^^^^^
[ERROR] Exception cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[38] 
[ERROR]         super.start(context);
[ERROR]         ^^^^^
[ERROR] Object cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[46] 
[ERROR]         @Override
[ERROR]          ^^^^^^^^
[ERROR] Override cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[47] 
[ERROR]         public void stop(BundleContext context) throws Exception {
[ERROR]                                                        ^^^^^^^^^
[ERROR] Exception cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[50] 
[ERROR]         super.stop(context);
[ERROR]         ^^^^^
[ERROR] Object cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[53] 
[ERROR]         @SuppressWarnings("deprecation")
[ERROR]          ^^^^^^^^^^^^^^^^
[ERROR] SuppressWarnings cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[56] 
[ERROR]         return new InstanceScope().getNode(PLUGIN_ID);
[ERROR]                                            ^^^^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[59] 
[ERROR]         @SuppressWarnings("deprecation")
[ERROR]          ^^^^^^^^^^^^^^^^
[ERROR] SuppressWarnings cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[61] 
[ERROR]         return new DefaultScope().getNode(PLUGIN_ID);
[ERROR]                                           ^^^^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[73] 
[ERROR]         public static InputStream loadResource(String name) throws IOException {
[ERROR]                       ^^^^^^^^^^^
[ERROR] InputStream cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[73] 
[ERROR]         public static InputStream loadResource(String name) throws IOException {
[ERROR]                                                ^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[73] 
[ERROR]         public static InputStream loadResource(String name) throws IOException {
[ERROR]                                                                    ^^^^^^^^^^^
[ERROR] IOException cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[74] 
[ERROR]         InputStream is = FileLocator.openStream(DbActivator.getDefault().getBundle(), new Path("resources/" + name), false);
[ERROR]         ^^^^^^^^^^^
[ERROR] InputStream cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[74] 
[ERROR]         InputStream is = FileLocator.openStream(DbActivator.getDefault().getBundle(), new Path("resources/" + name), false);
[ERROR]                                                                          ^^^^^^^^^
[ERROR] The method getBundle() is undefined for the type DbActivator
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[78] 
[ERROR]         public static void log(Throwable e) {
[ERROR]                                ^^^^^^^^^
[ERROR] Throwable cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[83] 
[ERROR]         pl.getLog().log(new Status(IStatus.ERROR, DbActivator.getDefault().getBundle().getSymbolicName(), 1, e.getMessage(), e));
[ERROR]            ^^^^^^
[ERROR] The method getLog() is undefined for the type DbActivator
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[83] 
[ERROR]         pl.getLog().log(new Status(IStatus.ERROR, DbActivator.getDefault().getBundle().getSymbolicName(), 1, e.getMessage(), e));
[ERROR]                                                                            ^^^^^^^^^
[ERROR] The method getBundle() is undefined for the type DbActivator
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[86] 
[ERROR]         public IStatus getStatus(Throwable e) {
[ERROR]                                  ^^^^^^^^^
[ERROR] Throwable cannot be resolved to a type
[ERROR] /home/alessandro/sorgenti/mtgbrowser-git/com.reflexit.magiccards.db/src/com/reflexit/magiccards/db/DbActivator.java:[87] 
[ERROR]         return new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e);
[ERROR]                                          ^^^^^^^^^
[ERROR] String cannot be resolved to a type
[ERROR] 33 problems (33 errors)
[ERROR] -> [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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :com.reflexit.magiccards.db

Discussion

  • Alena Laskavaia

    Alena Laskavaia - 2019-10-06

    You need JDK with 1.8 to complie, not sure what you using it cannot even find Object class

     
  • Peter Clay

    Peter Clay - 2020-02-24

    I have a similar issue, but with the inability for Tycho compile to find org.eclipse.swt for the p2 module. I believe this is because my target definition doesn't have it (and can't include it? thought it was to be provided by SDK - maybe that's the JDK part you're talking about?)

    Are you saying that for the Maven run configuration, to switch it from the JRE to the JDK?

     
    • Peter Clay

      Peter Clay - 2020-02-28

      FYI, my fix for this, using my current setup, was to remove ALL of the 32-bit environments from the pom.xml in the parent project as support for them was removed.

       
  • Daniel Vaughn

    Daniel Vaughn - 2022-10-09

    building error from magic.product - unable to find feature org.eclipse.rcp
    mars.target file has error - unable to locate installable unit org.apache.log4j 0.0.0 and *.log4j.source 0.0.0

    maven + m2e tycho configurator not available or i can't find it.

     

    Last edit: Daniel Vaughn 2022-10-09

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB