I am revisiting Jadex after a long time. I could not setup the Jadex
project manually in Eclispe (Please see this post), so I am using the Maven
build to setup Jadex as a dependency of my project.
I downloaded the jadex-example-project.zip and unpacked it. In eclipse
(Eclipse IDE 2019-09) I opened this project as an existing Maven project.
the pom.xml file specifies version: <jadex.version>3.0.115</jadex.version>
I ran the tutorial.Main.class which launches a agent from the class tutorial.HelloAgent.class. This launches the platform and the agent runs
successfully. However, if i write my own agent class and try to launch it
using the main class I get the following warnings.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by jadex.commons.HttpConnectionManager
(file:/C:/Users/Steve/.m2/repository/org/activecomponents/jadex/jadex-commons/3.0.115/jadex-commons-3.0.115.jar)
to field sun.net.www.protocol.http.HttpURLConnection.http
WARNING: Please consider reporting this to the maintainers of
jadex.commons.HttpConnectionManager
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
To test this, I created another agent in the same package location: tutorials.HelloAgent1.class. The contents of tutorial.HelloAgent1.class is
identical to tutorial.HelloAgent.class. The error output is the following:
I was originally using AdoptOpenJDK jdk-11.0.5.10-openj9. To ensure that
there is no issues with AdoptOpenJDK compatibility, I also ran the test
with OracleJDK jdk-11.0.5. There is no difference in the console outputs.
Using this pom.xml, maven repopulated my local repository which fixed the ComponentCreation exception. May have been some corrupted jars or an issue with dependency hierarchy.
The warning for illegal reflective access operation was resoved by switching to Java JDK 8. I am using AdoptOpenJDK jdk-8.0.232.09-OpenJ9. The illegal reflective access seems to be occuring with Jadex due to a feature implemented in Java9 onwards. Here is a stackoverflow thread about the issue (link)
Although, I do not understand how this error was not being thrown when i launched the HelloAgent.class in the jadex-example-project.zip. However it was thrown when I launched a duplicated class with a different name?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am revisiting Jadex after a long time. I could not setup the Jadex
project manually in Eclispe (Please see this post), so I am using the Maven
build to setup Jadex as a dependency of my project.
I downloaded the jadex-example-project.zip and unpacked it. In eclipse
(Eclipse IDE 2019-09) I opened this project as an existing Maven project.
the pom.xml file specifies version:
<jadex.version>3.0.115</jadex.version>I ran the
tutorial.Main.classwhich launches a agent from the classtutorial.HelloAgent.class. This launches the platform and the agent runssuccessfully. However, if i write my own agent class and try to launch it
using the main class I get the following warnings.
To test this, I created another agent in the same package location:
tutorials.HelloAgent1.class. The contents of tutorial.HelloAgent1.class isidentical to
tutorial.HelloAgent.class. The error output is the following:I was originally using AdoptOpenJDK jdk-11.0.5.10-openj9. To ensure that
there is no issues with AdoptOpenJDK compatibility, I also ran the test
with OracleJDK jdk-11.0.5. There is no difference in the console outputs.
I am I doing something wrong here?
Last edit: sdr3 2019-10-31
Edit: Placed formatting for console output text
SOLVED!!!
After reading this post, I deleted everything, inclusing the .m2/repository folder on my computer.
I created a new maven project and set up the pom.xml file as shown below:
Using this pom.xml, maven repopulated my local repository which fixed the ComponentCreation exception. May have been some corrupted jars or an issue with dependency hierarchy.
The warning for illegal reflective access operation was resoved by switching to Java JDK 8. I am using AdoptOpenJDK jdk-8.0.232.09-OpenJ9. The illegal reflective access seems to be occuring with Jadex due to a feature implemented in Java9 onwards. Here is a stackoverflow thread about the issue (link)
Although, I do not understand how this error was not being thrown when i launched the
HelloAgent.classin the jadex-example-project.zip. However it was thrown when I launched a duplicated class with a different name?Hi, in Jadex 4 those problems are resolved and it will work also with newer JDKs. Best Lars