RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT

2004-02-21 Thread Unnikrishnan C
Don't define it as a "GlobalNamingResource", instead make it as an
'Application level' resource, it works fine. (I know its strange, but
that's how I solved it in Tomcat 5.0.18.) I was getting the same error
with DB2 connection. 

Thanks,
Unni
 
 

-Original Message-
From: Nathan Pitts [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 21, 2004 3:22 AM
To: Tomcat Users List
Subject: Re: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT

I have the same problemMy application works fine on Tomcat 4.x, but

when I move to 5.0.x I get the same exact error.  This is not a matter  
of just not knowing how to use the driver..yes, the driver is  
located in common/lib/jconn2.jar (Sybase driver)  .HELP!

nate

Here's my error:
[DEBUG] 20 Feb 2004 15:44:05,103 tahc.hris.webapp.service.BaseManager -

Converters registered...
[DEBUG] 20 Feb 2004 15:44:05,376 tahc.hris.persistence.ServiceLocator -

Looking up SessionFactory in JNDI
[INFO] 20 Feb 2004 15:44:05,391 tahc.hris.persistence.ServiceLocator -  
ServiceLocator initialized SessionFactory
[DEBUG] 20 Feb 2004 15:44:05,799 tahc.hris.persistence.ServiceLocator -

jnp Opened a hibernate session with hashcode:  
[EMAIL PROTECTED]
[ERROR] 20 Feb 2004 15:44:06,076  
net.sf.hibernate.util.JDBCExceptionReporter - Cannot create JDBC driver

of class '' for connect URL 'null'
[ERROR] 20 Feb 2004 15:44:06,103  
net.sf.hibernate.util.JDBCExceptionReporter - Cannot open connection
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver  
of class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at  
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource

.java:743)
at  
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja

va:518)
at  
net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(D

atasourceConnectionProvider.java:59)
at  
net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
at
net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
at
net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
at  
net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java

:65)
at  
net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
at  
net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo

ader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
at net.sf.hibernate.loader.Loader.list(Loader.java:941)
at
net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1483)
at  
tahc.hris.persistence.StaticListDAOHibernate.getDepartments(StaticListDA

OHibernate.java:32)
at  
tahc.hris.webapp.service.StaticListManager.getDepartments(StaticListMana

ger.java:65)
at  
tahc.hris.webapp.listener.StartupListener.contextInitialized(StartupList

ener.java:101)



On Monday, February 2, 2004, at 01:44 PM, Chakravarthy, Sundar wrote:

> Try using JDBC in a stand-alone Java app instead of Tomcat.
> Just to make sure you have the right driver/classes .
>
> -Original Message-
> From: Keshav Sarin [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 02, 2004 2:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>
> You need to remove all references to the database driver from the  
> system
> and web app classpath. Don't put the driver in web-inf/lib directory.
> Just keep the driver in the tomcat_home/common/lib directory.
>
>
 [EMAIL PROTECTED] 02/02/04 10:34AM >>>
> This is setenv file:
>
> set
> classpath=.;C:\j2sdk1.4.2_03\lib\tools.jar;..\web-inf\classes;..\web- 
> inf
> \lib\cos.jar;..\web-inf\lib\jnlp.jar;..\web-inf\lib\log4j.jar;..\web- 
> inf
> \lib\xml4j.jar;..\web-inf\lib\ldapjdk.jar;..\web- 
> inf\lib\ldapsearch.jar.
> .\web-inf\lib\classes12.jar;%classpath%
>
>
> and Class path set in system is :
>
>
.;C:\Estimation;C:\Tomcat\common\lib\servlet.jar;C:\Tomcat\common\lib\m 
> a
>
il.jar;C:\Tomcat\common\lib\activation.jar;C:\Tomcat\common\lib\jndi.ja 
> r
> ;C:\Tomcat\common\lib\jdbc2_0- 
> stdext.jar;C:\Tomcat\common\lib\ojdbc14.ja
> r
>
> ANy Bug ??
>
> Regards
> Abhay
>
>
>
> -Original Message-
> From: Mike Curwen [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 02, 2004 11:25 AM
> To: 'Tomcat Users List'
> Subject: RE: Error in JDBC conn / Apache Tomcat/4.1.29 URGENT
>
>
> Just to be sure.. you tried classes12.**jar**  (renamed .zip to .jar)
> ?
>
>
>> -Original Message-
>> From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED]
>> 

Tomcat 5 and logging

2004-02-21 Thread Ryan Daly
Are there logging problems with Tomcat 5, or am I missing a
configuration?

With 4.x, I get a bunch of individual logs from each webapp I have
deployed.  With Tomcat 5, I see no such thing.  Actually, in a bunch of
webapps, I see the following message:

javax.servlet.ServletException: ApplicationDaemon.init(): failed to
initialize logger.
[...]
- Root Cause -
javax.naming.NameNotFoundException: Name logger is not bound in this
Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:814)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:197)
at
nlp.catnp.ccb.servlet.ApplicationDaemon.init(ApplicationDaemon.java:62)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3960)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4283)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
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:324)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)


