You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gianluca Sartori <g....@elis.org> on 2003/10/15 11:15:19 UTC

Trouble connecting to MS SQL Server

Hi,

	I have two problems in trying to connect to a MS SQL Server. The first
is a configuration problem:

I configured cocoon.xconf modifing the existing "hb_pool" connection as
follow:

   <jdbc name="hb_pool">      
     <pool-controller min="5" max="10"/>
     <dburl>jdbc:microsoft:sqlserver://sql.elis.org:1433</dburl>  
     <user>DatabaseUser</user>
     <password>[passwd]</password>
   </jdbc>

the xsp from which i use the connection is (the incriminated part only):

<esql:connection>
       <esql:pool>hb_pool</esql:pool>

With this configuration the connection works (okay, it gives me an
exception, but it's SQL Server talking). Trying to modify the jdbc name
in both files, cocoon gives me the following error:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
get the datasource
org.apache.avalon.framework.component.ComponentException: datasources:
ComponentSelector could not find the component for hint [hb_pool] (key
[hb_pool])

Now, why is it still concerning about "hb_pool" while the connection
name I used is different? Are there any other referencies somewhere I
don't know to this name?


The second problem is the exception returned by the SQL Server. Leaving
the "hb_pool" name as it is and using it in the <esql:connection> i get
this message (and only this, the rest of the page is blank):

Cocoon  [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid
object name 'srv_trans'.

What's it? I never mentioned "srv_trans" in the query I'm trying to
execute.

Thanks for any kind of help,
Gianluca


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


Re: Trouble connecting to MS SQL Server

Posted by iyy <iy...@apparelxml.net>.
check wiki cocoon site there is an article on the subject
----- Original Message ----- 
From: "Gianluca Sartori" <g....@elis.org>
To: <us...@cocoon.apache.org>
Sent: Wednesday, October 15, 2003 2:45 PM
Subject: Trouble connecting to MS SQL Server


> Hi,
> 
> I have two problems in trying to connect to a MS SQL Server. The first
> is a configuration problem:
> 
> I configured cocoon.xconf modifing the existing "hb_pool" connection as
> follow:
> 
>    <jdbc name="hb_pool">      
>      <pool-controller min="5" max="10"/>
>      <dburl>jdbc:microsoft:sqlserver://sql.elis.org:1433</dburl>  
>      <user>DatabaseUser</user>
>      <password>[passwd]</password>
>    </jdbc>
> 
> the xsp from which i use the connection is (the incriminated part only):
> 
> <esql:connection>
>        <esql:pool>hb_pool</esql:pool>
> 
> With this configuration the connection works (okay, it gives me an
> exception, but it's SQL Server talking). Trying to modify the jdbc name
> in both files, cocoon gives me the following error:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
> get the datasource
> org.apache.avalon.framework.component.ComponentException: datasources:
> ComponentSelector could not find the component for hint [hb_pool] (key
> [hb_pool])
> 
> Now, why is it still concerning about "hb_pool" while the connection
> name I used is different? Are there any other referencies somewhere I
> don't know to this name?
> 
> 
> The second problem is the exception returned by the SQL Server. Leaving
> the "hb_pool" name as it is and using it in the <esql:connection> i get
> this message (and only this, the rest of the page is blank):
> 
> Cocoon  [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid
> object name 'srv_trans'.
> 
> What's it? I never mentioned "srv_trans" in the query I'm trying to
> execute.
> 
> Thanks for any kind of help,
> Gianluca
> 
> 
> ---------------------------------------------------------------------
> 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: Trouble connecting to MS SQL Server

Posted by Frank Taffelt <fr...@interface-business.de>.
see http://wiki.cocoondev.org/Wiki.jsp?page=MsSQL

or you could use the jtds driver http://jtds.sourceforge.net/

hth,
Frank

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


Re: Trouble connecting to MS SQL Server

Posted by Gianluca Sartori <g....@elis.org>.
Still no luck... I followed the article in the cocoon wiki but the
result is not different from the previous one.

Thanks anyway,
Gianluca

Il mer, 2003-10-15 alle 13:23, Gianluca Sartori ha scritto:
> Okay I solved the first problem but the second still remains. Someone of
> you has knowledge about MSSQLServer + Cocoon 2.1.2 ? I'm running Linux
> with MSSQLServer drivers from Microsoft. They worked just fine with JSPs
> and Servlets.
> 
> Any help?
> Gianluca
> 
> Il mer, 2003-10-15 alle 11:15, Gianluca Sartori ha scritto:
> > Hi,
> > 
> > 	I have two problems in trying to connect to a MS SQL Server. The first
> > is a configuration problem:
> > 
> > I configured cocoon.xconf modifing the existing "hb_pool" connection as
> > follow:
> > 
> >    <jdbc name="hb_pool">      
> >      <pool-controller min="5" max="10"/>
> >      <dburl>jdbc:microsoft:sqlserver://sql.elis.org:1433</dburl>  
> >      <user>DatabaseUser</user>
> >      <password>[passwd]</password>
> >    </jdbc>
> > 
> > the xsp from which i use the connection is (the incriminated part only):
> > 
> > <esql:connection>
> >        <esql:pool>hb_pool</esql:pool>
> > 
> > With this configuration the connection works (okay, it gives me an
> > exception, but it's SQL Server talking). Trying to modify the jdbc name
> > in both files, cocoon gives me the following error:
> > 
> > org.apache.cocoon.ProcessingException: Exception in
> > ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
> > get the datasource
> > org.apache.avalon.framework.component.ComponentException: datasources:
> > ComponentSelector could not find the component for hint [hb_pool] (key
> > [hb_pool])
> > 
> > Now, why is it still concerning about "hb_pool" while the connection
> > name I used is different? Are there any other referencies somewhere I
> > don't know to this name?
> > 
> > 
> > The second problem is the exception returned by the SQL Server. Leaving
> > the "hb_pool" name as it is and using it in the <esql:connection> i get
> > this message (and only this, the rest of the page is blank):
> > 
> > Cocoon  [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid
> > object name 'srv_trans'.
> > 
> > What's it? I never mentioned "srv_trans" in the query I'm trying to
> > execute.
> > 
> > Thanks for any kind of help,
> > Gianluca
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 


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


Re: Trouble connecting to MS SQL Server

Posted by Gianluca Sartori <g....@elis.org>.
Okay I solved the first problem but the second still remains. Someone of
you has knowledge about MSSQLServer + Cocoon 2.1.2 ? I'm running Linux
with MSSQLServer drivers from Microsoft. They worked just fine with JSPs
and Servlets.

Any help?
Gianluca

Il mer, 2003-10-15 alle 11:15, Gianluca Sartori ha scritto:
> Hi,
> 
> 	I have two problems in trying to connect to a MS SQL Server. The first
> is a configuration problem:
> 
> I configured cocoon.xconf modifing the existing "hb_pool" connection as
> follow:
> 
>    <jdbc name="hb_pool">      
>      <pool-controller min="5" max="10"/>
>      <dburl>jdbc:microsoft:sqlserver://sql.elis.org:1433</dburl>  
>      <user>DatabaseUser</user>
>      <password>[passwd]</password>
>    </jdbc>
> 
> the xsp from which i use the connection is (the incriminated part only):
> 
> <esql:connection>
>        <esql:pool>hb_pool</esql:pool>
> 
> With this configuration the connection works (okay, it gives me an
> exception, but it's SQL Server talking). Trying to modify the jdbc name
> in both files, cocoon gives me the following error:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
> get the datasource
> org.apache.avalon.framework.component.ComponentException: datasources:
> ComponentSelector could not find the component for hint [hb_pool] (key
> [hb_pool])
> 
> Now, why is it still concerning about "hb_pool" while the connection
> name I used is different? Are there any other referencies somewhere I
> don't know to this name?
> 
> 
> The second problem is the exception returned by the SQL Server. Leaving
> the "hb_pool" name as it is and using it in the <esql:connection> i get
> this message (and only this, the rest of the page is blank):
> 
> Cocoon  [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid
> object name 'srv_trans'.
> 
> What's it? I never mentioned "srv_trans" in the query I'm trying to
> execute.
> 
> Thanks for any kind of help,
> Gianluca
> 
> 
> ---------------------------------------------------------------------
> 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