0

I'm quite new to AnyLogic, especially in importing external libraries/packages to it. Does anyone know what else do I have to do when using/importing the fuzzy java library "JFML" in AnyLogic? I imported the JFML-v1.2.2.jar file in the Model dependencies. However, e.g. if I want to execute a toString() method for a certain object of a JFML class, there is the following error:

Exception during discrete event execution:
javax/xml/bind/JAXBElement
Caused by: javax.xml.bind.JAXBElement
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBElement
    at jfml.jaxb.ObjectFactory.createKnowledgeBaseTypeFuzzyVariable(ObjectFactory.java:510)
DynamiX
  • 63
  • 4
  • Does this answer your question? [How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException](https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception) – Jaco-Ben Vosloo Mar 01 '22 at 16:52

1 Answers1

0

According to this link it is not a simple solution for normal Java IDEs which means that is even more difficult in AnyLogic.

What I can suggest is to download jaxb-runtime here https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime/2.3.1

and the jakarta.xml.bind-api here https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0-RC3

And add them a dependencies, same why you added the other libraries.

it should work

Jaco-Ben Vosloo
  • 3,770
  • 2
  • 16
  • 33