Any help would be appreciated.

Thanks.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where is the source code that processes the server.xml file?

2004-02-21 Thread Tim Funk
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-5.0/
http://jakarta.apache.org/site/cvsindex.html
-Tim

Adrian Beech wrote:
G'day all,

Can someone please tell me where I might find the Java code in the Tomcat
5.0 source tree which is responsible for processing the server.xml file?
I'm particularly looking for the code that is employed to handle the
 elements in the server.xml file.
I would greatly appreciate any help in finding the code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Relative links do not work with controller servlet.

2004-02-21 Thread Juergen Weber
I want to run all requests through a controller
servlet.

The requests should be like
/controller/dir/fileXXX.html

This is done with a 


Controller
/controller/*



request.getPathInfo() is "dir/fileXXX.html"


fileXXX.html in reality are JSPs, which the Controller
servlet forwards to.

In the JSPs are relative links to images and CSS.
Well, as in the browsers view the html files are below
/controller, it requests these relative links also
below /controller, but the controller cannot and
should not handle CSS and images. 

This problem surfaces often in the newsgroups, but I
did not find a solution.

Is there a good, portable solution to the problem ?

Ideally would be a
*.css,*.jpg,*.gif
Tag in web.xml.

Thanks, Juergen


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where is the source code that processes the server.xml file?

2004-02-21 Thread Adrian Beech
G'day all,

Can someone please tell me where I might find the Java code in the Tomcat
5.0 source tree which is responsible for processing the server.xml file?
I'm particularly looking for the code that is employed to handle the
 elements in the server.xml file.

I would greatly appreciate any help in finding the code.

Thanks.
AB



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat5, apache2, mod_webapp configuration issue

2004-02-21 Thread Bill Barker
mod_webapp isn't supported for Tomcat5 (and trying to copy it from Tomcat4 is unlikely 
to work :).  You'll just have to bite the bullet and use mod_jk.
  "Michael L. Delaney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  I have set up apache2, tomcat5, and mod_webapp as the connector.  I am getting this 
in catalina.out.  I have all of the classpath, catalina_home, common/lib/catalina.jar 
set up yet I still get this.  Can anyone help out ?  If someone has server.xml 
configured already to deply to apache2 that would be great.  I know I'm close. 
  -michael 

  Feb 19, 2004 10:03:26 PM org.apache.catalina.core.StandardHostDeployer install 
  INFO: Installing web application at context path /bitstock from URL 
file:/usr/local/tomcat/jakarta-tomcat-5/build/webapps/bitstock 
  java.lang.NoClassDefFoundError: org/apache/catalina/connector/HttpRequestBase 
 at java.lang.ClassLoader.defineClass0(Native Method) 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:537) 
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) 
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) 
 at java.net.URLClassLoader.access$100(URLClassLoader.java:55) 
 at java.net.URLClassLoader$1.run(URLClassLoader.java:194) 
 at java.security.AccessController.doPrivileged(Native Method) 
 at java.net.URLClassLoader.findClass(URLClassLoader.java:187) 
 at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:520) 
 at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) 
 at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:756) 
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) 
 at org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown 
Source) 
 at org.apache.catalina.connector.warp.WarpConnection.run(Unknown Source) 
 at java.lang.Thread.run(Thread.java:534) 
  java.lang.NoClassDefFoundError: org/apache/catalina/connector/HttpRequestBase 
 at java.lang.ClassLoader.defineClass0(Native Method) 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:537) 
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) 
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) 
 at java.net.URLClassLoader.access$100(URLClassLoader.java:55) 
 at java.net.URLClassLoader$1.run(URLClas 



JMX questions

2004-02-21 Thread Sean Campbell
Background:

I'm trying to implement a custom MBean to be accessable through the 
/manager/jmxproxy application.  I've read the mbeans-descriptor-howto 
document, and have put together what I believe is a correct descriptor, 
and don't get any errors when tomcat (version 5 is what we're using) 
starts up.  Problem is, I don't see my MBean through the proxy 
interface.

Question:

Does jmxproxy support custom MBeans?  If so, does it support only Model 
MBeans?  I ask this because my MBean is a simple one, not dynamic or 
model.  Is there any way to test that my MBean is loaded and 
accessable, short of putting together a seperate JMX agent or client to 
access it?  If I wanted to use an external client to manage all of 
tomcat's MBeans, inclusing my custom one, how would i go about that?

Thanks in advance for any help.

Sincerely,

Sean Campbell
Developer
Enertiasoft
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat5, apache2, mod_webapp configuration issue

2004-02-21 Thread Michael L. Delaney




I
have set up apache2, tomcat5, and mod_webapp as the connector.  I am
getting this in catalina.out.  I have all of the classpath,
catalina_home, common/lib/catalina.jar set up yet I still get this. 
Can anyone help out ?  If someone has server.xml configured already to
deply to apache2 that would be great.  I know I'm close.

-michael


Feb 19, 2004 10:03:26 PM org.apache.catalina.core.StandardHostDeployer
install

INFO: Installing web application at context path /bitstock from URL file:/usr/local/tomcat/jakarta-tomcat-5/build/webapps/bitstock

java.lang.NoClassDefFoundError:
org/apache/catalina/connector/HttpRequestBase

   at java.lang.ClassLoader.defineClass0(Native Method)

   at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

   at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

   at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)

   at java.net.URLClassLoader.access$100(URLClassLoader.java:55)

   at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

   at java.security.AccessController.doPrivileged(Native Method)

   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)

   at
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:520)

   at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)

   at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:756)

   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

   at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown
Source)

   at org.apache.catalina.connector.warp.WarpConnection.run(Unknown
Source)

   at java.lang.Thread.run(Thread.java:534)

java.lang.NoClassDefFoundError:
org/apache/catalina/connector/HttpRequestBase

   at java.lang.ClassLoader.defineClass0(Native Method)

   at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

   at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

   at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)

   at java.net.URLClassLoader.access$100(URLClassLoader.java:55)

   at java.net.URLClassLoader$1.run(URLClas







Re: a question on viewing servlets

2004-02-21 Thread Eric VERGNAUD
le 21/02/04 10:29, ches_nutsy à [EMAIL PROTECTED] a écrit :

> hi, i would like to ask something about the servlets, i have followed all the
> tomcat's intructions diligently, and i am able to compile them correctly, my
> problem is that I'm not alble to view the servlets, why is this happenning? I
> have saved the class files under
> C:\tomcat\jakarta-tomcat-5.0.12\webapps\ROOT\WEB-INF\classes and it compiled
> ok, but when i tried to access them, through
> http://localhost/servlet/HelloServlet nothing happens! help me, please
> 

Also your servlet folder should be at the same level as ROOT, not inside it.
Your webapps folder should look like the following:

balancer
jsp-examples
servlets-examples
tomcat-docs
ROOT
YOURSERVLET

Eric
---
Eric VERGNAUD - JLynx Software
Cutting-edge technologies and
services for software companies
web: http://www.jlynx.com
---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: a question on viewing servlets

2004-02-21 Thread Antonio Fiol Bonnín
ches_nutsy wrote:

hi, i would like to ask something about the servlets, i have followed all the tomcat's intructions diligently, and i am able to compile them correctly, my problem is that I'm not alble to view the servlets, why is this happenning? I have saved the class files under C:\tomcat\jakarta-tomcat-5.0.12\webapps\ROOT\WEB-INF\classes and it compiled ok, but when i tried to access them, through http://localhost/servlet/HelloServlet nothing happens! help me, please 
 

Add your servlet and a servlet-mapping to your WEB-INF/web.xml

Antonio Fiol


smime.p7s
Description: S/MIME Cryptographic Signature


a question on viewing servlets

2004-02-21 Thread ches_nutsy
hi, i would like to ask something about the servlets, i have followed all the tomcat's 
intructions diligently, and i am able to compile them correctly, my problem is that 
I'm not alble to view the servlets, why is this happenning? I have saved the class 
files under C:\tomcat\jakarta-tomcat-5.0.12\webapps\ROOT\WEB-INF\classes and it 
compiled ok, but when i tried to access them, through 
http://localhost/servlet/HelloServlet nothing happens! help me, please 


-
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.