You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Isabelle Boyer <ib...@capgemini.fr> on 2001/03/05 10:39:32 UTC

Connection to database and stylesheet

Hi all,

I have a connection problem with a query to a SQL dataBase, named
"DB_NDSUSERS.
My query is ok but when Itested it 4 times, I have the following error
message :
com.jnetdirect.jsql.m: Failed connection:com.jnetdirect.jsql.m: This trial
license allows a maximum of 1 connections and 2 are already connected
url:jdbc:JSQLConnect://mars:1433/database=DB_NDSUSERS

I have tried to crease the number of connection in cocoon.properties in
section "Turbine DB Connection Pool" at line
processor.xsp.pool.database.default.maxConnections=100 instead of 3.

I use the servlet engine, "litewebserver" and jdk 1.3 in NT workstation.

So could you tell me what is the solution to have a unlimited connection to
the Database., what are cocoon 's properties I have to change or if this
error is included in the freeware ?

I have another request about the stylesheet. I want to use 2 differents
stylesheets in a xml document according to user's request.
Th syntax I use is as following :

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<xsp:page language="java"
          xmlns:ldap="http://www.apache.org/2000/LDAP"
          xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="nds2-3.xsl" type="text/xsl"?>

<page>

    <xsp:logic>
    String all;

    if (request.getParameter("all") != null)
  {
       all = request.getParameter("all");
   }
   else
   {
        all = "";
    }

   String XSLRef="\"href=\"nds2-3.xsl\\\"";

   if ((all.compareTo("all") == 0))
  {
       XSLRef = "\"href=\"nds2-2.xsl\\\"";
  }
  else
  {
      XSLRef = "\"href=\"nds2-3.xsl\\\"";
  }


ument.appendChild( 
   document.createProcessingInstruction("xml-stylesheet",XSLRef+ "type=\"text/xsl\""));
       
    </xsp:logic>
  <ldap:execute-query>
   ...
  </ldap:execute-query>
</page>
</xsp:page>


But it is not working.As you can see, I put a default stylesheet to not have a blank in href because it raise me an erro
r.
So could you give me an idea or another way to do this ?

Thanks in advance for your support and your help.

Best Regards,
Isabelle Boyer.


Re: Connection to database and stylesheet

Posted by Peter Donald <do...@apache.org>.
At 10:39  5/3/01 +0100, Isabelle Boyer wrote:
>Hi all,
>
>I have a connection problem with a query to a SQL dataBase, named
>"DB_NDSUSERS.
>My query is ok but when Itested it 4 times, I have the following error
>message :
>com.jnetdirect.jsql.m: Failed connection:com.jnetdirect.jsql.m: This trial
>license allows a maximum of 1 connections and 2 are already connected
>url:jdbc:JSQLConnect://mars:1433/database=DB_NDSUSERS
>
>I have tried to crease the number of connection in cocoon.properties in
>section "Turbine DB Connection Pool" at line
>processor.xsp.pool.database.default.maxConnections=100 instead of 3.

It is not cocoon limiting the connections but the jdbc driver. The jdbc
driver is under a trial license - you have to buy the driver to get it to
get unlimited connections.
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: Connection to database and stylesheet

Posted by Peter Donald <do...@apache.org>.
At 10:39  5/3/01 +0100, Isabelle Boyer wrote:
>Hi all,
>
>I have a connection problem with a query to a SQL dataBase, named
>"DB_NDSUSERS.
>My query is ok but when Itested it 4 times, I have the following error
>message :
>com.jnetdirect.jsql.m: Failed connection:com.jnetdirect.jsql.m: This trial
>license allows a maximum of 1 connections and 2 are already connected
>url:jdbc:JSQLConnect://mars:1433/database=DB_NDSUSERS
>
>I have tried to crease the number of connection in cocoon.properties in
>section "Turbine DB Connection Pool" at line
>processor.xsp.pool.database.default.maxConnections=100 instead of 3.

It is not cocoon limiting the connections but the jdbc driver. The jdbc
driver is under a trial license - you have to buy the driver to get it to
get unlimited connections.
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*