DataBase/Postgresql

Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

태하팍 2013. 1. 16. 19:04
반응형


[위의 그림은 본 내용과 무관 합니다..ㅋㅋ YG 걸그룹의 새얼굴 김지수!]

혹은

JNDI lookup for name [database.driver.ClassName] threw NamingException with message: database.driver.ClassName not bound. Returning null.

이런 에러가 났다면...

환경은 Spring3.1 & Jboss & Postgre9.x


C:\Acet\Middleware\jboss-eap-5.1\jboss-as\server\default\deploy
의 postgres-ds.xml 을 열어서...
<datasources> 부분을 수정 하면 된다. 다른 서버이름 데이터베이스이름 등등이 틀렸었다..ㅋㅋ
 <datasources>
  <xa-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <track-connection-by-tx>true</track-connection-by-tx>
    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
    <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
    <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
    <xa-datasource-property name="DatabaseName">postgres</xa-datasource-property>
    <xa-datasource-property name="User">postgres</xa-datasource-property>
    <xa-datasource-property name="Password">acet1004</xa-datasource-property>

위의 부분을 수정하니 잘돌아갔다^-^good~

반응형