Photon compilation
See original GitHub issueHello,
I’m trying to compile Photon to get the latest features (mostly the bbox). I simply cloned the master branch and ran the following comands:
mvn compile
mvn generate-test-resources
java -jar photon-*.jar
When going to http://locahost:2322/api/?q=berlin, I get a 500 error: org.elasticsearch.index.IndexNotFoundException: no such index
I guess that it is normal since I didn’t download the photon_data folder on my dev machine. But then when I upload my jar to my server (with the worldwide photon_data) and start Photon, it fails to start with the following error:
Exception in thread "main" java.lang.IllegalStateException: failed to load plugin - Plugin information:
Name: lang-painless
Description: An easy, safe and fast scripting language for Elasticsearch
Version: 5.5.0
Native Controller: false
* Classname: org.elasticsearch.painless.PainlessPlugin due to jar hell
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:376)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:140)
at org.elasticsearch.node.Node.<init>(Node.java:312)
at de.komoot.photon.elasticsearch.Server$MyNode.<init>(Server.java:58)
at de.komoot.photon.elasticsearch.Server.start(Server.java:112)
at de.komoot.photon.App.main(App.java:51)
Caused by: java.lang.IllegalStateException: jar hell!
class: org.elasticsearch.painless.Utility
jar1: /ssd/photon/photon_data/elasticsearch/modules/lang-painless/lang-painless.jar
jar2: /ssd/photon/photon_data/elasticsearch/modules/lang-painless/lang-painless-5.5.0.jar
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:282)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:192)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:374)
... 5 more
Worse, after that it broke my photon_data and I can’t start photon using the old jar either (error is the same). I ran a diff between my saved photon_data and the corrupted one, here’s the result:
diff -qr photon_data svg/photon_data/ | sort
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog/translog.ckp differ
Files photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog/translog.ckp and svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog/translog.ckp differ
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/_state: state-14.st
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog: translog-76.ckp
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/translog: translog-77.tlog
Only in photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/_state: state-69.st
Only in photon_data/elasticsearch/data/nodes/0/_state: global-14.st
Only in photon_data/elasticsearch/data/nodes/0/_state: node-16.st
Only in photon_data/elasticsearch/modules/lang-painless: antlr4-runtime.jar
Only in photon_data/elasticsearch/modules/lang-painless: asm-debug-all.jar
Only in photon_data/elasticsearch/modules/lang-painless: lang-painless.jar
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/0/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/1/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/2/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/3/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/4/_state: state-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/indices/CWPBCdX2S0ibjntCXEY7TQ/_state: state-64.st
Only in svg/photon_data/elasticsearch/data/nodes/0/_state: global-13.st
Only in svg/photon_data/elasticsearch/data/nodes/0/_state: node-13.st
Did I do something wrong, or is it a bug?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
Photon Compilation Edition - Saki Takamachi - Amazon.com
Check out Photon Compilation Edition by Saki Takamachi on Amazon Music. Stream ad-free or purchase CD's and MP3s now on Amazon.com.
Read more >Photon Compilation Edition - Single by Saki Takamachi | Spotify
Listen to Photon Compilation Edition on Spotify. Saki Takamachi · Single · 2020 · 1 songs.
Read more >Photon - Cosmos Collection (Full Compilation) - YouTube
A collection of songs were selected by PSC, big hits, and yours truly, in one release! Text Format made by Burning Chrome, and...
Read more >Stream Photon | Listen to Demo Compilation (2019 - 2020) playlist ...
Listen to Demo Compilation (2019 - 2020), a playlist curated by Photon on desktop and ... Demo Compilation (2019 - 2020). Photon. Album....
Read more >Compiling C++ Code on the Minimal Version of Photon OS
As a minimalist Linux run-time environment, the minimal version of Photon OS lacks the packages that you need to compile the code for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok found the Issue for the problem with the jar hell
Caused by: java.lang.IllegalStateException: jar hell!
you only need to delete the files in /photon_data/elasticsearch/modules/lang-painless/ which are duplicate. I deleted all files with version ending. This seems to work 😃
VG
There is still something wrong!
I have downloaded the photon-0.3.2.jar and latest photon_data from ‘http://download1.graphhopper.com/public/photon-db-latest.tar.bz2’
Then I ran the jar
java -jar photon-0.3.2.jar
As you can see below, it ran and I was able to make API requests
Later I stopped the jar, and wanted to run from my local code repo. I am using IntelliJ, to run Photon Below is the run configuration, where I setting the photon_data directory path![Screen Shot 2020-03-26 at 2 49 00 PM](https://user-images.githubusercontent.com/17171812/77630440-0d19be80-6f71-11ea-8b35-34cbad56ac30.png)
I’m unable to run it. Below is the error
Now when I go back to just running the jar which I downloaded As you can see, the second time when I run it, it throws the below
To add to the above, I also checked /photon_data/elasticsearch/modules/lang-painless/ for duplicates. Which don’t exist. Below screenshot for reference![Screen Shot 2020-03-26 at 3 16 12 PM](https://user-images.githubusercontent.com/17171812/77632957-c037e700-6f74-11ea-9ecc-3bf89ffac8a3.png)
The photon_data is broken now. Can anyone please look into this? @andrh87, @timautin, @lonvia I’m basically getting two kinds of errors,
Caused by: java.lang.IllegalStateException: jar hell!
Caused by: java.nio.file.FileSystemException: /Volumes/Data/projects/photon/photon_data/elasticsearch/modules/.DS_Store/plugin-descriptor.properties: Not a directory
When do we get the above errors? And when does photon_data breaks? What can be done to fix it?
This is not my first attempt at running this application. I was able to run it previously. But, suddenly ran into jar hell error.
To investigate, I set up the entire project again today. Now, still running into same issue. I just need a why