spring-petclinic / spring-framework-petclinic

A Spring Framework application based on JSP, Spring MVC, Spring Data JPA, Hibernate and JDBC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Main class not found

vaishalilambe opened this issue · comments

Hi ,

I am new to spring framework and cloned your code. While running it on server it is giving me HTTP 404 . Can you please see
screen shot 2018-04-17 at 10 09 28 pm

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)

I am using Java 8.

I need below help from you
use tomcat9, .
I am not able to see formatting for pages when I run my application PFA screenshot. Please provide me suggestions asap.

Also steps to achieve mysql connectivity as I am not connecting with my credentials to mysql
screen shot 2018-04-21 at 9 53 23 pm

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.