I tried to deploy this code which works in localhost to Heroku. This code runs fine in localhost since java is already installed in my laptop. I think the problem is because there is no java in the application that is deployed. I am not sure how I can add java file. Your suggestion would be really appreciated.
2020-10-29T12:00:06.166858+00:00 app[web.1]: * Owlready2 * Running Pellet... 2020-10-29T12:00:06.166900+00:00 app[web.1]: java -Xmx2000M -cp /app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/httpclient-4.2.3.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jena-iri-0.9.5.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/slf4j-api-1.6.4.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jena-tdb-0.10.0.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/httpcore-4.2.2.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/owlapi-distribution-3.4.3-bin.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jcl-over-slf4j-1.6.4.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/xml-apis-1.4.01.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jena-core-2.10.0.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/pellet-2.3.1.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jgrapht-jdk1.5.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/antlr-3.2.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/xercesImpl-2.10.0.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/log4j-1.2.16.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/jena-arq-2.10.0.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/aterm-java-1.6.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/commons-codec-1.6.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/slf4j-log4j12-1.6.4.jar:/app/.heroku/python/lib/python3.6/site-packages/owlready2/pellet/antlr-runtime-3.2.jar pellet.Pellet realize --loader Jena --input-format N-Triples --ignore-imports /tmp/tmpq7_1mrbv 2020-10-29T12:00:06.172904+00:00 app[web.1]: [2020-10-29 12:00:06,169] ERROR in app: Exception on /webhook [POST] 2020-10-29T12:00:06.172905+00:00 app[web.1]: Traceback (most recent call last): 2020-10-29T12:00:06.172906+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app 2020-10-29T12:00:06.172906+00:00 app[web.1]: response = self.full_dispatch_request() 2020-10-29T12:00:06.172907+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request 2020-10-29T12:00:06.172907+00:00 app[web.1]: rv = self.handle_user_exception(e) 2020-10-29T12:00:06.172907+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception 2020-10-29T12:00:06.172908+00:00 app[web.1]: reraise(exc_type, exc_value, tb) 2020-10-29T12:00:06.172908+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise 2020-10-29T12:00:06.172908+00:00 app[web.1]: raise value 2020-10-29T12:00:06.172909+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request 2020-10-29T12:00:06.172909+00:00 app[web.1]: rv = self.dispatch_request() 2020-10-29T12:00:06.172909+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request 2020-10-29T12:00:06.172911+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args) 2020-10-29T12:00:06.172911+00:00 app[web.1]: File "/app/app.py", line 36, in webhook 2020-10-29T12:00:06.172911+00:00 app[web.1]: res = makeWebhookResult(req) 2020-10-29T12:00:06.172912+00:00 app[web.1]: File "/app/app.py", line 45, in makeWebhookResult 2020-10-29T12:00:06.172912+00:00 app[web.1]: graph = ConnectOnto() 2020-10-29T12:00:06.172912+00:00 app[web.1]: File "/app/app.py", line 24, in ConnectOnto 2020-10-29T12:00:06.172913+00:00 app[web.1]: sync_reasoner_pellet(my_world) 2020-10-29T12:00:06.172913+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/owlready2/reasoning.py", line 245, in sync_reasoner_pellet 2020-10-29T12:00:06.172914+00:00 app[web.1]: output = subprocess.run(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE, check = True).stdout 2020-10-29T12:00:06.172914+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/subprocess.py", line 423, in run 2020-10-29T12:00:06.172914+00:00 app[web.1]: with Popen(*popenargs, **kwargs) as process: 2020-10-29T12:00:06.172914+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/subprocess.py", line 729, in __init__ 2020-10-29T12:00:06.172915+00:00 app[web.1]: restore_signals, start_new_session) 2020-10-29T12:00:06.172915+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/subprocess.py", line 1364, in _execute_child 2020-10-29T12:00:06.172915+00:00 app[web.1]: raise child_exception_type(errno_num, err_msg, err_filename) 2020-10-29T12:00:06.172939+00:00 app[web.1]: FileNotFoundError: [Errno 2] No such file or directory: 'java': 'java' 2020-10-29T12:00:06.174825+00:00 app[web.1]: 10.9.250.56 - - [29/Oct/2020:12:00:06 +0000] "POST /webhook HTTP/1.1" 500 290 "-" "Google-Dialogflow" 2020-10-29T12:32:50.080887+00:00 heroku[web.1]: Idling 2020-10-29T12:32:50.083039+00:00 heroku[web.1]: State changed from up to down 2020-10-29T12:32:54.677566+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2020-10-29T12:32:54.711873+00:00 app[web.1]: [2020-10-29 12:32:54 +0000] [10] [INFO] Worker exiting (pid: 10) 2020-10-29T12:32:54.712645+00:00 app[web.1]: [2020-10-29 12:32:54 +0000] [11] [INFO] Worker exiting (pid: 11) 2020-10-29T12:32:54.713066+00:00 app[web.1]: [2020-10-29 12:32:54 +0000] [4] [INFO] Handling signal: term 2020-10-29T12:32:54.813502+00:00 app[web.1]: [2020-10-29 12:32:54 +0000] [4] [INFO] Shutting down: Master 2020-10-29T12:32:54.889763+00:00 heroku[web.1]: Process exited with status 0 |
Administrator
|
Hi,
You need to install Java on the server (not sure you can / you have the right for that). Possibly, Java is already installed but not available as "java", and you need to search where it is installed. Jiba |
Free forum by Nabble | Edit this page |