You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Daiju Kato <dk...@vmail.plala.or.jp> on 2004/02/15 21:34:24 UTC

ESQL with Firebird

Hello all,

Please assist me if you use Firebird.

I try to connect Firebird database with Jaybird JDBC driver.
Even though loading JDBC driver in web.xml, below error is encountered.

  Could not get the datasource 
org.apache.avalon.excalibur.datasource.NoValidConnectionException:
No valid JdbcConnection class available

I use cocoon 2.0.4, Jaybird 1.0.1 and Firebird 1.0.3.

Please let me know if you know why.


xsp file:

    <content>
     <esql:connection>
     <esql:pool>personnel</esql:pool>
        <esql:execute-query>
        <esql:query>select * from ZIPCODE</esql:query>
        <esql:results>
           <table>
              <esql:row-results>
                 <tr>
                 <td><esql:get-string column="ZIPCODE"/></td>
                 <td><esql:get-string column="CITY"/></td>
                 <td><esql:get-string column="STREET"/></td>
                 </tr>
              </esql:row-results>
            </table>
        </esql:results>
        <esql:no-results>
          <p>no results were found</p>
        </esql:no-results>
        <esql:error-results>
          <p><esql:get-message/></p>
          <p><esql:get-stacktrace/></p>
        </esql:error-results>
      </esql:execute-query>
      </esql:connection>
    </content>
   </page>
</xsp:page>

cocoon.xconf:
   <datasources>
     <jdbc logger="core.datasources.personnel" name="personnel">
       <pool-controller max="10" min="5"/>

       <auto-commit>false</auto-commit>

       <dburl>jdbc:firebirdsql:localhost/3050:c:\\data\\zipcode.gdb?lc_ctype=sjis_0208</dburl>
       <user>SYSDBA</user>
       <password>masterkey</password>
     </jdbc>
   </datasources>


Thanks.

Daiju Kato
e-mail:dkato@vmail.plala.or.jp 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: ESQL with Firebird

Posted by Carlos Chávez <cc...@agssa.net>.
Daiju Kato Escribio :-)
> Carlos,
>
>>   i think you do not have declare the class name of the driver
>>   in web.xml.
>
> I have already set class name in web.xml.
> Please let me know if you know anything for the problem.
>
> thanks.

  Well i do not remember any problem more.

  Try to see if the connection is open for the server of firebird
  i remember what the firebird show an icon in the task bar of
  windows.

 Another thing i remember is in the SQL, we need put double quote in the
 name of field or tables, something like this: select * from "ZIPCODE"
 the if you use XSP you need use \" in the SQL: select * from \"ZIPCODE\"

 Cheers,

 Carlos Chávez.

