Loading ...
Sorry, an error occurred while loading the content.
 

Firebird DataSource connection problem

Expand Messages
  • Rupert Young (Restart)
    I am trying to interface with firebird from the SUN JavaCAPS product through its JDBC adaptor. There are two configuration settings of relevance ClassName,
    Message 1 of 10 , Aug 2, 2007
      I am trying to interface with firebird from the SUN JavaCAPS product through
      its JDBC adaptor.

      There are two configuration settings of relevance

      ClassName, which is typically the datasource/pool class, and
      ClassNameforOtherInterfaces, which is the driver class

      So I have entered,

      ClassName org.firebirdsql.jdbc.FBWrappingDataSource
      ClassNameforOtherIbterfaces org.firebirdsql.jdbc.FBDriver

      However, I get this runtime error
      java.lang.ClassCastException: org.firebirdsql.jdbc.FBWrappingDataSource
      ...
      javax.resource.spi.ResourceAllocationException: Error in allocating a
      connection. Cause: org.firebirdsql.jdbc.FBWrappingDataSource


      Any suggestions of how to resolve this?

      Regards,
      Rupert
    • Roman Rokytskyy
      ... What about switching those two parameters? In both cases that are ClassCastException, so maybe this works. Roman
      Message 2 of 10 , Aug 2, 2007
        > I am trying to interface with firebird from the SUN JavaCAPS product through
        > its JDBC adaptor.
        >
        > There are two configuration settings of relevance
        >
        > ClassName, which is typically the datasource/pool class, and
        > ClassNameforOtherInterfaces, which is the driver class
        >
        > So I have entered,
        >
        > ClassName org.firebirdsql.jdbc.FBWrappingDataSource
        > ClassNameforOtherIbterfaces org.firebirdsql.jdbc.FBDriver
        >
        > However, I get this runtime error
        > java.lang.ClassCastException: org.firebirdsql.jdbc.FBWrappingDataSource
        > ...
        > javax.resource.spi.ResourceAllocationException: Error in allocating a
        > connection. Cause: org.firebirdsql.jdbc.FBWrappingDataSource
        >
        >
        > Any suggestions of how to resolve this?

        What about switching those two parameters? In both cases that are
        ClassCastException, so maybe this works.

        Roman
      • rupertjyoung
        ... Thanks I did try that, but still get a ClassCastException. I assume that what I need is the firebird class which implements
        Message 3 of 10 , Aug 6, 2007
          --- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <rrokytskyy@...>
          wrote:
          > What about switching those two parameters? In both cases that are
          > ClassCastException, so maybe this works.

          Thanks I did try that, but still get a ClassCastException. I assume
          that what I need is the firebird class which implements
          javax.sql.ConnectionPoolDataSource. Is there one?

          Rupert
        • Roman Rokytskyy
          ... org.firebirdsql.pool.FBConnectionPoolDataSource
          Message 4 of 10 , Aug 6, 2007
            rupertjyoung wrote:
            > --- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <rrokytskyy@...>
            > wrote:
            >> What about switching those two parameters? In both cases that are
            >> ClassCastException, so maybe this works.
            >
            > Thanks I did try that, but still get a ClassCastException. I assume
            > that what I need is the firebird class which implements
            > javax.sql.ConnectionPoolDataSource. Is there one?

            org.firebirdsql.pool.FBConnectionPoolDataSource
          • rupertjyoung
            ... Ok, thanks getting further I think. Tried that now am getting the following errors; I have a DriverProperties parameter configured as
            Message 5 of 10 , Aug 6, 2007
              --- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <rrokytskyy@...>
              wrote:
              > org.firebirdsql.pool.FBConnectionPoolDataSource


              Ok, thanks getting further I think.

              Tried that now am getting the following errors; I have a
              DriverProperties parameter configured as
              "setURL#jdbc:firebirdsql:localhost/3050:c:/mtest/pastest.fdb" which I
              presume is the connection string.

              Do these errors mean anything to you?

              [#|2007-08-06T17:34:25.875+0100|SEVERE|IS5.1.3|STC.eWay.jdbcconnector.javax.enterprise.resource.resourceadapter|_ThreadID=15;
              ThreadName=JMS Async S0;
              Context=dpGPDJDBCIHCConnectiv138329734/qGetPatientDemographicsRR_svcGetPatientD_u002D_1034806553_ejb;stacktrace-id=0;|jdbc.exc_create_ds_conn
              org.firebirdsql.jdbc.FBSQLException: Could not obtain connection
              during blocking timeout (5000 ms)
              at
              org.firebirdsql.pool.PooledConnectionQueue.take(PooledConnectionQueue.java:365)
              at
              org.firebirdsql.pool.AbstractConnectionPool.getPooledConnection(AbstractConnectionPool.java:230)



              at org.firebirdsql.gds.GDSException: Connection string missing
              at
              org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl$DbAttachInfo.<init>(AbstractJavaGDSImpl.java:2483)
              at
              org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(AbstractJavaGDSImpl.java:369)
              at
              org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:89)
              at
              org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:470)
              at
              org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.allocateConnection(AbstractFBConnectionPoolDataSource.java:281)
              at
              org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQueue.java:490)
              at
              org.firebirdsql.pool.PooledConnectionQueue.take(PooledConnectionQueue.java:375)
              at
              org.firebirdsql.pool.AbstractConnectionPool.getPooledConnection(AbstractConnectionPool.java:230)
              at
              org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:359)
              at
              org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:379)
              at
              com.stc.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:118)
            • Roman Rokytskyy
              ... It means that it could not obtain a connection. Please note that you have to specify the database property that should be equal to
              Message 6 of 10 , Aug 6, 2007
                > Tried that now am getting the following errors; I have a
                > DriverProperties parameter configured as
                > "setURL#jdbc:firebirdsql:localhost/3050:c:/mtest/pastest.fdb" which I
                > presume is the connection string.
                >
                > Do these errors mean anything to you?

                It means that it could not obtain a connection. Please note that you
                have to specify the "database" property that should be equal to
                "localhost/3050:c:/mtest/pastest.fdb".

                Roman
              • Rupert Young (Restart)
                I am specifying the following parameters, Description - JDBC Connection Pool Datasource ClassName - org.firebirdsql.pool.FBConnectionPoolDataSource
                Message 7 of 10 , Aug 7, 2007
                  I am specifying the following parameters,



                  Description - JDBC Connection Pool Datasource

                  ClassName - org.firebirdsql.pool.FBConnectionPoolDataSource

                  ClassNameforOtherInterfaces - org.firebirdsql.jdbc.FBDriver

                  ServerName - localhost

                  PortNumber - 3050

                  DatabaseName - localhost/3050:c:/mtest/pastest.fdb

                  User - sysdba

                  Password - ****

                  DriverProperties -
                  setURL#jdbc:firebirdsql:localhost/3050:c:/mtest/pastest.fdb

                  Delimiter - #

                  DataSourceName -

                  MinPoolSize - 0

                  MaxPoolSize - 10

                  MaxIdleTime - 0





                  but am now getting this error



                  at org.firebirdsql.jdbc.FBSQLException: GDS Exception. 0. Connection string
                  missing, error code: HY000

                  Reason: Connection string missing

                  at
                  org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.allocateConnection(A
                  bstractFBConnectionPoolDataSource.java:312)

                  at
                  org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQue
                  ue.java:490)

                  at
                  org.firebirdsql.pool.PooledConnectionQueue.take(PooledConnectionQueue.java:3
                  75)

                  at
                  org.firebirdsql.pool.AbstractConnectionPool.getPooledConnection(AbstractConn
                  ectionPool.java:230)

                  at
                  org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(
                  AbstractFBConnectionPoolDataSource.java:359)

                  at
                  org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(
                  AbstractFBConnectionPoolDataSource.java:379)





                  Any other suggestions?



                  Regards,



                  Rupert

                  _____

                  From: Firebird-Java@yahoogroups.com [mailto:Firebird-Java@yahoogroups.com]
                  On Behalf Of Roman Rokytskyy
                  Sent: 06 August 2007 19:58
                  To: Firebird-Java@yahoogroups.com
                  Subject: Re: [Firebird-Java] Re: Firebird DataSource connection problem



                  > Tried that now am getting the following errors; I have a
                  > DriverProperties parameter configured as
                  > "setURL#jdbc:firebirdsql:localhost/3050:c:/mtest/pastest.fdb" which I
                  > presume is the connection string.
                  >
                  > Do these errors mean anything to you?

                  It means that it could not obtain a connection. Please note that you
                  have to specify the "database" property that should be equal to
                  "localhost/3050:c:/mtest/pastest.fdb".

                  Roman





                  [Non-text portions of this message have been removed]
                • Roman Rokytskyy
                  ... We don t have such property ... Same here. ... try Database instead of DatabaseName, if you re forced to use DatabaseName, then you have to switch the
                  Message 8 of 10 , Aug 7, 2007
                    > ServerName - localhost

                    We don't have such property

                    > PortNumber - 3050

                    Same here.

                    > DatabaseName - localhost/3050:c:/mtest/pastest.fdb

                    try Database instead of DatabaseName, if you're forced to use
                    DatabaseName, then you have to switch the class to
                    org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource (see
                    http://jaybirdwiki.firebirdsql.org/jaybird/doku.php?id=config:sun_app_server
                    for more details).

                    Roman
                  • Rupert Young (Restart)
                    I don t have any control over the parameter name unfortunately, so have used DatabaseName as you suggested, but get this error.
                    Message 9 of 10 , Aug 8, 2007
                      I don't have any control over the parameter name unfortunately, so have used
                      DatabaseName as you suggested, but get this error.



                      [#|2007-08-08T12:05:01.031+0100|SEVERE|IS5.1.3|STC.eWay.jdbcconnector.javax.
                      enterprise.resource.resourceadapter|_ThreadID=13; ThreadName=JMS Async
                      S2;stacktrace-id=0;|jdbc.exc_cnfe_ds

                      java.lang.ClassNotFoundException:
                      org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource

                      at
                      com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:699)



                      Regards,



                      Rupert



                      _____

                      From: Firebird-Java@yahoogroups.com [mailto:Firebird-Java@yahoogroups.com]
                      On Behalf Of Roman Rokytskyy
                      Sent: 07 August 2007 19:39
                      To: Firebird-Java@yahoogroups.com
                      Subject: Re: [Firebird-Java] Re: Firebird DataSource connection problem



                      > ServerName - localhost

                      We don't have such property

                      > PortNumber - 3050

                      Same here.

                      > DatabaseName - localhost/3050:c:/mtest/pastest.fdb

                      try Database instead of DatabaseName, if you're forced to use
                      DatabaseName, then you have to switch the class to
                      org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource (see
                      http://jaybirdwiki.
                      <http://jaybirdwiki.firebirdsql.org/jaybird/doku.php?id=config:sun_app_serve
                      r> firebirdsql.org/jaybird/doku.php?id=config:sun_app_server
                      for more details).

                      Roman





                      [Non-text portions of this message have been removed]
                    • Roman Rokytskyy
                      ... Should be either in jaybird-full-2.1.1.jar or jaybird-pool-2.1.1.jar. Please check your installation.
                      Message 10 of 10 , Aug 8, 2007
                        > I don't have any control over the parameter name unfortunately, so have used
                        > DatabaseName as you suggested, but get this error.
                        >
                        >
                        >
                        > [#|2007-08-08T12:05:01.031+0100|SEVERE|IS5.1.3|STC.eWay.jdbcconnector.javax.
                        > enterprise.resource.resourceadapter|_ThreadID=13; ThreadName=JMS Async
                        > S2;stacktrace-id=0;|jdbc.exc_cnfe_ds
                        >
                        > java.lang.ClassNotFoundException:
                        > org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource

                        Should be either in jaybird-full-2.1.1.jar or jaybird-pool-2.1.1.jar.
                        Please check your installation.
                      Your message has been successfully submitted and would be delivered to recipients shortly.