You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by t rajesh <it...@yahoo.co.in> on 2006/12/11 18:26:19 UTC

Problem with postgresql JdbcAdapter

Hi,
   
      I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give 
   
  Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:382)
        at org.postgresql.Driver.connect(Driver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:525)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
   
   
   
  //Rajesh

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Problem with postgresql JdbcAdapter

Posted by Guillaume Nodet <gn...@gmail.com>.
I guess you did not change the call to getConnection in the
getExchangeCount method.

You should define a method in the JdbcAuditor

protected Connection getConnection() {
  if (userName != null) {
    return dataSource.getConnection(userName, password);
  } else {
    return dataSource.getConnection();
  }
}

Then, change all calls to dataSource.getConnection() by a call
to getConnection().  It should work.

On 12/12/06, t rajesh <it...@yahoo.co.in> wrote:
> Hi,
>
>   i have created username and password properties in the jdbcauditor class but when am starting the servicemix  am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
>
>   Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
>         at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
>         at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
>         at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
>         at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
>         ... 25 more
> Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
>         at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
>         ... 34 more
> Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
>         at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
>         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
>         at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
>         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
>         at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
>         at org.postgresql.Driver.makeConnection(Driver.java:382)
>         at org.postgresql.Driver.connect(Driver.java:260)
>         at java.sql.DriverManager.getConnection(DriverManager.java:525)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
>         at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
>         at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
>         ... 34 more
>
>
>
>   //Rajesh
>
> Guillaume Nodet <gn...@gmail.com> wrote:
>   This is currently not supported, though it should be easy
> to add these properties to the JdbcAuditor class and
> use the
> dataSource.getConnection(user, password)
> call instead of the current one if these properties are set.
>
> Could you raise a JIRA and attach a patch please ?
>
> On 12/11/06, t rajesh wrote:
> > Hi,
> >
> > I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
> >
> > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > at org.postgresql.Driver.connect(Driver.java:260)
> > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> >
> >
> >
> > //Rajesh
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
>
> ---------------------------------
>  Find out what India is talking about on  - Yahoo! Answers India
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with postgresql JdbcAdapter

Posted by t rajesh <it...@yahoo.co.in>.
Thank you its working fine..............

Guillaume Nodet <gn...@gmail.com> wrote:  You need to start the auditor, either by changing the autoStart attribute
value to "true", or by using a JMX console to do that at runtime.

On 12/12/06, t rajesh wrote:
> yes you are right, no need if we provide username and password to datasource.
> but why it was not log any messages when i run wsdl-first example, do we need provide some more configurations........
>
> Guillaume Nodet wrote:
> Sounds weird.
> I don't really see why you need to set username / password
> on both the dataSource and jdbcAuditor.
> If you can configure it in the dataSource, it should be sufficient
> without modifying the current code at all.
>
> On 12/12/06, t rajesh wrote:
> > I fixed it, as follows
> >
> >
> >
> >
>
>
> >
>
>
> >
>
>
> >
> >
> > postgres
> > ZAQ!
> >
> >
> >
> > t rajesh wrote:
> > Hi,
> >
> > i have created username and password properties in the jdbcauditor class but when am starting the servicemix am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
> >
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:585)
> > at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
> > at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
> > ... 25 more
> > Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
> > at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
> > ... 34 more
> > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > at org.postgresql.Driver.connect(Driver.java:260)
> > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> > at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
> > ... 34 more
> >
> >
> >
> > //Rajesh
> >
> > Guillaume Nodet wrote:
> > This is currently not supported, though it should be easy
> > to add these properties to the JdbcAuditor class and
> > use the
> > dataSource.getConnection(user, password)
> > call instead of the current one if these properties are set.
> >
> > Could you raise a JIRA and attach a patch please ?
> >
> > On 12/11/06, t rajesh wrote:
> > > Hi,
> > >
> > > I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
> > >
> > > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > > at org.postgresql.Driver.connect(Driver.java:260)
> > > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> > >
> > >
> > >
> > > //Rajesh
> > >
> > >
> > > ---------------------------------
> > > Find out what India is talking about on - Yahoo! Answers India
> > > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet


 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Problem with postgresql JdbcAdapter

Posted by Guillaume Nodet <gn...@gmail.com>.
You need to start the auditor, either by changing the autoStart attribute
value to "true", or by using a JMX console to do that at runtime.

