I am trying to run Bryan Cazabonne’s Kalman Filter Numerical OD Tutorial ( KalmanNumericalOrbitDetermination.java). The error happens in the main where the following is running:
new KalmanNumOD().runKalman(input);
The error is:
Exception in thread “main” java.lang.IllegalArgumentException: MALFORMED
at java.util.zip.ZipCoder.toString(ZipCoder.java:58)
at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:300)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:122)
at org.orekit.data.ZipJarCrawler$Archive.goToNext(ZipJarCrawler.java:272)
at org.orekit.data.ZipJarCrawler$Archive.(ZipJarCrawler.java:265)
at org.orekit.data.ZipJarCrawler.feed(ZipJarCrawler.java:150)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:124)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:118)
at org.orekit.data.DirectoryCrawler.feed(DirectoryCrawler.java:81)
at org.orekit.data.DataProvidersManager.feed(DataProvidersManager.java:362)
at org.orekit.data.AbstractSelfFeedingLoader.feed(AbstractSelfFeedingLoader.java:55)
at org.orekit.frames.RapidDataAndPredictionXMLLoader.fillHistory(RapidDataAndPredictionXMLLoader.java:93)
at org.orekit.frames.LazyLoadedEop.getEOPHistory(LazyLoadedEop.java:311)
at org.orekit.frames.LazyLoadedFrames.getEOPHistory(LazyLoadedFrames.java:182)
at org.orekit.frames.AbstractFrames.getCIRF(AbstractFrames.java:400)
at org.orekit.frames.AbstractFrames.getTIRF(AbstractFrames.java:353)
at org.orekit.frames.AbstractFrames.getITRF(AbstractFrames.java:278)
at org.orekit.frames.AbstractFrames.getFrame(AbstractFrames.java:87)
at org.orekit.frames.FramesFactory.getFrame(FramesFactory.java:344)
at org.orekit.tutorials.yaml.TutorialBody.getEarthFrame(TutorialBody.java:127)
at org.orekit.tutorials.estimation.common.AbstractOrbitDetermination.createBody(AbstractOrbitDetermination.java:1127)
at org.orekit.tutorials.estimation.common.AbstractOrbitDetermination.runKalman(AbstractOrbitDetermination.java:611)
at kalmannumod.KalmanNumOD.main(KalmanNumOD.java:82)
C:\Users\owner\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\owner\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:94: Java returned: 1
BUILD FAILED (total time: 1 minute 41 seconds)
Since I am still a learner with Orekit this may be an “operator error” but would appreciate some assistance in getting this working. Thanks.
I used the default code:
// configure Orekit data provider
final File home = new File(System.getProperty(“user.home”));
final File orekitData = new File(home, “orekit-data”);
if (!orekitData.exists()) {
System.err.format(Locale.US, “Failed to find %s folder%n”,
orekitData.getAbsolutePath());
System.err.format(Locale.US, “You need to download %s from the %s page and unzip it in %s for this tutorial to work%n”,
“orekit-data.zip”, “https://www.orekit.org/forge/projects/orekit/files”,
home.getAbsolutePath());
System.exit(1);
}
final DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
manager.addProvider(new DirectoryCrawler(orekitData));
Please note that the orekit-data are initialized at the beginning of the method runKalman by the method initializeOrekitData. Therefore, there is no need to load again the data.
Can you verify if you are loading again the data ?
When I was running it in the debugger I got the following:
Listening on javadebug
User program running
LineBreakpoint KalmanNumOD.java : 86 successfully submitted.
Breakpoint hit at line 86 in class kalmannumod.KalmanNumOD by thread main.
Thread main stopped at KalmanNumOD.java:86.
User program running
Debugger stopped on uncompilable source code.
User program finished
(Note line 86 is: new KalmanNumOD().runKalman(input)
Ok, I think I have no other idea about your problem without you computer in front of me. However, I don’t think the problem is related to this tutorial but it is probably related to your setting. If you try another tutorial (maybe GNSSOrbitDetermination) I think the problem will also be present.
I’m just a bit surprised about the exception in ZipJarCrawler. Did you zip a folder that has not to be ziped (e.g. orekit-data)?
Thank you for looking at it. I did try another tutorial and had the same result. I will keep trying to track down what is going on and maybe another Orekit user has run into this and keep provide some assistance.
As Bryan pointed out, if you have the “official” orekit-data folder downloaded in your home folder, there should not be any zip file in it.
The exception in your first post refers to the ZipJarCrawler class that is used in Orekit to navigate in zip or jar compressed archive.
I suggest you inspect your orekit-data folder and checks if there is not a corrupted compressed archive in it.
I did not see any issues there. What is puzzling is that I can run the “PropagationNonInertialFrame.java” and “PropagationInRotatingFrame.java” tutorials without any problems. Unfortunately the Netbeans debugger was unable to take me to where the orekit-data is loaded.
Very odd. I changed the location where I the program is reading the “kalman-orbit-determination.yaml” file and it ran. I definitely have a lot to learn about Java. I will close this out.