Author | Message |
---|---|
Vanquish39
Posts: 134
|
Posted 23:19 Sep 27, 2011 |
Professor I tried what you said, and also tried many other things. Reinstalled all the plugins carefully and the problem still persists.. I'm clueless at the moment.
1) I checked out the csns2 repository perfectly. 2) Right click project - > new file ->build.properties 3) copied the content in build.properties.sample to the source of build.properties 4) Right-clicked csns2 -> maven -> update project configuration 5) right clicked csns2 -> run as ->run on server -> tomcat is located in my e:/ drive 6) Programs runs and gives me the same exception. nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'jdbc:postgresql://localhost:5432/csns2' java.sql.SQLException: No suitable driver
Sep 27, 2011 11:25:32 PM org.apache.catalina.core.AprLifecycleListener init Last edited by Vanquish39 at
23:27 Sep 27, 2011.
|
cysun
Posts: 2935
|
Posted 23:45 Sep 27, 2011 |
It says it could not load the database driver. This could happen if Maven got interrupted when it tried to download the database driver. So go to the home directory of the user (e.g. on Windows Vista it's C:\Users\<username>), then delete the postgresql folder under .m2/repository. In Eclipse, right click the project then select Maven -> Update Dependencies. Wait until Maven finishes downloading the library (you can see it in the Progress view), then try running the project again. |
aligh1979
Posts: 121
|
Posted 00:00 Sep 28, 2011 |
I am a little confused , I have setup tomcat 7 in eclipse , and if I were to create a dynamic web project like 320 course , then I have the option to run on server which is tomcat , but when I right click on csns2 project and go to "run as " option then I do have many other options like "4 maven build" , "5 maven build" and ... but there is no option to run on server and when I go to run configuration of this specific project then the drop down list under tomcat has nothing and there is a small red error cross next to it .
|
cysun
Posts: 2935
|
Posted 00:16 Sep 28, 2011 |
You probably didn't install m2e-wtp. Last edited by cysun at
00:27 Sep 28, 2011.
|
aligh1979
Posts: 121
|
Posted 00:51 Sep 28, 2011 |
I made it work to show run on server . thanks . but now it is giving me jdbc driver .
SEVERE: Servlet.service() for servlet [csns2] in context with path [/csns2] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.GenericJDBCException: Cannot open connection; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection] with root cause .................. Last edited by aligh1979 at
01:25 Sep 28, 2011.
|
Vanquish39
Posts: 134
|
Posted 01:04 Sep 28, 2011 |
Error is still there.
I added a dependency manually, still didn't work. Giving me same errors. The postgres jar exists in the postgres folder and in pom.xml. I updated project configuration also. |
Vanquish39
Posts: 134
|
Posted 01:47 Sep 28, 2011 |
ALIGH1979, I have the same problem as you. |
Vanquish39
Posts: 134
|
Posted 03:13 Sep 28, 2011 |
So I went to sleep at 3:30 AM. 2 minutes into sleep, something in my head said, "Tomcat isn't cooperating". Went to eclipse, change the tomcat server from 7.0.21 to 7.0.11, and voila the problem was gone. I also changed from jdk6 to jdk7. I doubt it was the jdk though. Aligh1979, try using Tomcat 7.0.11 instead of the latest version of tomcat7 which is 7.0.21. Thanks Dr. Sun for helping me out. |
cysun
Posts: 2935
|
Posted 09:32 Sep 28, 2011 |
You may not need to downgrade Tomcat. It's possible that the corrupted jar file got "stuck" in the Eclipse work directory. Try cleaning the work directory first. Last edited by cysun at
09:32 Sep 28, 2011.
|
aligh1979
Posts: 121
|
Posted 10:36 Sep 28, 2011 |
I followed the video and deleted the folder . and no success , and I even changed my tomcat version to 7.11 after that , and still no success , it is giving me a 500 error org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
..........
.......... |
cysun
Posts: 2935
|
Posted 11:18 Sep 28, 2011 |
That looks like a different error. Follow the instructions here and see if it fixes the problem. |