You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jan Agermose <ja...@agermose.dk> on 2003/03/02 14:22:09 UTC
jcol files in wars
I'm trying to use dbcp and jocl files in one of my new project. When I compile the project and run a test class that runs from a expanded war - unpacked that is, things work. The jocl file is found, my drivers are loaded and so on. But when packed into the war file and deployed on tomcat nothing works? First (of cause?) I need to load the two jdbc drivers using class.forname. But I get
org.apache.jasper.JasperException: No pool found for jdbc:apache:commons:dbcp:/dk/topix/ws/smsservice/smsservice.
I have a file :/dk/topix/ws/smsservice/smsservice.jocl (and running the example from the command line did work)
Any ideas?
Jan Agermose
RE: jcol files in wars
Posted by Rodney Waldhoff <rw...@apache.org>.
As a point of clarification, the jocl file needs to be in one's classpath.
Simply dropping the file into some directory (like commons/lib) that
contains JARs that are added to your classpath is not sufficient. Either
the directory containing the jocl file needs to be in your classpath, or
the jocl file must be part of a JAR or WAR that is (directly or
indirectly) referenced in your classpath.
Also, it's the DBCP classes that look for the .jocl files, so the jocl
file has to be in the same classpath as commons-dbcp.jar.
RE: jcol files in wars
Posted by Gabriel NKUITE <Ga...@free.fr>.
Hi,
I have already solved my problem.
Thanks
> -----Original Message-----
> From: Kenny Smith [mailto:tomcat-user@journalscape.com]
> Sent: Sunday, March 02, 2003 18:12
> To: Jakarta Commons Users List
> Subject: RE: jcol files in wars
>
> Hi Jan,
>
> I think I don't exactly understand your problem. You put it in
commons/lib
> and it wasn't working, then you put it in your war file and it was
> working?
> Is that the deal? If you put it in commons/lib, then it's context
probably
> doesn't have access to your war file, so when you include your jocl in
the
> war file, it can't find it. But, I'm just guessing.
>
> Kenny
>
> > -----Original Message-----
> > From: Jan Agermose [mailto:jan@agermose.dk]
> > Sent: Sunday, March 02, 2003 8:46 AM
> > To: Jakarta Commons Users List
> > Subject: Re: jcol files in wars
> >
> >
> > well, yes it made it work, but i'm not sure its the way to do it?
Why is
> > commons-dbcp.jar in tomcat commons/lib when you cannot really use
> > it if you
> > are using jcol files?
> >
> > Jan
> >
> > ----- Original Message -----
> > From: "Kenny Smith" <to...@journalscape.com>
> > To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> > Sent: Sunday, March 02, 2003 5:32 PM
> > Subject: RE: jcol files in wars
> >
> >
> > > Hi Jan,
> > >
> > > Are you still having problems with this, or does this message
> > mean you got
> > > it figured out?
> > >
> > > Kenny
> > >
> > > > -----Original Message-----
> > > > From: Jan Agermose [mailto:jan@agermose.dk]
> > > > Sent: Sunday, March 02, 2003 6:55 AM
> > > > To: Jakarta Commons Users List
> > > > Subject: Re: jcol files in wars
> > > >
> > > >
> > > > I need to include the commons-dbcp in my war to make this work.
> > > >
> > > > Jan
> > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
commons-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
commons-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
RE: jcol files in wars
Posted by Kenny Smith <to...@journalscape.com>.
Hi Jan,
I think I don't exactly understand your problem. You put it in commons/lib
and it wasn't working, then you put it in your war file and it was working?
Is that the deal? If you put it in commons/lib, then it's context probably
doesn't have access to your war file, so when you include your jocl in the
war file, it can't find it. But, I'm just guessing.
Kenny
> -----Original Message-----
> From: Jan Agermose [mailto:jan@agermose.dk]
> Sent: Sunday, March 02, 2003 8:46 AM
> To: Jakarta Commons Users List
> Subject: Re: jcol files in wars
>
>
> well, yes it made it work, but i'm not sure its the way to do it? Why is
> commons-dbcp.jar in tomcat commons/lib when you cannot really use
> it if you
> are using jcol files?
>
> Jan
>
> ----- Original Message -----
> From: "Kenny Smith" <to...@journalscape.com>
> To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Sent: Sunday, March 02, 2003 5:32 PM
> Subject: RE: jcol files in wars
>
>
> > Hi Jan,
> >
> > Are you still having problems with this, or does this message
> mean you got
> > it figured out?
> >
> > Kenny
> >
> > > -----Original Message-----
> > > From: Jan Agermose [mailto:jan@agermose.dk]
> > > Sent: Sunday, March 02, 2003 6:55 AM
> > > To: Jakarta Commons Users List
> > > Subject: Re: jcol files in wars
> > >
> > >
> > > I need to include the commons-dbcp in my war to make this work.
> > >
> > > Jan
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
Re: jcol files in wars
Posted by Jan Agermose <ja...@agermose.dk>.
well, yes it made it work, but i'm not sure its the way to do it? Why is
commons-dbcp.jar in tomcat commons/lib when you cannot really use it if you
are using jcol files?
Jan
----- Original Message -----
From: "Kenny Smith" <to...@journalscape.com>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Sunday, March 02, 2003 5:32 PM
Subject: RE: jcol files in wars
> Hi Jan,
>
> Are you still having problems with this, or does this message mean you got
> it figured out?
>
> Kenny
>
> > -----Original Message-----
> > From: Jan Agermose [mailto:jan@agermose.dk]
> > Sent: Sunday, March 02, 2003 6:55 AM
> > To: Jakarta Commons Users List
> > Subject: Re: jcol files in wars
> >
> >
> > I need to include the commons-dbcp in my war to make this work.
> >
> > Jan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
RE: jcol files in wars
Posted by Kenny Smith <to...@journalscape.com>.
Hi Jan,
Are you still having problems with this, or does this message mean you got
it figured out?
Kenny
> -----Original Message-----
> From: Jan Agermose [mailto:jan@agermose.dk]
> Sent: Sunday, March 02, 2003 6:55 AM
> To: Jakarta Commons Users List
> Subject: Re: jcol files in wars
>
>
> I need to include the commons-dbcp in my war to make this work.
>
> Jan
Re: jcol files in wars
Posted by Jan Agermose <ja...@agermose.dk>.
I need to include the commons-dbcp in my war to make this work.
Jan
----- Original Message -----
From: "Jan Agermose" <ja...@agermose.dk>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Sunday, March 02, 2003 2:46 PM
Subject: Re: jcol files in wars
> this is my ant task and I did check, the jocl file is in place:
> <war destfile="${war.file}" webxml="${conf.src}/web.xml">
> <webinf dir="${conf.gen}">
> <include name="server-config.wsdd"/>
> </webinf>
> <classes dir="${java.out}">
> <include name="**/*.class"/>
> <include name="**/*.conf"/>
> <include name="**/*.properties"/>
> <include name="**/*.xml"/>
> <include name="**/*.jocl" />
> <exclude name="**/client/*.class"/>
> </classes>
> <lib dir="${lib}">
> <include name="**/*.jar"/>
> <exclude name="**/servlet.jar"/>
> <exclude name="**/*-ant.jar"/>
> <exclude name="**/junit.jar"/>
> <exclude name="**/mail.jar"/>
> <exclude name="**/xercesImpl.jar"/>
> </lib>
> <fileset dir="src/web"/>
> </war>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
Re: jcol files in wars
Posted by Jan Agermose <ja...@agermose.dk>.
this is my ant task and I did check, the jocl file is in place:
<war destfile="${war.file}" webxml="${conf.src}/web.xml">
<webinf dir="${conf.gen}">
<include name="server-config.wsdd"/>
</webinf>
<classes dir="${java.out}">
<include name="**/*.class"/>
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
<include name="**/*.jocl" />
<exclude name="**/client/*.class"/>
</classes>
<lib dir="${lib}">
<include name="**/*.jar"/>
<exclude name="**/servlet.jar"/>
<exclude name="**/*-ant.jar"/>
<exclude name="**/junit.jar"/>
<exclude name="**/mail.jar"/>
<exclude name="**/xercesImpl.jar"/>
</lib>
<fileset dir="src/web"/>
</war>