Dear Java & Docker Masters,
Have you encounter issue that pulls out your hair? Try this:
I have a Java Spring Hibernate web application that able to run successfully on my local that build via Gradle. IT is compile using Oracle JDK 1.8.0_101. It runs under Tomcat 7.0.72 (and tomcat runs Open on JDK 1.8.0_102). It runs the war perfectly well. Why do I have such different jdk version? because i want to mimic the dev server below.
My Dev server is a docker under aws ecs, with only one container image. And this container image uses the tomcat:7.0.72-jre8 image base. The same war application that is running inside the container throws the following error:
Error creating bean with name 'agencyRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class com.mnetmobile.data.entities.Agency
I drag that war file, and runs on my local, and it works like a champ. All JDK versions are the same, tomcat version are the same. the only thing different, is a windows 7 laptop, vs an ubuntu linux and runs docker. (All the path different is N/A because there are all relative path)
Any idea which hole i might have missed?
Somehow there must be some difference in the configuration of the two Tomcat servers. Since the Java version, the Tomcat version, and the war file are all the same; there must be some difference in the Tomcat configuration, either in the Tomcat lib folder, or the context.xml or server.xml or someplace.