0

I'm deploying jhipster in tomcat. But the login process is not working either in the registry, or in the gateway. I'm finding errors like the following:

enter image description here

enter image description here

I do not understand why the API is not published, any ideas?

Thank you

apenlor
  • 87
  • 2
  • 15
  • I suppose you did not change anything. Try setting logging level of spring mvc package to DEBUG and check that /api/* mappings are bound at startup in the log. When you say 'either in the regsitry', it means you cannot see the registry dashboard in tomcat either? – Gaël Marziou Nov 11 '16 at 11:16
  • I mean I can't log in to registry and I can't log in to gateway, both of them with similar errors. I'm sorry for the my english, it's not my languaje. I'm trying to set log level to debbug using this info, but by now I couldn't get it: http://stackoverflow.com/questions/30193054/jhipster-log-files I'll keep on trying, and I will share it here as soon as I can. – apenlor Nov 11 '16 at 13:23
  • Any reason why you absolutely want to deploy in Tomcat? Executable jars or Docker containers are so much easier! – Gaël Marziou Nov 11 '16 at 13:31
  • I was developing in my own computer, and I think that the easiest option to publish a demo would be using tomcat. But now that you say that, if it's easier, I think I would try to do it using Docker. Thank you very much! – apenlor Nov 11 '16 at 13:38
  • Well personnally I think executable jar is the simpler than Docker but it may depend also on which production platform you plan to deploy to.. – Gaël Marziou Nov 11 '16 at 13:58

1 Answers1

0

JHipster requires Java 8. If you try to deploy to a Tomcat Server using Java 7, the only visible error is that the API gives a 404 response like in your question.

If you still want to deploy to a Tomcat server (instead of Docker or an executable JAR), upgrade your JRE version and make sure Tomcat uses Java 8 over the older version.

Jon Ruddell
  • 6,244
  • 1
  • 22
  • 40
  • I checked it, and it's running with Java (build 1.8.0_101-b13). The problem still happening. – apenlor Nov 14 '16 at 10:35
  • Is Java 7 installed on the server? Another user with the same issue found that they had to remove Java 7 completely and then it started working. (Also what version Tomcat and what OS are you using?) – Jon Ruddell Nov 14 '16 at 23:10
  • Yes, I have Java 7 on my pc, but I have configured alternatives in linux, so it only uses 1.8. I use Ubuntu 16.04 Server version: Apache Tomcat/6.0.18 Server built: Jul 22 2008 02:00:36 Server number: 6.0.18.0 OS Name: Linux OS Version: 4.4.0-47-generic Architecture: amd64 JVM Version: 1.8.0_101-b13 JVM Vendor: Oracle Corporation – apenlor Nov 15 '16 at 10:31
  • You need to use a more recent version of Tomcat. Spring Boot does not support Tomcat 6 (Servlet 2.5), it requires Servlet 3 which can be found in Tomcat 7+. If you insist on using an older version, you can try to implement https://github.com/scratches/spring-boot-legacy. Tomcat 6's logs clearly state `INFO: validateJarFile(/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class` – Jon Ruddell Nov 15 '16 at 19:26