tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LINGALA, AMARESHWAR G (SBCSI)" <al3...@sbc.com>
Subject RE: Problems with tomcat on UNIX
Date Tue, 28 Sep 2004 22:05:30 GMT

Yoav,
     I sincerely appreciate your suggestions, Below are the corrections to
my server.xml. But I definetely am missing something, Since I get the
following error. Can you please let me know what's missing in the server.xml
?



---------------------

<?xml version='1.0' encoding='utf-8'?>
<Server>
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be
updated and saved" name="UserDatabase"
type="org.apache.catalina.UserDatabase"/>
    <Resource name="jdbc/myoracle" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/myoracle">
      <parameter>
        <name>validationQuery</name>
        <value>select * from snet_cca_pooling</value>
      </parameter>
      <parameter>
        <name>maxWait</name>
        <value>5000</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>4</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>wfab</value>
      </parameter>
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:@chd4.sbc.com:1521:ostl411</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>2</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>wfab</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000"
disableUploadTimeout="true" port="8072" redirectPort="8443"
maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">

      <Context className="org.apache.catalina.core.StandardDefaultContext">

		<ResourceLink global="jdbc/myoracle" name="jdbc/myoracle"/>

      </Context>
	
      <Host appBase="webapps" name="localhost">
        <Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_log." suffix=".txt" timestamp="true"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
  </Service>
</Server>

---------------------

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'
	at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:780)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
40)
	at
com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnectionImp
l.java:57)
	at