>
> Daiju Kato Escribio :-)
>  > Hello all,
>  >
>  > Please assist me if you use Firebird.
>  >
>  > I try to connect Firebird database with Jaybird JDBC driver.
>  > Even though loading JDBC driver in web.xml, below error is encountered.
>  >
>  >   Could not get the datasource
>  > org.apache.avalon.excalibur.datasource.NoValidConnectionException:
>  > No valid JdbcConnection class available
>
>
>    Hi, Daiju.
>
>
>    i think you do not have declare the class name of the driver
>    in web.xml.
>
>
>    for example:
>
>
>    for postgres is something like this:
>
>
>      <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>             org.postgresql.Driver
>        </param-value>
>      </init-param>
>
>
>    i think for firebird it's org.firebirdsql.jdbc.FBDriver.
>
>
>    i remember you need put the file firebirdsql-full.jar in
>    ../WEB-INF/lib of you servlet.
>
>
>    Cheers,
>
>
> --
> Carlos Ch$BaW(Bez
>
>
>  >
>  > I use cocoon 2.0.4, Jaybird 1.0.1 and Firebird 1.0.3.
>  >
>  > Please let me know if you know why.
>  >
>  >
>  > xsp file:
>  >
>  >     <content>
>  >      <esql:connection>
>  >      <esql:pool>personnel</esql:pool>
>  >         <esql:execute-query>
>  >         <esql:query>select * from ZIPCODE</esql:query>
>  >         <esql:results>
>  >            <table>
>  >               <esql:row-results>
>  >                  <tr>
>  >                  <td><esql:get-string column="ZIPCODE"/></td>
>  >                  <td><esql:get-string column="CITY"/></td>
>  >                  <td><esql:get-string column="STREET"/></td>
>  >                  </tr>
>  >               </esql:row-results>
>  >             </table>
>  >         </esql:results>
>  >         <esql:no-results>
>  >           <p>no results were found</p>
>  >         </esql:no-results>
>  >         <esql:error-results>
>  >           <p><esql:get-message/></p>
>  >           <p><esql:get-stacktrace/></p>
>  >         </esql:error-results>
>  >       </esql:execute-query>
>  >       </esql:connection>
>  >     </content>
>  >    </page>
>  > </xsp:page>
>  >
>  > cocoon.xconf:
>  >    <datasources>
>  >      <jdbc logger="core.datasources.personnel" name="personnel">
>  >        <pool-controller max="10" min="5"/>
>  >
>  >        <auto-commit>false</auto-commit>
>  >
>  >
> <dburl>jdbc:firebirdsql:localhost/3050:c:\\data\\zipcode.gdb?lc_ctype=sjis_0208</dburl>
>  >        <user>SYSDBA</user>
>  >        <password>masterkey</password>
>  >      </jdbc>
>  >    </datasources>
>
>
> Daiju
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


-- 
Carlos Chávez

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: ESQL with Firebird

Posted by Daiju Kato <dk...@vmail.plala.or.jp>.
Carlos,

>   i think you do not have declare the class name of the driver
>   in web.xml.

I have already set class name in web.xml.
Please let me know if you know anything for the problem.

thanks.

Daiju Kato Escribio :-)
 > Hello all,
 >
 > Please assist me if you use Firebird.
 >
 > I try to connect Firebird database with Jaybird JDBC driver.
 > Even though loading JDBC driver in web.xml, below error is encountered.
 >
 >   Could not get the datasource
 > org.apache.avalon.excalibur.datasource.NoValidConnectionException:
 > No valid JdbcConnection class available


   Hi, Daiju.


   i think you do not have declare the class name of the driver
   in web.xml.


   for example:


   for postgres is something like this:


     <init-param>
       <param-name>load-class</param-name>
       <param-value>
            org.postgresql.Driver
       </param-value>
     </init-param>


   i think for firebird it's org.firebirdsql.jdbc.FBDriver.


   i remember you need put the file firebirdsql-full.jar in
   ../WEB-INF/lib of you servlet.


   Cheers,


--
Carlos Ch疱ez


 >
 > I use cocoon 2.0.4, Jaybird 1.0.1 and Firebird 1.0.3.
 >
 > Please let me know if you know why.
 >
 >
 > xsp file:
 >
 >     <content>
 >      <esql:connection>
 >      <esql:pool>personnel</esql:pool>
 >         <esql:execute-query>
 >         <esql:query>select * from ZIPCODE</esql:query>
 >         <esql:results>
 >            <table>
 >               <esql:row-results>
 >                  <tr>
 >                  <td><esql:get-string column="ZIPCODE"/></td>
 >                  <td><esql:get-string column="CITY"/></td>
 >                  <td><esql:get-string column="STREET"/></td>
 >                  </tr>
 >               </esql:row-results>
 >             </table>
 >         </esql:results>
 >         <esql:no-results>
 >           <p>no results were found</p>
 >         </esql:no-results>
 >         <esql:error-results>
 >           <p><esql:get-message/></p>
 >           <p><esql:get-stacktrace/></p>
 >         </esql:error-results>
 >       </esql:execute-query>
 >       </esql:connection>
 >     </content>
 >    </page>
 > </xsp:page>
 >
 > cocoon.xconf:
 >    <datasources>
 >      <jdbc logger="core.datasources.personnel" name="personnel">
 >        <pool-controller max="10" min="5"/>
 >
 >        <auto-commit>false</auto-commit>
 >
 > 
