question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors in Maven compiler, not in Eclipse compiler

See original GitHub issue

Hi,

When building our SARL project via Eclipse, it builds fine with no errors. When building with Maven however, this is the result:

[INFO] Validate and generate.
[INFO] Starting validation for input: 'ElevatorSimActions.sarl'
[INFO] Starting validation for input: 'ElevatorSimPercepts.sarl'
[INFO] Starting validation for input: 'ChangeEnvironment.sarl'
[ERROR] ERROR:Invalid implemented type: 'io.sarl.elevatorsim.multiagent.Environment'. Only subtypes of 'io.sarl.lang.core.Capacity' are allowed for 'ChangeEnvironment'. (file:/C:/Users/klep/Documents/SARL%20Elevator%20Project/workspace/sarl-controller/SARLbasicController/src/main/sarl/io/sarl/elevatorsim/multiagent/ChangeEnvironment.sarl line : 13 column : 36)
[ERROR] ERROR:Missing implemented type 'io.sarl.lang.core.Capacity' for 'ChangeEnvironment'. (file:/C:/Users/klep/Documents/SARL%20Elevator%20Project/workspace/sarl-controller/SARLbasicController/src/main/sarl/io/sarl/elevatorsim/multiagent/ChangeEnvironment.sarl line : 13 column : 36)
[ERROR] ERROR:The method enact(ElevatorSimAction) of type ChangeEnvironment must override a superclass method. (file:/C:/Users/klep/Documents/SARL%20Elevator%20Project/workspace/sarl-controller/SARLbasicController/src/main/sarl/io/sarl/elevatorsim/multiagent/ChangeEnvironment.sarl line : 17 column : 2)
[INFO] Starting validation for input: 'ElevatorAgent.sarl'
[INFO] Starting validation for input: 'Environment.sarl'
[INFO] Starting validation for input: 'SimulatorInteraction.sarl'
[ERROR] ERROR:Invalid implemented type: 'io.sarl.elevatorsim.SimulatorPush'. Only subtypes of 'io.sarl.lang.core.Capacity' are allowed for 'SimulatorInteraction'. (file:/C:/Users/klep/Documents/SARL%20Elevator%20Project/workspace/sarl-controller/SARLbasicController/src/main/sarl/io/sarl/elevatorsim/SimulatorInteraction.sarl line : 24 column : 16)
[ERROR] ERROR:The method pushSendCarAction(SendCarAction) of type SimulatorInteraction must override a superclass method. (file:/C:/Users/klep/Documents/SARL%20Elevator%20Project/workspace/sarl-controller/SARLbasicController/src/main/sarl/io/sarl/elevatorsim/SimulatorInteraction.sarl line : 84 column : 5)
[INFO] Starting validation for input: 'SimulatorProxyAgent.sarl'
[INFO] Starting validation for input: 'SimulatorPush.sarl'
[ERROR] Execution failed due to a severe validation error.

This appears as if it is similar to #380. For reference, we are currently building with SARL Maven Plugin 0.4.0 due to #503.

If it helps, I can provide some of the problem files or our pom.xml.

Cheers,

Matt

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:32 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
gallandarakhneorgcommented, Oct 5, 2016

Dear @ssardina.

The following command line is not the good one:

java -cp ~/.m2/repository/sarl-controller/sarl-controller/0.3.3/sarl-controller-0.3.3.jar:/home/ssardina/.m2/repository/io/janusproject/io.janusproject.plugin/0.4.1/io.janusproject.plugin-0.4.1.jar io.janusproject.Boot io.sarl.elevatorsim.SimulatorProxyAgent

Why is it not the good one?

The io.janusproject.plugin module contains the compiled of the Janus platform, but not the classes of the other libraries that are needed running Janus. Consequently, when you launch the application with a standard Java approach, class files are missed from the classpath.

For solving this issue, you could use two approaches:

java -cp ~/.m2/repository/sarl-controller/sarl-controller/0.3.3/sarl-controller-0.3.3.jar:/path/to/io.janusproject.kernel-2.0.5.0-with-dependencies.jar io.janusproject.Boot io.sarl.elevatorsim.SimulatorProxyAgent

We have planed to make the things easier from the CLI, see #149.

Stéphane.

0reactions
gallandarakhneorgcommented, Oct 25, 2016

That’s a great news. I will start the release plan for the version 0.4.2 in order to provide a stable version with the patches. Thank you for initial issue submission.

Read more comments on GitHub >

github_iconTop Results From Across the Web

maven-compiler-plugin:3.1:compile(1 errors) in eclipse
1 Answer 1 · Delete the local repository, if you use Windows, delete the folder C:\Users\your-user-name\.m2\repository · In Eclipse, right click ...
Read more >
How to fix "No compiler is provided in this environment ...
The main reason for this error is that Maven is not able to find javac (the Java compiler) which is required to compile...
Read more >
Eclipse Maven error No compiler is provided in this environment
On your pc, just go to windows > Preference > Java > Installed JREs. Check if you have an entry pointing to your...
Read more >
Failed to execute goal org.apache.maven.plugins ... - GitHub
Caused by: org.apache.maven.plugin.compiler. ... on project SaasAPI: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_191.
Read more >
Xtend Maven issues after upgrading to Java 9 - TMF (Xtext)
[INFO] --- xtend-maven-plugin:2.22.0:compile (default) @ fxxx --- [ERROR] ... The first error tells me that the compiler is not compiling ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found