Spring Roo JPA MS SQL Server Could not open JPA EntityManager org.hibernate.exception.GenericJDBCException: Could not open connection <p>I am trying to get codes using Spring Roo. I am following the tutorial: spring-roo-1.3.1.RC1/docs/html/beginning.html included at Roo docs. MS SQL Server TCP IP Enabled. The instance is running I try login using IP with MS SQL Management studio 127.0.0.1\sqlserverinstance working</p> <p><a href="https://i.stack.imgur.com/DnRNv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DnRNv.jpg" alt="enter image description here"></a> database.properties contains:</p> <pre><code>#Updated at Tue Oct 27 15:43:39 ICT 2015 #Tue Oct 27 15:43:39 ICT 2015 PFS-015-PC\SQL2012 database.driverClassName=net.sourceforge.jtds.jdbc.Driver database.url=jdbc\:jtds\:sqlserver\://PFS-015-PC\SQL2012\:1433/restful database.username=sa database.password=sql2012 </code></pre> <p>I try to Right Click project and RUN </p> <p><a href="https://i.stack.imgur.com/sYhoM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sYhoM.jpg" alt="RUN"></a></p> <p>This nightmare occured</p> <pre><code> cd C:\Users\mtoha\restful; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_60" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0.2\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install\"" Scanning for projects... ------------------------------------------------------------------------ Building restful 0.1.0.BUILD-SNAPSHOT ------------------------------------------------------------------------ --- maven-clean-plugin:2.4.1:clean (default-clean) @ restful --- Deleting C:\Users\mtoha\restful\target --- aspectj-maven-plugin:1.4:compile (default) @ restful --- advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch] --- aspectj-maven-plugin:1.4:test-compile (default) @ restful --- this affected type is not exposed to the weaver: com.pfs.restful.domain.Faktur [Xlint:typeNotExposedToWeaver] this affected type is not exposed to the weaver: com.pfs.restful.domain.FakturItem [Xlint:typeNotExposedToWeaver] this affected type is not exposed to the weaver: com.pfs.restful.domain.Merchandise [Xlint:typeNotExposedToWeaver] this affected type is not exposed to the weaver: com.pfs.restful.domain.PfsUser [Xlint:typeNotExposedToWeaver] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch] --- maven-resources-plugin:2.6:resources (default-resources) @ restful --- Using 'UTF-8' encoding to copy filtered resources. Copying 4 resources --- maven-compiler-plugin:2.5.1:compile (default-compile) @ restful --- Nothing to compile - all classes are up to date --- maven-resources-plugin:2.6:testResources (default-testResources) @ restful --- Using 'UTF-8' encoding to copy filtered resources. skip non existing resourceDirectory C:\Users\mtoha\restful\src\test\resources --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ restful --- Nothing to compile - all classes are up to date --- maven-surefire-plugin:2.12:test (default-test) @ restful --- Surefire report directory: C:\Users\mtoha\restful\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Results : Tests in error: testFindAllFakturs(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFlush(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testPersist(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMarkerMethod(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindFaktur(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMergeUpdate(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindFakturEntries(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testCountFakturs(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testRemove(com.pfs.restful.domain.FakturIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindAllFakturItems(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFlush(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testPersist(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMarkerMethod(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMergeUpdate(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindFakturItemEntries(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindFakturItem(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testRemove(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testCountFakturItems(com.pfs.restful.domain.FakturItemIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFlush(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testPersist(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMarkerMethod(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testCountMerchandises(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindAllMerchandises(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMergeUpdate(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindMerchandiseEntries(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testRemove(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindMerchandise(com.pfs.restful.domain.MerchandiseIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testCountPfsUsers(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindAllPfsUsers(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFlush(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testPersist(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMarkerMethod(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindPfsUser(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testMergeUpdate(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testFindPfsUserEntries(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection testRemove(com.pfs.restful.domain.PfsUserIntegrationTest): Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection Tests run: 36, Failures: 0, Errors: 36, Skipped: 0 ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 8.153s Finished at: Wed Oct 28 08:58:43 ICT 2015 Final Memory: 14M/278M ------------------------------------------------------------------------ Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project restful: There are test failures. Please refer to C:\Users\mtoha\restful\target\surefire-reports for the individual test results. -&gt; [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException </code></pre> <p><a href="https://i.stack.imgur.com/YqevC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YqevC.jpg" alt="TCP IP Enabled"></a> <a href="https://github.com/khanneddy2013/restful.git" rel="nofollow noreferrer">the code at github</a></p> <p>What I missed?</p>