0

I am new to Spring MVC Hibernate and have loaded a sample project into my eclipse IDE and when I run the project it gives one warning and no errors but I do get a 404 browser error. The warning is as follows:

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:SpringHibernateExample' did not find a matching property.

Now being new I don't know if this has anything to do with the 404 error or not. I have the MySQL database and employee table setup correctly. I have tested the MySQL and it works. To access the database I have setup the application.properties with the following code:

jdbc.driverClassName = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/employee
jdbc.username = root
jdbc.password = P@ssword1
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.show_sql = true
hibernate.format_sql = true

Beyond this I am stuck. If anyone has any ideas that would be great!

After asking this question I really need to learn how to debug Spring MVC applications. I have been doing ASP for 12 year and have no problems. Any help in Spring MVC would give me a good start on my own.

Steve Holdorf
  • 141
  • 1
  • 14

1 Answers1

0

Concerning your warning, check out this SO question.

Concerning your specific error, you'd need to provide more information, e.g. Application Code or server log message, but it surely has nothing to do with the warning above.

Concerning debugging, you can debug any Java application by running in debug mode and then connect to the set port from eclipse via Debug/Remote application. See that SO question for an example.

Community
  • 1
  • 1
Alexander Rühl
  • 6,769
  • 9
  • 53
  • 96
  • Thanks for your help. I have used the debugger and setting brake points eclipse is, for the most part straight forward. I have a lot of ASP MVC experience and I have no problems understanding the Spring MVC code. The problems I am having is updating application libraries, or packages, to the correct versions so the application doesn't have a mismatch error. Also, figuring out the proper way to configure the configuration XML files so everything is setup correctly and there are no mismatches or configuration type of bugs. I know that this comes with experience help guides would be great. – Steve Holdorf Oct 30 '15 at 13:33
  • Back to the problem. In my opinion it may have to do with the application.properties file. I do have a working application that uses this format for accessing the MySQL database: @Bean public DataSource getDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:3306/contactdb"); dataSource.setUsername("root"); dataSource.setPassword("$P@ssword1"); return dataSource; } This works fine. The other shown above using the application.properties file may be it. – Steve Holdorf Oct 30 '15 at 13:51
  • After going back to the original demo code it had an application.properties database line entry of: jdbc.url = jdbc:mysql://localhost:3306/websystiquefile I modified the code as after that. What It did is create an employee db and in it an employee table and change the database line entry to: jdbc.url = jdbc:mysql://localhost:3306/employee I don't know if this could be the bug. – Steve Holdorf Oct 30 '15 at 14:46