Skip to content

Error compiling - Issue with lombok/java9 and iris already exists #1

@kassimorra

Description

@kassimorra

Hi Michael,

I'm trying to compile your project (jar file isn't avaliable for download). I ran into some errors mainly because I'm using java9 (I don't work with java, maybe I understood wrong). There is a problem with lombok and they have a topic discussing it (https://github.com/rzwitserloot/lombok/issues/985)

The solution was to add to pom.xml the following tags

  <configuration>
                                <source>${java.version}</source>
                                <target>${java.version}</target>
                                <fork>true</fork>
                                <compilerargs>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
            		        <arg>-J--add-opens=-Jjdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                                </compilerargs>
                            </configuration>


    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.16.18</version>
        <scope>provided</scope>
    </dependency>

But when maven compile, it failed the test. here is the log message.
Tests in error:
predict(ml.MLProcedureTest): Failed to invoke procedure ml.create: Caused by: java.lang.IllegalArgumentException: Model iris already exists, please remove first

Do you know how to fix this ?
I'm running it on mac high sierra

thanks

Kassim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions