Possible bug in ServerErrorMessage.java

Поиск
Список
Период
Сортировка
От Fedechicco
Тема Possible bug in ServerErrorMessage.java
Дата
Msg-id CAO+LWtxB6UzLkMsSTF2E5WWegcxX2eVB4cWcKSwxwNDgiadnOA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Possible bug in ServerErrorMessage.java  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Hi everbody,

I'm trying to use the postgre jdbc driver with little success.
I keep getting this incomprehensible error message:

org.postgresql.util.PSQLException: Something unusual has occured to
cause the driver to fail. Please report this exception.
    at org.postgresql.Driver.connect(Driver.java:280)
    at java.sql.DriverManager.getConnection(DriverManager.java:620)
    at java.sql.DriverManager.getConnection(DriverManager.java:169)
    at com.moxoff.meshrepository.SQLConnector.getConnection(SQLConnector.java:40)
    at com.moxoff.meshrepository.MeshRepository.<init>(MeshRepository.java:23)
    at com.moxoff.meshrepository.Main.main(Main.java:80)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
    at org.postgresql.util.ServerErrorMessage.<init>(ServerErrorMessage.java:48)
    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:273)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:95)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
    at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:124)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
    at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
    at org.postgresql.Driver.makeConnection(Driver.java:386)
    at org.postgresql.Driver.connect(Driver.java:260)
    ... 5 more

From what I've seen the line 48 and the following are:

while (l_chars[l_pos] != '\0' && l_pos < l_length)
{
         l_pos++;
}

which IMO should be changed in:
while (l_pos < l_length && l_chars[l_pos] != '\0')

cheers,
Fedechicco

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: 9.1 JDBC 4 driver
Следующее
От: Prasanth Reddy
Дата:
Сообщение: Re: 9.1 JDBC 4 driver