Hi,

Actually , I cannot modify my code. I needr to use the file configuration way.

This is what I have done:

In web.xml (C:\install\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\axis2\WEB-INF) :(inside <web-app>):

<resource-ref >
<res-ref-name>ancre</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

In server.xml :

<Resource auth="Container" name="ancre" type="javax.sql.DataSource"/>
    <ResourceParams name="ancre">
        <parameter>
            <name>factory</name>
            <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <parameter>
            <name>driverClassName</name>
            <value>org.postgresql.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>
<!---XXXXX the  hidden IP that I'd prefer not to put -->
            <value>jdbc:postgresql://XXXXXXXXX/ANCRE_ACCES2</value>
        </parameter>
        <parameter>
            <name>username</name>
            <value>postgres</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>dclv2</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>20</value>
        </parameter>
        <parameter>
            <name>maxIdle</name>
            <value>10</value>
        </parameter>
        <parameter>
            <name>maxWait</name>
            <value>-1</value>
        </parameter>
    </ResourceParams>

......

<Context docBase="axis2/services/WebServiceHelper" path="axis2/services/WebServiceHelper" reloadable="true" source="org.eclipse.jst.j2ee.server:axis2/services/WebServiceHelper">
    <ResourceLink global="ancre" name="ancre" type="javax.sql.DataSource"/>
    </Context>
   
    </Host>

This is the stack trace error (Cannot create JDBC driver of class '' for connect URL 'null')  I get on my tomcat server when testing my client:

- getConnection() - Exception:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    at fr.acoss.ancre.acces.dao.pojo.BaseDAO.getConnection(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.PojoDao.countDynamique(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.PojoDao.countBySiret(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.WebServiceHelper.countBySiret(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:106)
    at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:243)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
    ... 40 more
- countDynamique() - Exception:Cannot create JDBC driver of class '' for connect URL 'null'
fr.acoss.ancre.acces.dao.pojo.PoolException: Cannot create JDBC driver of class '' for connect URL 'null'
    at fr.acoss.ancre.acces.dao.pojo.BaseDAO.getConnection(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.PojoDao.countDynamique(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.PojoDao.countBySiret(Unknown Source)
    at fr.acoss.ancre.acces.dao.pojo.WebServiceHelper.countBySiret(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:106)
    at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
    ... 39 more
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:243)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
    ... 40 more


Could you please help me? What am I missing ?

thanks in advance,


----- Original Message ----
From: robert lazarski <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org; Nicolas Urien <[EMAIL PROTECTED]>
Sent: Friday, June 30, 2006 6:43:37 PM
Subject: Re: java.lang.NoSuchMethodError

If your talking about jndi.properties or any other file, that'd be the
usual way:

InputStream in = this.getClass().getClassLoader().getResourceAsStream(filename);

Now of course there is no rule saying that your serviceClass must be
in the aar.

HTH,
Robert
http://www.braziloutsource.com/

On 6/30/06, Nicolas Urien <[EMAIL PROTECTED]> wrote:
>
>
> I am running 1.0.
>
> However, I have found out that the problem was due to the running of my
> implementation class (I have a bit of a complex design). A JNDI naming
> exception (javax.naming.NameNotFoundException:) for my jdbc
> ressource is raised on my tomcat server (after the  axis2  call).
>
> How do I make my JNDI jdbc ressource available to my axis AAR archive
> please?
>
> Thanks a million
>
>
> ----- Original Message ----
> From: robert lazarski <[EMAIL PROTECTED]>
> To: axis-user@ws.apache.org; Nicolas Urien <[EMAIL PROTECTED]>
> Sent: Friday, June 30, 2006 3:17:15 PM
> Subject: Re: java.lang.NoSuchMethodError
>
> What version are you running? My general advice is to try the
> nightlies, as a lot has happened since the 1.0 release:
>
> http://people.apache.org/dist/axis2/nightly/
>
> If that doesn't help, could you try enabling logging under the files
> under WEB-INF/classes and send us the output?
>
> HTH,
> Robert
> http://www.braziloutsource.com/
>
> On 6/30/06, Nicolas Urien <[EMAIL PROTECTED]> wrote:
> >
> >
> > Thanks Robert. It was definitely the problem.
> >
> > Then I got a second one that I fixed (due to protected modifiers in my
> > business class).
> >
> > I now have this "unknow exception" :( when launching my client :
> >
> > Exception in thread "main" org.apache.axis2.AxisFault: unknown
> >     at
> >
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)
> >
> >     at
> >
> fr.acoss.ancre.acces.dao.pojo.PojoDaoStub.countBySiret(PojoDaoStub.java:4054)
> >     at
> > fr.acoss.ancre.acces.dao.pojo.Client.main(Client.java:18)
> > Caused by: java.lang.Exception: org.apache.axis2.AxisFault
> >     at
> >
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:108)
> >     at
> >
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
> >     at
> >
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
> >     at
> >
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
> >     at
> >
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
> >     at
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> >     at
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >     at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >     at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >     at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >     at
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >     at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >     at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >     at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >     at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >     at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >     at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >     at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >     at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >     at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >     at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >     at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >     at
> >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >     at
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >     at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >     at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >     at
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >     at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> >     at java.lang.Thread.run(Thread.java:595)
> >
> >     at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
> >     ... 3 more
> >
> >
> >
> > ----- Original Message ----
> > From: robert lazarski <[EMAIL PROTECTED]>
> > To: axis-user@ws.apache.org; Nicolas Urien <[EMAIL PROTECTED]>
> > Sent: Friday, June 30, 2006 2:07:42 PM
> > Subject: Re: java.lang.NoSuchMethodError
> >
> > I've seen this error on the client side due to a different version of
> > commons-httpclient being in a higher classloader, in my case the
> > jbossall-client has a different version of this class.  Make sure the
> > client is loading the correct version of commons-http client.
> >
> > HTH,
> > Robert
> > http://www.braziloutsource.com/
> >
> > On 6/30/06, Nicolas Urien <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > I have deployed an axis aar2 archive file on tomcat 5.0.
> > >
> > > I get this exception when launching the client (it uses the axis2
> > generated
> > > stubs):
> > >
> > >
> > >
> > > Exception in thread "main" java.lang.NoSuchMethodError:
> > >
> >
> org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
> > >     at
> > >
> >
> org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:509)
> > >     at
> > >
> >
> org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:36)
> > >     at
> > >
> >
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:299)
> > >     at
> > >
> >
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:207)
> > >     at
> > >
> >
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
> > >     at
> > >
> >
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:328)
> > >     at
> > >
> >
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
> > >     at
> > >
> >
> fr.acoss.ancre.acces.dao.pojo.PojoDaoStub.countBySiret(PojoDaoStub.java:4054)
> > >     at
> > >
> fr.acoss.ancre.acces.dao.pojo.Client.main(Client.java:18)
> > >
> > >
> > >
> > > Any help is greatly appreciated. Many thanks in advance!
> > >
> > >
> > >
> > >
> > > Here is the client code:
> > >
> > > package fr.acoss.ancre.acces.dao.pojo;
> > >
> > > import
> > >
> >
> fr.acoss.ancre.acces.dao.pojo.PojoDaoStub.CountBySiretResponse;;
> > >
> > >
> > >
> > > public class Client {
> > >
> > >     public static void main(String[] args) throws Exception {
> > >
> > >         PojoDaoStub stub = new PojoDaoStub();
> > >
> > >         //Create the request
> > >         PojoDaoStub.CountBySiret request = new
> PojoDaoStub.CountBySiret();
> > >         request.setParam0("17080431400145");
> > >
> > >         //Invoke the service
> > >         CountBySiretResponse response = stub.countBySiret(request);
> > >
> > >         System.out.println("Response : " + response.get_return());
> > >     }
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > > Attached is the wsdl file.
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

Reply via email to