On 12/12/06, t rajesh <it...@yahoo.co.in> wrote:
> yes you are right, no need if we provide username and password to datasource.
>   but why it was not log any messages when i run wsdl-first  example, do we need provide some more configurations........
>
> Guillaume Nodet <gn...@gmail.com> wrote:
>   Sounds weird.
> I don't really see why you need to set username / password
> on both the dataSource and jdbcAuditor.
> If you can configure it in the dataSource, it should be sufficient
> without modifying the current code at all.
>
> On 12/12/06, t rajesh wrote:
> > I fixed it, as follows
> >
> >
> >
> >
>
>
> >
>
>
> >
>
>
> >
> >
> > postgres
> > ZAQ!
> >
> >
> >
> > t rajesh wrote:
> > Hi,
> >
> > i have created username and password properties in the jdbcauditor class but when am starting the servicemix am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
> >
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:585)
> > at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
> > at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
> > at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
> > ... 25 more
> > Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
> > at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
> > ... 34 more
> > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > at org.postgresql.Driver.connect(Driver.java:260)
> > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> > at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
> > ... 34 more
> >
> >
> >
> > //Rajesh
> >
> > Guillaume Nodet wrote:
> > This is currently not supported, though it should be easy
> > to add these properties to the JdbcAuditor class and
> > use the
> > dataSource.getConnection(user, password)
> > call instead of the current one if these properties are set.
> >
> > Could you raise a JIRA and attach a patch please ?
> >
> > On 12/11/06, t rajesh wrote:
> > > Hi,
> > >
> > > I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
> > >
> > > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > > at org.postgresql.Driver.connect(Driver.java:260)
> > > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> > >
> > >
> > >
> > > //Rajesh
> > >
> > >
> > > ---------------------------------
> > > Find out what India is talking about on - Yahoo! Answers India
> > > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
>
> ---------------------------------
>  Find out what India is talking about on  - Yahoo! Answers India
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with postgresql JdbcAdapter

Posted by t rajesh <it...@yahoo.co.in>.
yes you are right, no need if we provide username and password to datasource.
  but why it was not log any messages when i run wsdl-first  example, do we need provide some more configurations........

Guillaume Nodet <gn...@gmail.com> wrote:
  Sounds weird.
I don't really see why you need to set username / password
on both the dataSource and jdbcAuditor.
If you can configure it in the dataSource, it should be sufficient
without modifying the current code at all.

On 12/12/06, t rajesh wrote:
> I fixed it, as follows
> 
> 
> 
> 


> 


> 


> 
> 
> postgres
> ZAQ!
> 
>
>
> t rajesh wrote:
> Hi,
>
> i have created username and password properties in the jdbcauditor class but when am starting the servicemix am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
>
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
> at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
> at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
> at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
> at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
> ... 25 more
> Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
> at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
> ... 34 more
> Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> at org.postgresql.Driver.makeConnection(Driver.java:382)
> at org.postgresql.Driver.connect(Driver.java:260)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
> ... 34 more
>
>
>
> //Rajesh
>
> Guillaume Nodet wrote:
> This is currently not supported, though it should be easy
> to add these properties to the JdbcAuditor class and
> use the
> dataSource.getConnection(user, password)
> call instead of the current one if these properties are set.
>
> Could you raise a JIRA and attach a patch please ?
>
> On 12/11/06, t rajesh wrote:
> > Hi,
> >
> > I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
> >
> > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > at org.postgresql.Driver.connect(Driver.java:260)
> > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> >
> >
> >
> > //Rajesh
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet


 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Problem with postgresql JdbcAdapter

Posted by Guillaume Nodet <gn...@gmail.com>.
Sounds weird.
I don't really see why you need to set username / password
on both the dataSource and jdbcAuditor.
If you can configure it in the dataSource, it should be sufficient
without modifying the current code at all.

On 12/12/06, t rajesh <it...@yahoo.co.in> wrote:
> I fixed it, as follows
>   <audit:jdbcAuditor container="#jbi" autoStart="false">
>       <audit:dataSource>
>         <bean class="org.postgresql.jdbc2.optional.SimpleDataSource">
>           <property name="databaseName" value="servicemixDB" />
>           <property name="user" value="postgres" />
>           <property name="password" value="ZAQ!" />
>         </bean>
>       </audit:dataSource>
>       <audit:username>postgres</audit:username>
>       <audit:password>ZAQ!</audit:password>
>   </audit:jdbcAuditor>
>
>
> t rajesh <it...@yahoo.co.in> wrote:
>   Hi,
>
> i have created username and password properties in the jdbcauditor class but when am starting the servicemix am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
>
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
> at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
> at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
> at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
> at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
> ... 25 more
> Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
> at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
> ... 34 more
> Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> at org.postgresql.Driver.makeConnection(Driver.java:382)
> at org.postgresql.Driver.connect(Driver.java:260)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
> ... 34 more
>
>
>
> //Rajesh
>
> Guillaume Nodet wrote:
> This is currently not supported, though it should be easy
> to add these properties to the JdbcAuditor class and
> use the
> dataSource.getConnection(user, password)
> call instead of the current one if these properties are set.
>
> Could you raise a JIRA and attach a patch please ?
>
> On 12/11/06, t rajesh wrote:
> > Hi,
> >
> > I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
> >
> > Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> > at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> > at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> > at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> > at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> > at org.postgresql.Driver.makeConnection(Driver.java:382)
> > at org.postgresql.Driver.connect(Driver.java:260)
> > at java.sql.DriverManager.getConnection(DriverManager.java:525)
> > at java.sql.DriverManager.getConnection(DriverManager.java:171)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> > at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
> >
> >
> >
> > //Rajesh
> >
> >
> > ---------------------------------
> > Find out what India is talking about on - Yahoo! Answers India
> > Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>
>
> ---------------------------------
>  Find out what India is talking about on  - Yahoo! Answers India
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with postgresql JdbcAdapter

