0
netbeans를 postgreSQL에 연결하려고합니다. 그러나 내 사용자 이름과 암호가 맞더라도 연결 오류가 발생합니다. 다음 코드는 내 persistence.xml입니다. 도와 줄수있으세요?PostgreSQL Java 인증 오류
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="travelling" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>com.travelling.entity.CbrCase</class>
<class>com.travelling.entity.CbrCaseAttraction</class>
<class>com.travelling.entity.CbrAttractionXCategory</class>
<class>com.travelling.entity.CbrCategory</class>
<class>com.travelling.entity.CbrAttraction</class>
<class>com.travelling.entity.CbrCaseXCategory</class>
<class>com.travelling.entity.CbrDay</class>
<class>com.travelling.entity.CbrDayXAttraction</class>
<class>com.travelling.entity.CbrAttractionXAttraction</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/travelling"/>
<property name="hibernate.connection.username" value="*****"/>
<property name="hibernate.connection.password" value="*****"/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
는이 오류입니다 :
Internal Exception: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
와 나는 데이터베이스에 동일한 비밀번호를 사용하여 로그인 할 수 있기 때문에 비밀번호가 정확한지 확신합니다.
Postgres가 "* password authentication failed *"라고 말하면 비밀번호가 정확하지 않다고 확신 할 수 있습니다. –
그러나 나는 postgre의 응용 프로그램에서 데이터베이스에 로그인하는 데 동일한 암호를 사용할 수 있으며 오류가 발생하지 않습니다. – user2279774
다른 서버가 아닌 * 컴퓨터에서 실행중인 데이터베이스에 로그인 하시겠습니까? –