com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute(Calcul
ationsReportAction.java:51)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	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(Application
FilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.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(StandardValveContex
t.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.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(StandardValveContex
t.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.processConne
ction(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
	at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: No suitable driver
	at java.sql.DriverManager.getDriver(DriverManager.java:243)
	at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:773)
	... 33 more


-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
Sent: Tuesday, September 28, 2004 12:04 PM
To: Tomcat Users List
Subject: RE: Problems with tomcat on UNIX



Hi,
I find it hard to believe this server.xml worked properly at any point
in time.  Don't declare JNDI resources with the same name at a global
scope: you have jdbc/myoracle both in DefaultContext and in
GlobalNamingResources.  Pick only one location and use it, not both.  I
suggest GlobalNamingResources instead of DefaultContext.

If you use GlobalNamingResources, you need an explicit Context for your
webapp in server.xml with a ResourceLink element.

Another option, the best actually if you're going to use server-provided
connection pooling at all, is to declare the Resource just inside your
Context, not in DefaultContext and not in GlobalNamingResources.  Then
you don't need a ResourceLink.

As an aside, note that this has nothing to do with your operating
system, unix or otherwise.


Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: LINGALA, AMARESHWAR G (SBCSI) [mailto:al3495@sbc.com]
>Sent: Tuesday, September 28, 2004 12:59 PM
>To: Tomcat Users List
>Subject: RE: Problems with tomcat on UNIX
>
>Dear Yoav,
>	    It's a known fact that I was having problem Implementing the
>connection pooling for my application, but this issues has been
resolved
>and I did test my application and everything seem to have worked
>correctly. I do understand that something might have changed that is
>causing the problem, But to the best of my knowledge nothing seems to
>have changed. Since I am having problems with different versions of the
>server.xml files, I choose to use port 8072 on my local machine too.
>Below is the latest version of my server.xml file. Please let me know
If
>It needs any changes. Also please understand that this is my first web
>application. I sincerely thank you for all your suggestions and help.
>
> <?xml version='1.0' encoding='utf-8'?>
><Server>
>  <Listener
>className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
>  <Listener
>className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/
>>
>  <GlobalNamingResources>
>    <Environment name="simpleValue" type="java.lang.Integer"
>value="30"/>
>    <Resource auth="Container" description="User database that can be
>updated and saved" name="UserDatabase"
>type="org.apache.catalina.UserDatabase"/>
>    <Resource name="jdbc/myoracle" type="javax.sql.DataSource"/>
>    <ResourceParams name="UserDatabase">
>      <parameter>
>        <name>factory</name>
>
><value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
>      </parameter>
>      <parameter>
>        <name>pathname</name>
>        <value>conf/tomcat-users.xml</value>
>      </parameter>
>    </ResourceParams>
>    <ResourceParams name="jdbc/myoracle">
>      <parameter>
>        <name>validationQuery</name>
>        <value>select * from snet_cca_pooling</value>
>      </parameter>
>      <parameter>
>        <name>maxWait</name>
>        <value>5000</value>
>      </parameter>
>      <parameter>
>        <name>maxActive</name>
>        <value>4</value>
>      </parameter>
>      <parameter>
>        <name>password</name>
>        <value>temp</value>
>      </parameter>
>      <parameter>
>        <name>url</name>
>        <value>jdbc:oracle:thin:@chd4.sbc.com:1521:ostl411</value>
>      </parameter>
>      <parameter>
>        <name>driverClassName</name>
>        <value>oracle.jdbc.driver.OracleDriver</value>
>      </parameter>
>      <parameter>
>        <name>maxIdle</name>
>        <value>2</value>
>      </parameter>
>      <parameter>
>        <name>username</name>
>        <value>temp</value>
>      </parameter>
>    </ResourceParams>
>  </GlobalNamingResources>
>  <Service name="Catalina">
>    <Connector acceptCount="100" connectionTimeout="20000"
>disableUploadTimeout="true" port="8072" redirectPort="8443"
>maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
>    </Connector>
>    <Connector port="8009" protocol="AJP/1.3"
>protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
>redirectPort="8443">
>    </Connector>
>    <Engine defaultHost="localhost" name="Catalina">
>      <DefaultContext
>className="org.apache.catalina.core.StandardDefaultContext">
>        <Resource auth="Container" name="jdbc/myoracle"
>type="javax.sql.DataSource"/>
>        <ResourceParams name="jdbc/myoracle">
>          <parameter>
>            <name>factory</name>
>
><value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>          </parameter>
>          <parameter>
>            <name>maxWait</name>
>            <value>-1</value>
>          </parameter>
>          <parameter>
>            <name>maxActive</name>
>            <value>20</value>
>          </parameter>
>          <parameter>
>            <name>password</name>
>            <value>temp</value>
>          </parameter>
>          <parameter>
>            <name>url</name>
>            <value>jdbc:oracle:thin:@chd4.sbc.com:1521:ostl411</value>
>          </parameter>
>          <parameter>
>            <name>driverClassName</name>
>            <value>oracle.jdbc.driver.OracleDriver</value>
>          </parameter>
>          <parameter>
>            <name>maxIdle</name>
>            <value>10</value>
>          </parameter>
>          <parameter>
>            <name>username</name>
>            <value>temp</value>
>          </parameter>
>        </ResourceParams>
>      </DefaultContext>
>      <Host appBase="webapps" name="localhost">
>        <Logger className="org.apache.catalina.logger.FileLogger"
>prefix="localhost_log." suffix=".txt" timestamp="true"/>
>      </Host>
>      <Logger className="org.apache.catalina.logger.FileLogger"
>prefix="catalina_log." suffix=".txt" timestamp="true"/>
>      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
>    </Engine>
>  </Service>
></Server>
>
>Amar
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>Sent: Tuesday, September 28, 2004 10:41 AM
>To: Tomcat Users List
>Subject: RE: Problems with tomcat on UNIX
>
>
>
>Hi,
>So everything worked fine before the weekend, the setup is the same
>except for ports, now all of a sudden it doesn't work, and you expect
>someone who doesn't know your system to be able to help? ;)
>
>These changes don't occur by themselves.  Something has to have
changed.
>Maybe you should try using a standard connection pooling approach
rather
>than rolling your own.
>
>Yoav Shapira
>Millennium Research Informatics
>
>
>>-----Original Message-----
>>From: LINGALA, AMARESHWAR G (SBCSI) [mailto:al3495@sbc.com]
>>Sent: Tuesday, September 28, 2004 11:32 AM
>>To: Tomcat Users List
>>Subject: RE: Problems with tomcat on UNIX
>>
>>
>> Yoav,
>>      I did verified the server.xml files from both the environments
>and
>>everything is pretty much the same the only difference is that I use
>>port 8080 on my local machine and port 8072 on the unix machine. The
>jar
>>file is in the same location. It is in the WEB-INF/libs dir.
>>
>>Well I use the link http://localhost:8080/SSBilling/form/ to access my
>>local portal.
>>
>>Above all everything did seems to work just before the weekend.
>>
>> Please let me know if there is anything that I am missing to change.
>>
>> Thanks
>>  Amar
>>
>>
>>-----Original Message-----
>>From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>>Sent: Tuesday, September 28, 2004 10:17 AM
>>To: Tomcat Users List
>>Subject: RE: Problems with tomcat on UNIX
>>
>>
>>
>>Hi,
>>Well, how is the local machine configuration different the unix one?
>Is
>>the driver jar in the same directory?  Is the server.xml the same?  Is
>>your context definition, if you have one, the same?  When you say
>you're
>>running fine locally, is that from within an IDE, or on the command
>>line?
>>
>>Out of curiosity, did you search the archives or consult the Tomcat
FAQ
>>before posting your question?  This is not a rare question ;)
>>
>>Yoav Shapira
>>Millennium Research Informatics
>>
>>
>>>-----Original Message-----
>>>From: LINGALA, AMARESHWAR G (SBCSI) [mailto:al3495@sbc.com]
>>>Sent: Tuesday, September 28, 2004 11:11 AM
>>>To: 'Tomcat Users List'
>>>Subject: Problems with tomcat on UNIX
>>>
>>>
>>> I have recently Implemented Connection Pooling for my Struts web
>>>application. Everything seemed to have worked correctly until last
>>weekend.
>>>All of a sudden I get the following error whenever I try to access
the
>>>database. Also just so that you know everything works fine on my
local
>>>machine. I get this problem only when I try to use the one on UNIX
>box.
>>>
>>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
>>class
>>>'oracle.jdbc.driver.OracleDriver', cause:
>>>java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
>>>        at
>>>org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
s
>L
>>oade
>>>r
>>>.java:891)
>>>        at
>>>org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
s
>L
>>oade
>>>r
>>>.java:756)
>>>        at
>>java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>>>        at java.lang.Class.forName0(Native Method)
>>>        at java.lang.Class.forName(Class.java:140)
>>>        at
>>>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
r
>c
>>e.ja
>>>v
>>>a:730)
>>>        at
>>>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.
>j
>>ava:
>>>5
>>>18)
>>>        at
>>>com.sbc.ssbilling.database.DBConnectionImpl.makeDBConnection(DBConnec
t
>i
>>onIm
>>>p
>>>l.java:57)
>>>        at
>>>com.sbc.ssbilling.calculation.action.CalculationsReportAction.execute
(
>C
>>alcu
>>>l
>>>ationsReportAction.java:51)
>>>        at
>>>org.apache.struts.action.RequestProcessor.processActionPerform(Reques
t
>P
>>roce
>>>s
>>>sor.java:484)
>>>        at
>>>org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
v
>a
>>:274
>>>)
>>>        at
>>>org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2
>)
>>>        at
>>>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>>        at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>>        at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>>        at
>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
i
>c
>>atio
>>>n
>>>FilterChain.java:284)
>>>        at
>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
i
>l
>>terC
>>>h
>>>ain.java:204)
>>>        at
>>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
a
>l
>>ve.j
>>>a
>>>va:257)
>>>        at
>>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
e
>C
>>onte
>>>x
>>>t.java:151)
>>>        at
>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a
>:
>>564)
>>>        at
>>>org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
C
>o
>>ntex
>>>t
>>>Valve.java:245)
>>>        at
>>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
a
>l
>>ve.j
>>>a
>>>va:199)
>>>        at
>>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
e
>C
>>onte
>>>x
>>>t.java:151)
>>>        at
>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a
>:
>>564)
>>>        at
>>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
a
>v
>>a:19
>>>5
>>>)
>>>        at
>>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
e
>C
>>onte
>>>x
>>>t.java:151)
>>>        at
>>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
a
>v
>>a:16
>>>4
>>>)
>>>        at
>>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
e
>C
>>onte
>>>x
>>>t.java:149)
>>>        at
>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a
>:
>>564)
>>>        at
>>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
v
>e
>>.jav
>>>a
>>>:156)
>>>        at
>>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
e
>C
>>onte
>>>x
>>>t.java:151)
>>>        at
>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a
>:
>>564)
>>>        at
>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
>>>        at
>>>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6
>)
>>>        at
>>>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:
>8
>>28)
>>>        at
>>>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
s
>s
>>Conn
>>>e
>>>ction(Http11Protocol.java:700)
>>>        at
>>>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:
>5
>>84)
>>>        at
>>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
o
>o
>>l.ja
>>>v
>>>a:683)
>>>        at java.lang.Thread.run(Thread.java:536)
>>>
>>>Any help is greatly appreciated !!
>>>
>>>Thanks
>>>  Amar
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>
>>This e-mail, including any attachments, is a confidential business
>>communication, and may contain information that is confidential,
>>proprietary and/or privileged.  This e-mail is intended only for the
>>individual(s) to whom it is addressed, and may not be saved, copied,
>>printed, disclosed or used by anyone else.  If you are not the(an)
>>intended recipient, please immediately delete this e-mail from your
>>computer system and notify the sender.  Thank you.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
>intended recipient, please immediately delete this e-mail from your
>computer system and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message