<dburl>jdbc:firebirdsql:localhost/3050:c:\\data\\zipcode.gdb?lc_ctype=sjis_0208</dburl>
 >        <user>SYSDBA</user>
 >        <password>masterkey</password>
 >      </jdbc>
 >    </datasources>


Daiju 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: ESQL with Firebird

Posted by Carlos Chávez <cc...@agsoftware.dnsalias.com>.
Daiju Kato Escribio :-)
> Hello all,
>
> Please assist me if you use Firebird.
>
> I try to connect Firebird database with Jaybird JDBC driver.
> Even though loading JDBC driver in web.xml, below error is encountered.
>
>   Could not get the datasource
> org.apache.avalon.excalibur.datasource.NoValidConnectionException:
> No valid JdbcConnection class available

  Hi, Daiju.

  i think you do not have declare the class name of the driver
  in web.xml.

  for example:

  for postgres is something like this:

    <init-param>
      <param-name>load-class</param-name>
      <param-value>
           org.postgresql.Driver
      </param-value>
    </init-param>

  i think for firebird it's org.firebirdsql.jdbc.FBDriver.

  i remember you need put the file firebirdsql-full.jar in
  ../WEB-INF/lib of you servlet.

  Cheers,

-- 
Carlos Chávez

>
> I use cocoon 2.0.4, Jaybird 1.0.1 and Firebird 1.0.3.
>
> Please let me know if you know why.
>
>
> xsp file:
>
>     <content>
>      <esql:connection>
>      <esql:pool>personnel</esql:pool>
>         <esql:execute-query>
>         <esql:query>select * from ZIPCODE</esql:query>
>         <esql:results>
>            <table>
>               <esql:row-results>
>                  <tr>
>                  <td><esql:get-string column="ZIPCODE"/></td>
>                  <td><esql:get-string column="CITY"/></td>
>                  <td><esql:get-string column="STREET"/></td>
>                  </tr>
>               </esql:row-results>
>             </table>
>         </esql:results>
>         <esql:no-results>
>           <p>no results were found</p>
>         </esql:no-results>
>         <esql:error-results>
>           <p><esql:get-message/></p>
>           <p><esql:get-stacktrace/></p>
>         </esql:error-results>
>       </esql:execute-query>
>       </esql:connection>
>     </content>
>    </page>
> </xsp:page>
>
> cocoon.xconf:
>    <datasources>
>      <jdbc logger="core.datasources.personnel" name="personnel">
>        <pool-controller max="10" min="5"/>
>
>        <auto-commit>false</auto-commit>
>
>        <dburl>jdbc:firebirdsql:localhost/3050:c:\\data\\zipcode.gdb?lc_ctype=sjis_0208</dburl>
>        <user>SYSDBA</user>
>        <password>masterkey</password>
>      </jdbc>
>    </datasources>
>
>
> Thanks.
>
> Daiju Kato
> e-mail:dkato@vmail.plala.or.jp
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: ESQL with Firebird

Posted by Daiju Kato <dk...@vmail.plala.or.jp>.
Hi Rob,

I put JDBC driver at Tomcat/common/endorsed. But situation is same.
And I update JDBC driver to Jaybird 1.5 Beta 3.
I encounter same error.

ERROR   (2004-02-17) 00:28.35:926   [core.manager] 
(/cocoonSimpleESQLSample/ESQLSample.html) Thread-7/ESQLSample_xsp: Could 
not get the datasource
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid 
JdbcConnection class available
	at 
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(JdbcConnectionFactory.java:164)
	at 
