Failed to connect to postgresql database using spring roo, eclipse, gwt and hibernate

I am just starting to use Roo and am very excited about the opportunity. However, I am having problems connecting to my postgresql database. I searched their forum and the Internet without solving the problem. Here is my environment:

  • Eclipse 3.6.1
  • GWT 2.1.1
  • SpringSource Tool Suite 2.5.2.RELEASE
  • Spring Roo 1.1.1.RELEASE
  • PostgreSQL Database v.8.3.11

The steps that I took: - Created a new Spring Roo project from Spring Dashboard - The roo shell is open and done:

persistence setup --provider HIBERNATE --database POSTGRES
  • Opened the database.properties file and added:

- username - password --url

  • return to the roo shell and execute:

    introspect database --schema no-schema-required

This led to a dialog with add-ins available for postgresql performed:

addon install id --searchResultId 01

roo returned:

Target resource(s):
-------------------
spring-roo-postgres-jdbc4-wrapper (9.0.0.801_jdbc4_0001)

Deploying...done.

, introspect , :

database introspect --schema unable-to-obtain-connection

, JDBC 'org.postgresql.Driver'

, , , . SSL, URL- :

jdbc:postgresql://10.104.0.41:5432/mydb?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory

database.properties:

database.driverClassName=org.postgresql.Driver
database.url=jdbc\:postgresql\://10.104.0.41\:5432/mydb
database.username=xxx
database.password=...
ssl=true
sslfactory=org.postgresql.ssl.NonValidatingFactory

\ , URL-. , , . , - , roo1.1.1.RELEASE, - - . roo1.1.2.BUILD-SNAPSHOT , NPE, introspect. SpringSource Tool Suite, .m2 roo1.1.1, , . , , . , eclipse URL- . , roo hibernate. Derby roo.

,

+3
2

, . , :

addon install id --searchResultId 02

9.0.801.0001 Postgres - , Postgre.

+1

"roo", , roo.

, JDBC 'org.postgresql.Driver'

, JDBC- JAR . , (JDBC 4, ) . maven, ( ):

<dependency>
    <groupId>postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>...</version>
</dependency>
0

Source: https://habr.com/ru/post/1789856/


All Articles