openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

Java 11 issue #334

Open rmpt opened 1 year ago

rmpt commented 1 year ago

I'm running Portico 2.1.0 on Java 11, wanrouter seems to be running fine. I've setup my environment as described in the README file, with RTI_HOME and CLASSPATH variables, imported the portico.jar library into my java project but the problem happens when I try to connect (initialize really) a federate, I get the error:

Caused by: java.lang.IllegalArgumentException: hla.rti1516e.RtiFactory is not an ImageIO SPI class
    at java.desktop/javax.imageio.spi.ServiceRegistry.checkClassAllowed(ServiceRegistry.java:722)
    at java.desktop/javax.imageio.spi.ServiceRegistry.lookupProviders(ServiceRegistry.java:207)
    at hla.rti1516e.RtiFactoryFactory.getRtiFactory(RtiFactoryFactory.java:44)

This happens when I call RtiFactoryFactory.getRtiFactory().

From what I get with this error, it's something related with the java encode version, that seems to incompatible with the java version I'm using to develop a federate - 11.

How can I fix this?

icemagno commented 1 year ago

You can try my Docker solution. Focus on your Fed and let the Portico stuff with me.

https://github.com/icemagno/portico-wrapper/tree/master/rtiexec

There is a Spring Boot web based wrapper to show you how to manage your Federate using a web browser.

Don't know if my "Projeto Arcanjo" Docker images are still there. Let me know about this. I'll build them to you.