org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLimitingPool.java:629)
	at 
org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(ValidatedResourceLimitingPool.java:136)
	at 
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.newPoolable(ResourceLimitingJdbcConnectionPool.java:79)
	at 
org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPool.java:359)
	at 
org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(ValidatedResourceLimitingPool.java:88)
	at 
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getConnection(ResourceLimitingJdbcDataSource.java:174)
	at 
org.apache.cocoon.www.ESQLSample_xsp.generate(C:\eclipse\workspace\cocoonSimpleESQLSample\work\org\apache\jsp\cocoon-files\org/apache/cocoon/www\ESQLSample_xsp.java:349)
	at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:258)
	at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
	at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
	at 
org.apache.cocoon.www.sitemap_xmap.matchN1003C(C:\eclipse\workspace\cocoonSimpleESQLSample\work\org\apache\jsp\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:508)
	at 
org.apache.cocoon.www.sitemap_xmap.process(C:\eclipse\workspace\cocoonSimpleESQLSample\work\org\apache\jsp\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:417)
	at 
org.apache.cocoon.www.sitemap_xmap.process(C:\eclipse\workspace\cocoonSimpleESQLSample\work\org\apache\jsp\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:363)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
	at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:536)
ERROR   (2004-02-17) 00:28.35:946   [sitemap] 
(/cocoonSimpleESQLSample/ESQLSample.html) Thread-7/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get 
the datasource 
org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid 
JdbcConnection class available
.....


Thanks.

Daiju
===================================================
Daiju Kato
Technical Writer
e-mail:dkato@vmail.plala.or.jp
===================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: ESQL with Firebird

Posted by Rob Gregory <Mi...@RosesGroup.com>.
If you are using Tomcat/Catlina try putting the jdbc driver in
catalina/common/endorsed this may help? If not post more information.

Rob

-----Original Message-----
From: Daiju Kato [mailto:dkato@vmail.plala.or.jp] 
Sent: 15 February 2004 20:34
To: users@cocoon.apache.org
Subject: ESQL with Firebird


Hello all,

Please assist me if you use Firebird.

I try to connect Firebird database with Jaybird JDBC driver.
Even though loading JDBC driver in web.xml, below error is encountered.

  Could not get the datasource 
org.apache.avalon.excalibur.datasource.NoValidConnectionException:
No valid JdbcConnection class available

I use cocoon 2.0.4, Jaybird 1.0.1 and Firebird 1.0.3.

Please let me know if you know why.


xsp file:

    <content>
     <esql:connection>
     <esql:pool>personnel</esql:pool>
        <esql:execute-query>
        <esql:query>select * from ZIPCODE</esql:query>
        <esql:results>
           <table>
              <esql:row-results>
                 <tr>
                 <td><esql:get-string column="ZIPCODE"/></td>
                 <td><esql:get-string column="CITY"/></td>
                 <td><esql:get-string column="STREET"/></td>
                 </tr>
              </esql:row-results>
            </table>
        </esql:results>
        <esql:no-results>
          <p>no results were found</p>
        </esql:no-results>
        <esql:error-results>
          <p><esql:get-message/></p>
          <p><esql:get-stacktrace/></p>
        </esql:error-results>
      </esql:execute-query>
      </esql:connection>
    </content>
   </page>
</xsp:page>

cocoon.xconf:
   <datasources>
     <jdbc logger="core.datasources.personnel" name="personnel">
       <pool-controller max="10" min="5"/>

       <auto-commit>false</auto-commit>

 
<dburl>jdbc:firebirdsql:localhost/3050:c:\\data\\zipcode.gdb?lc_ctype=sj
is_0208</dburl>
       <user>SYSDBA</user>
       <password>masterkey</password>
     </jdbc>
   </datasources>


Thanks.

Daiju Kato
e-mail:dkato@vmail.plala.or.jp 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org