axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qil.Wong <qil.w...@gmail.com>
Subject Re: axis2: create database connection by services in web server(not axis2 server)
Date Tue, 23 Oct 2007 05:35:53 GMT
Hi, Lahiru,

    I have the lib directory in my service archive, and all my third party
jars are in that directory.

    But only this can not run my service correctly, so as Antonio said
previously I put my db drivers in axis2/lib, and put my .arr into
axis2/repository/services, it works fine when I run the axis2 server. But if
I deploy axis2-1.3.war to tomcat6, and copy the db drivers into
axis2/web-info/lib, and my service .arr into axis2/web-info/services, while
I start tomcat to run axis2 service, the error disapears: no suitable
drivers.



2007/10/23, Lahiru Sandakith <sandakith@gmail.com>:
>
> Hi,
>
> This is related to Axis2 and tomcat web container configurations mixing
> class loading with the archives. See for the tomcat class loading
> http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and Axis2
> is being default child first at the deployment time.  So my idea is place
> the db driver in the service archive lib directory (please create lib
> directory if you do not have it already) and you will be able to get it
> through for that service.
>
> Thanks
> Lahiru
>
> On 10/23/07, Qil. Wong <qil.wong@gmail.com> wrote:
> >
> > Hi,
> >
> >     Yesterdy I asked Antonio about the db connection creation in a
> > service. The answer was: Put the db driver .jar in /axis2/WEB-INF/lib, all
> > jars what you want to use must go here. I followed that and did it, but with
> > a little change(because I didn't have a web server then), I put the db
> > drivers into axis2/lib and run with axis2server, everything was OK, so I
> > think it would be right in a web server(tomcat, eg.).
> >
> >    Today I have installed a tomcat(6.0), and unzip axis2-1.3.war into
> > tomcat6/webapp, put my service into tomcat6/webapp/aixs2/services, and put
> > the drivers into tomcat6/webapp//axis2/WEB-INF/lib, but it does NOT work,
> > it still popups an error when creating a connection: no suitable drivers
> > .
> >
> >     Could anyone explain it?
> >
> >     Thanks!
> >
> >     Qil
> >
> >
> > Question yesterday:
> > >>Hi,
> >
> > >>    I  have one javase application and now I need to change it into
> > axis2 webservice and publish it.
> >
> > >>    While it was javase application, it run fine(certanlly, it could
> > db connections). But after I change it into axis2 service, when the
> > >>application tries to create database connection, there will be an
> > exception : no suitable driver. Actually, all the jdbc libs needed are in
> > >>classpath.
> >
> >  >>   My method to get connection is from a common database pool(with
> > apache libs:common-dbcp.jar,common-pool.jar), the database >>is
> > sqlserver2000. If I get the connection directly by using: Class.forName(...),
> > Connection conn = >>DriverManager.getConnection(url,name,psw), I could
> > get the connection successfully.
> >
> >  >>   Could anyone tell me how to solve it by using database connection
> > pool?
>
>
>
>
> --
> Thanks
> Lahiru Sandakith
>
> http://sandakith.wordpress.com/
> GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC  1AB1 FE5E 7464 1F01 9A0F

Mime
View raw message