Posted by t rajesh <it...@yahoo.co.in>.
I fixed it, as follows
  <audit:jdbcAuditor container="#jbi" autoStart="false">
      <audit:dataSource> 
        <bean class="org.postgresql.jdbc2.optional.SimpleDataSource">
          <property name="databaseName" value="servicemixDB" />
          <property name="user" value="postgres" />
          <property name="password" value="ZAQ!" />
        </bean>
      </audit:dataSource> 
      <audit:username>postgres</audit:username>
      <audit:password>ZAQ!</audit:password>
  </audit:jdbcAuditor>
  

t rajesh <it...@yahoo.co.in> wrote:
  Hi,

i have created username and password properties in the jdbcauditor class but when am starting the servicemix am getting the follwoing exception, but it created table sm_audit in the servicemixDB.

Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
... 25 more
Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
... 34 more
Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:382)
at org.postgresql.Driver.connect(Driver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
... 34 more



//Rajesh

Guillaume Nodet wrote:
This is currently not supported, though it should be easy
to add these properties to the JdbcAuditor class and
use the
dataSource.getConnection(user, password)
call instead of the current one if these properties are set.

Could you raise a JIRA and attach a patch please ?

On 12/11/06, t rajesh wrote:
> Hi,
>
> I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
>
> Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> at org.postgresql.Driver.makeConnection(Driver.java:382)
> at org.postgresql.Driver.connect(Driver.java:260)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
>
>
>
> //Rajesh
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet



---------------------------------
Find out what India is talking about on - Yahoo! Answers India 
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Problem with postgresql JdbcAdapter

Posted by t rajesh <it...@yahoo.co.in>.
Hi,
   
  i have created username and password properties in the jdbcauditor class but when am starting the servicemix  am getting the follwoing exception, but it created table sm_audit in the servicemixDB.
   
  Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
        at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1132)
        at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
        at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
        at org.apache.servicemix.jbi.management.BaseStandardMBean.buildAttributes(BaseStandardMBean.java:538)
        ... 25 more
Caused by: org.apache.servicemix.jbi.audit.AuditorException: Could not retrieve exchange count
        at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:215)
        ... 34 more
Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:382)
        at org.postgresql.Driver.connect(Driver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:525)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
        at org.apache.servicemix.jbi.audit.jdbc.JdbcAuditor.getExchangeCount(JdbcAuditor.java:212)
        ... 34 more
   
   
   
  //Rajesh

Guillaume Nodet <gn...@gmail.com> wrote:
  This is currently not supported, though it should be easy
to add these properties to the JdbcAuditor class and
use the
dataSource.getConnection(user, password)
call instead of the current one if these properties are set.

Could you raise a JIRA and attach a patch please ?

On 12/11/06, t rajesh wrote:
> Hi,
>
> I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
>
> Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
> at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
> at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:125)
> at org.postgresql.jdbc2.Jdbc2Connection.(Jdbc2Connection.java:24)
> at org.postgresql.Driver.makeConnection(Driver.java:382)
> at org.postgresql.Driver.connect(Driver.java:260)
> at java.sql.DriverManager.getConnection(DriverManager.java:525)
> at java.sql.DriverManager.getConnection(DriverManager.java:171)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
> at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
>
>
>
> //Rajesh
>
>
> ---------------------------------
> Find out what India is talking about on - Yahoo! Answers India
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet


 				
---------------------------------
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

Re: Problem with postgresql JdbcAdapter

Posted by Guillaume Nodet <gn...@gmail.com>.
This is currently not supported, though it should be easy
to add these properties to the JdbcAuditor class and
use the
  dataSource.getConnection(user, password)
call instead of the current one if these properties are set.

Could you raise a JIRA and attach a patch please ?

On 12/11/06, t rajesh <it...@yahoo.co.in> wrote:
> Hi,
>
>       I have configured postgresql as my message audit database, but am getting the following exception, i f i want to specify the username where i have to give
>
>   Caused by: org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet
>         at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
>         at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
>         at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
>         at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
>         at org.postgresql.jdbc2.Jdbc2Connection.<init>(Jdbc2Connection.java:24)
>         at org.postgresql.Driver.makeConnection(Driver.java:382)
>         at org.postgresql.Driver.connect(Driver.java:260)
>         at java.sql.DriverManager.getConnection(DriverManager.java:525)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
>         at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:65)
>
>
>
>   //Rajesh
>
>
> ---------------------------------
>  Find out what India is talking about on  - Yahoo! Answers India
>  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
>


-- 
Cheers,
Guillaume Nodet