Main class not found
vaishalilambe opened this issue · comments
Please reply asap. Its urgent!
just built the project and deployed it to tomcat 9, it's working fine.
I mean I am getting this error after running on tomcat 9can you please elaborate steps
Hi @vaishalilambe, do you have configure the context path with /petclinic?
Just downloaded the project, click run on server -> tomcat 9, and it opens this page. Please guide me I am not able to figure it out
I removed that context root and just replaced with "/" still doesn't work
BTW I am running it from STS
Could you please give us your stackstrace?
Moreover, are you using Java 8, Java 9 or Java 10?
It looks like that with Java 9, the application does not start:
java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
With Java 9, you have to add the bellow JVM option :
--add-modules java.xml.bind
@vaishalilambe could you try to git pull
then to redeploy Petclinic into Tomcat 9?
I've fixed the issue between Java 9 and JAXB (see https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j)
Sorry but your screenshot does not look like the Spring Framework Petclinic one's.
Do you have any startup log?
The readme gives you some information to run with a MySQL database instead of the HSQL default one: https://github.com/spring-petclinic/spring-framework-petclinic/blob/master/readme.md
Yes, you have to add the mysql JDBC driver and configure the data-access.properties
.
Should be fixed. Please reopen this issue if the problem persists.