Re: [OT] How to write/use Tomcat's war classloader

2006-04-14 Thread V D
Thank you for your interest.  The application starts very slowly with 
the war and my classloader (this is a standard app, not webapp).  The 
war also has a webapp in it.  This has nothing to do with the 
application logic.  It's the leading time to load the classes.  It takes 
about 2 or 3 minutes.  The same JVM 1.5.0 runs Tomcat (5.5.12) would 
response to request much quicker (about 10 seconds) after the 1st 
request.  If I run the war file unpacked and using standard classloader, 
it's a couple of seconds before things run.  However, using our own 
class loader with the packed war (which searches all libraries in the 
lib and classes in the classes directory) it takes along time described 
above.


My question is about how Tomcat does this in the unpacked war scenario.  
I couldn't find the Tomcat loader that does this.  I suspect it unpacked 
it first, but this is a wild speculation.



P Y wrote:

maybe you could give a bit more context to interpret "very slow" or "quickly".
like what version of tc and jvm are you using ... etc


On 4/12/06, V D <[EMAIL PROTECTED]> wrote:
  

Anyone have an idea about this?

V D wrote:


We have a sizable war file (|unpacked|) that needs to be run in
certain way outside of Tomcat.  To do this, we created a classloader
which works Ok except that it's very slow (using JarFile).  I know
that when deploy apps in Tomcat, I can specify it to not to unpack
(|unpackWAR = "false").  However, Tomcat load and run the apps
quickly. I looked into Tomcat source, the org.apache.catalina.loader
package and could not find anything like that.  I see
WebappClassLoader, but it seems to load from an unpacked war, not
packed war.  Does Tomcat actually unpack the war before loading the
app?  If not, could someone point me to the right place to look, or
give some advice on how to write this thing faster?

Thanks,

-vd
|

  

-
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]



Re: Tomcat 5.5 SSL Configuration problem, can't connect!

2006-04-14 Thread Bill Barker
I would *really* like to see more of your log, since this is a classic "this 
can't happen" bug.

"Jana Nguyen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hi there,

I am running Tomcat 5.5 on RH Linux as user 'tomcat', I'm trying to
get tomcat to run on a secure port 8443 instead of 8080.  I
uncommented the "SSL HTTP/1.1 Connector" entry in
$CATALINA_HOME/conf/server.xml and generated a host certificate as
user 'tomcat'.  The .keystore file got generated in the tomcat home
dir.  After I restarted the tomcat container I launch my browser to:

https://:8443

I get error "unable to connect to server"

In the CATALINA logs, I get the following error:
INFO: Pausing Coyote HTTP/1.1 on http-8443
Apr 12, 2006 9:04:15 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.lang.NullPointerException
at org.apache.jk.server.JkMain.pause(JkMain.java:677)
at 
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:162)

Any help would be appreciated! 




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



Re: WebappClassLoader delegates to SystemClassLoader, not CustomClassLoader

2006-04-14 Thread Bill Barker
Not enough info to give you a code sample (since with Embedded, you are 
controlling the ClassLoaders, and Tomcat isn't doing it's default 
common/server/shared thing).  However, what you want is one of the following 
(depending on your CL requirements):
   engine.setParentClassLoader(myClassLoader);
   host.setParentClassLoader(myClassLoader);
   context.setParentClassLoader(myClassLoader);

If you are using JMX-embedding, this is currently only supported at the 
Context level in JMX (although reflection still works for the others).  As 
you might guess, setting it on the Engine sets it for all Hosts that don't 
have an explicit setting, setting it on the Host sets it for all Contexts 
that don't have an explicit setting, and setting it on the Context sets it 
for the Context.

"Andrew McDowall" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hi,

I'm running into ClassLoader problems when using a custom ClassLoader
with an embedded Tomcat.  The problem, as I understand it, is arising
due to multiple versions of log4j being loaded by different ClassLoaders
resulting in ClassCastExceptions or expected interfaces not being
implemented.

In my main application's libraries I have log4j.jar - this is loaded by
a URLClassLoader, while in my WebApp's libraries I have a different
log4j.jar which is loaded by Tomcat's WebAppClassLoader.  Within my main
application I have an embedded Tomcat which is also loaded using the
URLClassLoader, thus Tomcat expects to use log4j classes that are bound
to the URLClassLoader, unfortunately the WebAppClassLoader does not
appear to be searching the URLClassLoader and instead loads log4j from
its own libraries.

As far as I can tell, the search order for the WebAppClassLoader never
actually delegates up beyond the Common-classLoader, instead it skips
straight to the SystemClassLoader avoiding my URLClassLoader.  I should
add that I have successfully implemented a 'hack' to my system which
uses the SystemClassLoader and have not encountered the same problems -
since when the WebAppClassLoader interrogates the SystemClassLoader the
expected version of log4j would be loaded.

Does anybody know of a way to get round this?  I'd assume that setting
my URLClassLoader to be the parent of the Common-ClassLoader would work
but I can't seem to find any documentation on how to achieve this.
Failing that is there a way to specify that Tomcat uses a subclass of
WebAppClassLoader (which I could write)?



Thanks in advance.

Andy McDowall.



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina 
Software, this communication is to be treated as confidential and the 
information in it may not be used or disclosed except for the purpose for 
which it has been sent. If you have reason to believe that you are not the 
intended recipient of this communication, please contact the sender 
immediately.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__ 




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



Re: help using SSL with Tomcat error no server.pem?

2006-04-14 Thread Bill Barker
You are using the PureTLS flavor of the SSL Connector.  This one expects 
something closer to an OpenSSL style keystore (which defaults to 
'server.pem' if not specified) with the private key and cert PEM encoded in 
the same text file.  In particular, it doesn't use a JKS keystore.

Assuming that you meant to use PureTLS, you should consult the PureTLS docs 
for more information on what it needs.  It seems that the PureTLS examples 
got left out of the TC 5 docs.  There is some documentation at 
http://tomcat.apache.org/tomcat-3.3-doc/tomcat-ssl-howto.html#s6, that while 
it's for Tomcat 3, the configuration attributes are the same as for TC 5 
(since TC 5 PureTLS support is a port of the TC 3 version :).  In 
particular, it's 'clientauth' not 'clientAuth'.

If you meant to use JSSE, then either remove the PureTLS jar from the 
classpath, or (e.g. it's an installed extension needed for other apps), add 
the attribute to your  tag:
   sSLImplementation="org.apache.tomcat.util.net.jsse.JSSEImplementation"
which will override Tomcat's preference for PureTLS if found.  Even so, you 
need to go back and read 
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html since from below you 
haven't finished setting up your keystore.

"Jana Nguyen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hi there,

I've posted my issues not being able to connect using tomcat with ssl
using port 8443 some days ago, but did not get any response.

I am running Tomcat 5.5 on RH Linux as user 'tomcat', I'm trying to
get tomcat to run on a secure port 8443 instead of 8080.  I
uncommented the "SSL HTTP/1.1 Connector" entry in
$CATALINA_HOME/conf/server.xml and generated a host certificate as
user 'tomcat' :

%keytool -genkey -alias tomcat -keyalg RSA

The .keystore file got generated in the tomcat home
dir at /export/home/tomcat.  After that I restarted the tomcat
container I launch my browser to:

https://:8443

I get error "unable to connect to server"

In catalina.out file, error:

Apr 14, 2006 2:49:36 PM
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory init
INFO: Error initializing SocketFactory
java.io.FileNotFoundException: server.pem (No such file or directory)

This is what looks like in my server.xml file at section SSL:

 

   

   
   

Any help would be appreciated! 




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



RE: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
OK, I removed the unnecessary Contexts (at least they are unnecessary
for the time being) and did notice the following messages.

WARNING: A docBase c:\webapps\myapp inside the host appBase has been
specified, and will be ignored
Apr 15, 2006 2:09:41 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(D:\MSD\Prog0\NewsBrowser\webapps\medias\WEB-INF\lib\serv
let-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending class: javax/servlet/Servlet.class
Apr 15, 2006 2:09:41 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(D:\MSD\Prog0\NewsBrowser\webapps\medias\WEB-INF\lib\serv
let.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending class: javax/servlet/Servlet.class

The first Warning certainly sounds ominous--but, I don't know what it
means.  I did some googling which seemed to imply that it's probably
caused by the Context error in the webapp itself.  I don't know what the
others mean.  So, I'm still at square one.


-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 6:58 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

maybe I should read the docs ;)

yes, any container can have it,

Filip Hanik - Dev Lists wrote:
> exactly, the realm element doesn't belong there, read up on the docs
>
> Scott Smith wrote:
>> I am also doing Forms authentication...but I haven't got that far
since
>> the webapp doesn't initialize yet.
>>
>> This app used to use the struts  tag, but I'm trying to
>> move it to jndi.
>>
>> -Original Message-
>> From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: Friday, April 
>> 14, 2006 5:05 PM
>> To: Tomcat Users List
>> Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND
>>
>> What are you trying to accomplish with the  tag?
>>
>>
>>
>>
>> On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
>>  
>>> check your log files upon startup, your myapp.xml doesn't have a
>>> 
>> docBase
>>  
>>> attribute to associate it with the app itself.
>>> >> path="/myapp">.
>>>
>>> Scott Smith wrote:
>>>
 Sorry, I sent this so many times.  Hopefully, I have all of the
   
>> typos
>>  
 out of it this time...



 I have specified the following as myapp.xml in the
 conf\Catalina\locahost directory:



 



 >>>
 type="javax.sql.DataSource"

 username="user" password="pswd"


 driverClassName="net.sourceforge.jtds.jdbc.Driver"



   
>>
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
>>  
 =cursor"

 maxActive="30" maxIdle="20" minIdle="10"
 maxWait="2" />

 >>>   
>> className="org.apache.catalina.realm.DataSourceRealm"
>>  
 debug="99"

 dataSourceName="jdbc/MyDB"

 userTable="zUsers" userNameCol="zUserName"
 userCredCol="zPassword"

 userRoleTable="wsViewRoles"
   
>> roleNameCol="zRole"
>>  
 />

 



 In my web.xml file I have:



   

 jdbc/MyDB

 javax.sql.DataSource

 Container

   



 But, when I execute the code



 DataSource ds = null;

 try

 {

 Context initCtx = new InitialContext();

 Context envCtx = (Context)
 initCtx.lookup("java:comp/env");

ds = (DataSource)
envCtx.lookup("jdbc/MyDB");

 }

 catch (NamingException e)

 {

 _log.error("Unable to retrieve MyDB
   
>> DataSource",
>>  
 e);

 ds = null;

 }



 The exception is caught and I get an error message which says
 "javax.naming.NamingException: Name is not bound to a Context".  I
 verified that the name in the ,   and the
 context lookup are the same.



 I suspect I understand the message.  I just don't know what I've
   
>> done
>>  
 wrong.  Any suggestions?



 Scott









   
>>>
-
>>> 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]
>>
>>
>>   
>
>

RE: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
I've read the logs a half-dozen times.  If there's something there, I've
missed it.

Now, having said that, there is another Context that's giving me an
error message.  I need to set up a couple of Contexts that point to
static content in directories outside of the web application (assume
they have images in them).  There's no WEB-INF directory in either one
of them, so Tomcat complains it can't start one of the Contexts (but
only in one of them--don't understand why it complains about one and not
the other).  Still, if I reference an item through that path, Tomcat
seems to find it.  But, since it's a different Context than myapp, I
assume it's not what's affecting things here. 

Yes, I did look at the docs, but since it took me three times to send
this email the first time, I'm hardly in a position to criticize :-).

Scott

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 6:57 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

also, did you check your logs yet? I bet there is a nice little error 
message in there for you :)

Filip


Scott Smith wrote:
> You are correct.  I thought path was required and implied the docBase
(I
> guess it's the other way around).  So I changed it to:
>
> 
>
> However, that didn't change the error message.
>
> -Original Message-
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 14, 2006 4:56 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND
>
> check your log files upon startup, your myapp.xml doesn't have a
docBase
>
> attribute to associate it with the app itself.
>  path="/myapp">.
>
> Scott Smith wrote:
>   
>> Sorry, I sent this so many times.  Hopefully, I have all of the typos
>> out of it this time...
>>
>>  
>>
>> I have specified the following as myapp.xml in the
>> conf\Catalina\locahost directory:
>>
>>  
>>
>> 
>>
>>  
>>
>> >
>> type="javax.sql.DataSource" 
>>
>> username="user" password="pswd"
>>
>>  
>> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>>
>>  
>>
>> 
>
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
>   
>> =cursor"
>>
>> maxActive="30" maxIdle="20" minIdle="10"
>> maxWait="2" />
>>
>> > 
> className="org.apache.catalina.realm.DataSourceRealm"
>   
>> debug="99"
>>
>> dataSourceName="jdbc/MyDB"
>>
>> userTable="zUsers" userNameCol="zUserName"
>> userCredCol="zPassword"
>>
>> userRoleTable="wsViewRoles"
>> 
> roleNameCol="zRole"
>   
>> />
>>
>> 
>>
>>  
>>
>> In my web.xml file I have:
>>
>>  
>>
>>   
>>
>> jdbc/MyDB
>>
>> javax.sql.DataSource
>>
>> Container
>>
>>   
>>
>>  
>>
>> But, when I execute the code
>>
>>  
>>
>> DataSource ds = null;
>>
>> try 
>>
>> {
>>
>> Context initCtx = new InitialContext();
>>
>> Context envCtx = (Context)
>> initCtx.lookup("java:comp/env");
>>
>>ds = (DataSource) envCtx.lookup("jdbc/MyDB");
>>
>> } 
>>
>> catch (NamingException e) 
>>
>> {
>>
>> _log.error("Unable to retrieve MyDB
>> 
> DataSource",
>   
>> e);
>>
>> ds = null;
>>
>> }
>>
>>  
>>
>> The exception is caught and I get an error message which says
>> "javax.naming.NamingException: Name is not bound to a Context".  I
>> verified that the name in the ,   and the
>> context lookup are the same.
>>
>>  
>>
>> I suspect I understand the message.  I just don't know what I've done
>> wrong.  Any suggestions?
>>
>>  
>>
>> Scott
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>   
>> 
>
>
> -
> 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]


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



Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Filip Hanik - Dev Lists

maybe I should read the docs ;)

yes, any container can have it,

Filip Hanik - Dev Lists wrote:

exactly, the realm element doesn't belong there, read up on the docs

Scott Smith wrote:

I am also doing Forms authentication...but I haven't got that far since
the webapp doesn't initialize yet.

This app used to use the struts  tag, but I'm trying to
move it to jndi.

-Original Message-
From: Marc Farrow [mailto:[EMAIL PROTECTED] Sent: Friday, April 
14, 2006 5:05 PM

To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

What are you trying to accomplish with the  tag?




On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
 

check your log files upon startup, your myapp.xml doesn't have a


docBase
 

attribute to associate it with the app itself.
.

Scott Smith wrote:
   

Sorry, I sent this so many times.  Hopefully, I have all of the
  

typos
 

out of it this time...



I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:







  

url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
 

=cursor"

maxActive="30" maxIdle="20" minIdle="10"
maxWait="2" />

  

className="org.apache.catalina.realm.DataSourceRealm"
 

debug="99"

dataSourceName="jdbc/MyDB"

userTable="zUsers" userNameCol="zUserName"
userCredCol="zPassword"

userRoleTable="wsViewRoles"
  

roleNameCol="zRole"
 

/>





In my web.xml file I have:



  

jdbc/MyDB

javax.sql.DataSource

Container

  



But, when I execute the code



DataSource ds = null;

try

{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

   ds = (DataSource) envCtx.lookup("jdbc/MyDB");

}

catch (NamingException e)

{

_log.error("Unable to retrieve MyDB
  

DataSource",
 

e);

ds = null;

}



The exception is caught and I get an error message which says
"javax.naming.NamingException: Name is not bound to a Context".  I
verified that the name in the ,   and the
context lookup are the same.



I suspect I understand the message.  I just don't know what I've
  

done
 

wrong.  Any suggestions?



Scott









  

-
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]




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



RE: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
I don't know.  It's there because when I looked in the JNDI DataSource
How-to, it was there.  Originally, I had the database Resource (not the
Realm) in the  (which didn't work either; I then had a
ResourceLink in the Context).  I moved the Resource to the Context in an
attempt to figure out why it wasn't working.  As I mentioned in a
previous post, this is the first time I've tried to use JNDI and I
suspect I've got some minor detail wrong.  

I'm beginning to be suspicious that somehow the context isn't really
getting tied to the webapp directory.  I did move the webapps directory
(per Moczar) and maybe I've screwed that up.

Is there someway to get Tomcat to give more error details about missing
stuff?  Do I need to configure log4j and check the debug/info stuff as
well as errors?  Suggestions?

-Original Message-
From: Arshad Mahmood [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 6:37 PM
To: users@tomcat.apache.org
Subject: FW: Tomcat 5.5.16 configuration problem--THIRD RESEND

Hi,

Do you really need that resource-ref in the web.xml. Your resource is
defined under Context so you shouldn't need one. Other than that
Your code looks fine and I can't see any problems with it.

Regards.

On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
>
> check your log files upon startup, your myapp.xml doesn't have a
docBase
> attribute to associate it with the app itself.
>  path="/myapp">.
>
> Scott Smith wrote:
> > Sorry, I sent this so many times.  Hopefully, I have all of the
typos
> > out of it this time...
> >
> >
> >
> > I have specified the following as myapp.xml in the
> > conf\Catalina\locahost directory:
> >
> >
> >
> > 
> >
> >
> >
> >  >
> > type="javax.sql.DataSource"
> >
> > username="user" password="pswd"
> >
> >
> > driverClassName="net.sourceforge.jtds.jdbc.Driver"
> >
> >
> >
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> > =cursor"
> >
> > maxActive="30" maxIdle="20" minIdle="10"
> > maxWait="2" />
> >
> >  > debug="99"
> >
> > dataSourceName="jdbc/MyDB"
> >
> > userTable="zUsers" userNameCol="zUserName"
> > userCredCol="zPassword"
> >
> > userRoleTable="wsViewRoles"
roleNameCol="zRole"
> > />
> >
> > 
> >
> >
> >
> > In my web.xml file I have:
> >
> >
> >
> >   
> >
> > jdbc/MyDB
> >
> > javax.sql.DataSource
> >
> > Container
> >
> >   
> >
> >
> >
> > But, when I execute the code
> >
> >
> >
> > DataSource ds = null;
> >
> > try
> >
> > {
> >
> > Context initCtx = new InitialContext();
> >
> > Context envCtx = (Context)
> > initCtx.lookup("java:comp/env");
> >
> >ds = (DataSource) envCtx.lookup("jdbc/MyDB");
> >
> > }
> >
> > catch (NamingException e)
> >
> > {
> >
> > _log.error("Unable to retrieve MyDB
DataSource",
> > e);
> >
> > ds = null;
> >
> > }
> >
> >
> >
> > The exception is caught and I get an error message which says
> > "javax.naming.NamingException: Name is not bound to a Context".  I
> > verified that the name in the ,   and the
> > context lookup are the same.
> >
> >
> >
> > I suspect I understand the message.  I just don't know what I've
done
> > wrong.  Any suggestions?
> >
> >
> >
> > Scott
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> -
> 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]



Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Filip Hanik - Dev Lists
also, did you check your logs yet? I bet there is a nice little error 
message in there for you :)


Filip


Scott Smith wrote:

You are correct.  I thought path was required and implied the docBase (I
guess it's the other way around).  So I changed it to:



However, that didn't change the error message.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 4:56 PM

To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

check your log files upon startup, your myapp.xml doesn't have a docBase

attribute to associate it with the app itself.
.

Scott Smith wrote:
  

Sorry, I sent this so many times.  Hopefully, I have all of the typos
out of it this time...

 


I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:

 




 


type="javax.sql.DataSource" 


username="user" password="pswd"

 
driverClassName="net.sourceforge.jtds.jdbc.Driver"


 



url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
  

=cursor"

maxActive="30" maxIdle="20" minIdle="10"
maxWait="2" />



className="org.apache.catalina.realm.DataSourceRealm"
  

debug="99"

dataSourceName="jdbc/MyDB"

userTable="zUsers" userNameCol="zUserName"
userCredCol="zPassword"

userRoleTable="wsViewRoles"


roleNameCol="zRole"
  

/>



 


In my web.xml file I have:

 


  

jdbc/MyDB

javax.sql.DataSource

Container

  

 


But, when I execute the code

 


DataSource ds = null;

try 


{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

   ds = (DataSource) envCtx.lookup("jdbc/MyDB");

} 

catch (NamingException e) 


{

_log.error("Unable to retrieve MyDB


DataSource",
  

e);

ds = null;

}

 


The exception is caught and I get an error message which says
"javax.naming.NamingException: Name is not bound to a Context".  I
verified that the name in the ,   and the
context lookup are the same.

 


I suspect I understand the message.  I just don't know what I've done
wrong.  Any suggestions?

 


Scott

 

 

 



  




-
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]



Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Filip Hanik - Dev Lists

exactly, the realm element doesn't belong there, read up on the docs

Scott Smith wrote:

I am also doing Forms authentication...but I haven't got that far since
the webapp doesn't initialize yet.

This app used to use the struts  tag, but I'm trying to
move it to jndi.

-Original Message-
From: Marc Farrow [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 5:05 PM

To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

What are you trying to accomplish with the  tag?




On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
  

check your log files upon startup, your myapp.xml doesn't have a


docBase
  

attribute to associate it with the app itself.
.

Scott Smith wrote:


Sorry, I sent this so many times.  Hopefully, I have all of the
  

typos
  

out of it this time...



I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:







  

url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
  

=cursor"

maxActive="30" maxIdle="20" minIdle="10"
maxWait="2" />

  

className="org.apache.catalina.realm.DataSourceRealm"
  

debug="99"

dataSourceName="jdbc/MyDB"

userTable="zUsers" userNameCol="zUserName"
userCredCol="zPassword"

userRoleTable="wsViewRoles"
  

roleNameCol="zRole"
  

/>





In my web.xml file I have:



  

jdbc/MyDB

javax.sql.DataSource

Container

  



But, when I execute the code



DataSource ds = null;

try

{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

   ds = (DataSource) envCtx.lookup("jdbc/MyDB");

}

catch (NamingException e)

{

_log.error("Unable to retrieve MyDB
  

DataSource",
  

e);

ds = null;

}



The exception is caught and I get an error message which says
"javax.naming.NamingException: Name is not bound to a Context".  I
verified that the name in the ,   and the
context lookup are the same.



I suspect I understand the message.  I just don't know what I've
  

done
  

wrong.  Any suggestions?



Scott









  

-
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]



FW: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Arshad Mahmood
Hi,

Do you really need that resource-ref in the web.xml. Your resource is
defined under Context so you shouldn't need one. Other than that
Your code looks fine and I can't see any problems with it.

Regards.

On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
>
> check your log files upon startup, your myapp.xml doesn't have a docBase
> attribute to associate it with the app itself.
>  path="/myapp">.
>
> Scott Smith wrote:
> > Sorry, I sent this so many times.  Hopefully, I have all of the typos
> > out of it this time...
> >
> >
> >
> > I have specified the following as myapp.xml in the
> > conf\Catalina\locahost directory:
> >
> >
> >
> > 
> >
> >
> >
> >  >
> > type="javax.sql.DataSource"
> >
> > username="user" password="pswd"
> >
> >
> > driverClassName="net.sourceforge.jtds.jdbc.Driver"
> >
> >
> > url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> > =cursor"
> >
> > maxActive="30" maxIdle="20" minIdle="10"
> > maxWait="2" />
> >
> >  > debug="99"
> >
> > dataSourceName="jdbc/MyDB"
> >
> > userTable="zUsers" userNameCol="zUserName"
> > userCredCol="zPassword"
> >
> > userRoleTable="wsViewRoles" roleNameCol="zRole"
> > />
> >
> > 
> >
> >
> >
> > In my web.xml file I have:
> >
> >
> >
> >   
> >
> > jdbc/MyDB
> >
> > javax.sql.DataSource
> >
> > Container
> >
> >   
> >
> >
> >
> > But, when I execute the code
> >
> >
> >
> > DataSource ds = null;
> >
> > try
> >
> > {
> >
> > Context initCtx = new InitialContext();
> >
> > Context envCtx = (Context)
> > initCtx.lookup("java:comp/env");
> >
> >ds = (DataSource) envCtx.lookup("jdbc/MyDB");
> >
> > }
> >
> > catch (NamingException e)
> >
> > {
> >
> > _log.error("Unable to retrieve MyDB DataSource",
> > e);
> >
> > ds = null;
> >
> > }
> >
> >
> >
> > The exception is caught and I get an error message which says
> > "javax.naming.NamingException: Name is not bound to a Context".  I
> > verified that the name in the ,   and the
> > context lookup are the same.
> >
> >
> >
> > I suspect I understand the message.  I just don't know what I've done
> > wrong.  Any suggestions?
> >
> >
> >
> > Scott
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> -
> 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]



FW: Relative Link Question

2006-04-14 Thread Arshad Mahmood
Hi,

Hmm. What are you trying to do? Surely your images are not actually in a
directory called "/webapp/images/...". Your images are probably at the top
level of your docBase. The "webapp" is surely just a context that is being
mapping to a webapp under tomcat, and you probably want Apache to serve the
images anyway (since you're fronting it with Apache).

Are the images really not being displayed? What have you set the
DocumentRoot to in the apache httpd.conf.

Regards.

-Original Message-
From: Steven Huey [mailto:[EMAIL PROTECTED] 
Sent: 14 April 2006 23:49
To: users@tomcat.apache.org
Subject: Relative Link Question

Hello,

I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16  
and things are working pretty well except for relative links in my  
webapp.

When accessing my webapp at http://myserver.com/mywebapp/index.jsp  
any relative links within subdirectories of the mywebapp directory  
don't include /mywebapp/ in the URL. For example I have a mywebapp/ 
includes/ directory and some of the files use links such as:



Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the  
link is http://myserver.com/images/pic.jpg.

I've read that if I remove the leading "/" from the links it will  
work, but I already have a lot of links in this format and am  
wondering if there is a configuration change or something else I can  
do to resolve this.

Thanks,
Steve Huey



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



RE: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
I am also doing Forms authentication...but I haven't got that far since
the webapp doesn't initialize yet.

This app used to use the struts  tag, but I'm trying to
move it to jndi.

-Original Message-
From: Marc Farrow [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 5:05 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

What are you trying to accomplish with the  tag?




On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
>
> check your log files upon startup, your myapp.xml doesn't have a
docBase
> attribute to associate it with the app itself.
>  path="/myapp">.
>
> Scott Smith wrote:
> > Sorry, I sent this so many times.  Hopefully, I have all of the
typos
> > out of it this time...
> >
> >
> >
> > I have specified the following as myapp.xml in the
> > conf\Catalina\locahost directory:
> >
> >
> >
> > 
> >
> >
> >
> >  >
> > type="javax.sql.DataSource"
> >
> > username="user" password="pswd"
> >
> >
> > driverClassName="net.sourceforge.jtds.jdbc.Driver"
> >
> >
> >
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> > =cursor"
> >
> > maxActive="30" maxIdle="20" minIdle="10"
> > maxWait="2" />
> >
> >  > debug="99"
> >
> > dataSourceName="jdbc/MyDB"
> >
> > userTable="zUsers" userNameCol="zUserName"
> > userCredCol="zPassword"
> >
> > userRoleTable="wsViewRoles"
roleNameCol="zRole"
> > />
> >
> > 
> >
> >
> >
> > In my web.xml file I have:
> >
> >
> >
> >   
> >
> > jdbc/MyDB
> >
> > javax.sql.DataSource
> >
> > Container
> >
> >   
> >
> >
> >
> > But, when I execute the code
> >
> >
> >
> > DataSource ds = null;
> >
> > try
> >
> > {
> >
> > Context initCtx = new InitialContext();
> >
> > Context envCtx = (Context)
> > initCtx.lookup("java:comp/env");
> >
> >ds = (DataSource) envCtx.lookup("jdbc/MyDB");
> >
> > }
> >
> > catch (NamingException e)
> >
> > {
> >
> > _log.error("Unable to retrieve MyDB
DataSource",
> > e);
> >
> > ds = null;
> >
> > }
> >
> >
> >
> > The exception is caught and I get an error message which says
> > "javax.naming.NamingException: Name is not bound to a Context".  I
> > verified that the name in the ,   and the
> > context lookup are the same.
> >
> >
> >
> > I suspect I understand the message.  I just don't know what I've
done
> > wrong.  Any suggestions?
> >
> >
> >
> > Scott
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> -
> 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]



RE: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
You are correct.  I thought path was required and implied the docBase (I
guess it's the other way around).  So I changed it to:



However, that didn't change the error message.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 4:56 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

check your log files upon startup, your myapp.xml doesn't have a docBase

attribute to associate it with the app itself.
.

Scott Smith wrote:
> Sorry, I sent this so many times.  Hopefully, I have all of the typos
> out of it this time...
>
>  
>
> I have specified the following as myapp.xml in the
> conf\Catalina\locahost directory:
>
>  
>
> 
>
>  
>
> 
> type="javax.sql.DataSource" 
>
> username="user" password="pswd"
>
>  
> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>
>  
>
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> =cursor"
>
> maxActive="30" maxIdle="20" minIdle="10"
> maxWait="2" />
>
>  debug="99"
>
> dataSourceName="jdbc/MyDB"
>
> userTable="zUsers" userNameCol="zUserName"
> userCredCol="zPassword"
>
> userRoleTable="wsViewRoles"
roleNameCol="zRole"
> />
>
> 
>
>  
>
> In my web.xml file I have:
>
>  
>
>   
>
> jdbc/MyDB
>
> javax.sql.DataSource
>
> Container
>
>   
>
>  
>
> But, when I execute the code
>
>  
>
> DataSource ds = null;
>
> try 
>
> {
>
> Context initCtx = new InitialContext();
>
> Context envCtx = (Context)
> initCtx.lookup("java:comp/env");
>
>ds = (DataSource) envCtx.lookup("jdbc/MyDB");
>
> } 
>
> catch (NamingException e) 
>
> {
>
> _log.error("Unable to retrieve MyDB
DataSource",
> e);
>
> ds = null;
>
> }
>
>  
>
> The exception is caught and I get an error message which says
> "javax.naming.NamingException: Name is not bound to a Context".  I
> verified that the name in the ,   and the
> context lookup are the same.
>
>  
>
> I suspect I understand the message.  I just don't know what I've done
> wrong.  Any suggestions?
>
>  
>
> Scott
>
>  
>
>  
>
>  
>
>
>   


-
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]



Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Marc Farrow
What are you trying to accomplish with the  tag?




On 4/14/06, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:
>
> check your log files upon startup, your myapp.xml doesn't have a docBase
> attribute to associate it with the app itself.
>  path="/myapp">.
>
> Scott Smith wrote:
> > Sorry, I sent this so many times.  Hopefully, I have all of the typos
> > out of it this time...
> >
> >
> >
> > I have specified the following as myapp.xml in the
> > conf\Catalina\locahost directory:
> >
> >
> >
> > 
> >
> >
> >
> >  >
> > type="javax.sql.DataSource"
> >
> > username="user" password="pswd"
> >
> >
> > driverClassName="net.sourceforge.jtds.jdbc.Driver"
> >
> >
> > url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> > =cursor"
> >
> > maxActive="30" maxIdle="20" minIdle="10"
> > maxWait="2" />
> >
> >  > debug="99"
> >
> > dataSourceName="jdbc/MyDB"
> >
> > userTable="zUsers" userNameCol="zUserName"
> > userCredCol="zPassword"
> >
> > userRoleTable="wsViewRoles" roleNameCol="zRole"
> > />
> >
> > 
> >
> >
> >
> > In my web.xml file I have:
> >
> >
> >
> >   
> >
> > jdbc/MyDB
> >
> > javax.sql.DataSource
> >
> > Container
> >
> >   
> >
> >
> >
> > But, when I execute the code
> >
> >
> >
> > DataSource ds = null;
> >
> > try
> >
> > {
> >
> > Context initCtx = new InitialContext();
> >
> > Context envCtx = (Context)
> > initCtx.lookup("java:comp/env");
> >
> >ds = (DataSource) envCtx.lookup("jdbc/MyDB");
> >
> > }
> >
> > catch (NamingException e)
> >
> > {
> >
> > _log.error("Unable to retrieve MyDB DataSource",
> > e);
> >
> > ds = null;
> >
> > }
> >
> >
> >
> > The exception is caught and I get an error message which says
> > "javax.naming.NamingException: Name is not bound to a Context".  I
> > verified that the name in the ,   and the
> > context lookup are the same.
> >
> >
> >
> > I suspect I understand the message.  I just don't know what I've done
> > wrong.  Any suggestions?
> >
> >
> >
> > Scott
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Filip Hanik - Dev Lists
check your log files upon startup, your myapp.xml doesn't have a docBase 
attribute to associate it with the app itself.

.

Scott Smith wrote:

Sorry, I sent this so many times.  Hopefully, I have all of the typos
out of it this time...

 


I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:

 




 


type="javax.sql.DataSource" 


username="user" password="pswd"

 
driverClassName="net.sourceforge.jtds.jdbc.Driver"


 
url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod

=cursor"

maxActive="30" maxIdle="20" minIdle="10"
maxWait="2" />





 


In my web.xml file I have:

 


  

jdbc/MyDB

javax.sql.DataSource

Container

  

 


But, when I execute the code

 


DataSource ds = null;

try 


{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

   ds = (DataSource) envCtx.lookup("jdbc/MyDB");

} 

catch (NamingException e) 


{

_log.error("Unable to retrieve MyDB DataSource",
e);

ds = null;

}

 


The exception is caught and I get an error message which says
"javax.naming.NamingException: Name is not bound to a Context".  I
verified that the name in the ,   and the
context lookup are the same.

 


I suspect I understand the message.  I just don't know what I've done
wrong.  Any suggestions?

 


Scott

 

 

 



  



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



Relative Link Question

2006-04-14 Thread Steven Huey

Hello,

I've got a setup with Apache 2.2, Mod_Jk 1.2.15, and Tomcat 5.5.16  
and things are working pretty well except for relative links in my  
webapp.


When accessing my webapp at http://myserver.com/mywebapp/index.jsp  
any relative links within subdirectories of the mywebapp directory  
don't include /mywebapp/ in the URL. For example I have a mywebapp/ 
includes/ directory and some of the files use links such as:




Instead of linking to http://myserver.com/mywebapp/images/pic.jpg the  
link is http://myserver.com/images/pic.jpg.


I've read that if I remove the leading "/" from the links it will  
work, but I already have a lot of links in this format and am  
wondering if there is a configuration change or something else I can  
do to resolve this.


Thanks,
Steve Huey

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



Tomcat 5.5.16 configuration problem--THIRD RESEND

2006-04-14 Thread Scott Smith
Sorry, I sent this so many times.  Hopefully, I have all of the typos
out of it this time...

 

I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:

 



 







 

In my web.xml file I have:

 

  

jdbc/MyDB

javax.sql.DataSource

Container

  

 

But, when I execute the code

 

DataSource ds = null;

try 

{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

   ds = (DataSource) envCtx.lookup("jdbc/MyDB");

} 

catch (NamingException e) 

{

_log.error("Unable to retrieve MyDB DataSource",
e);

ds = null;

}

 

The exception is caught and I get an error message which says
"javax.naming.NamingException: Name is not bound to a Context".  I
verified that the name in the ,   and the
context lookup are the same.

 

I suspect I understand the message.  I just don't know what I've done
wrong.  Any suggestions?

 

Scott

 

 

 



Recall: Tomcat 5.5.16 configuration problem

2006-04-14 Thread Scott Smith
Scott Smith would like to recall the message, "Tomcat 5.5.16 configuration 
problem".

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



Re: Tomcat 5.5.16 configuration problem

2006-04-14 Thread Marc Farrow
in your code you are looking for context named "jdbc/MediaBrowserDB",
however your name in your context and web.xml is "jdbc/MyDB".  Unless this
is a typo from trying to put code to the list, i would check that.

On 4/14/06, Scott Smith <[EMAIL PROTECTED]> wrote:
>
> Sorry, I hit send too soon-
>
>
>
> I have specified the following as myapp.xml in the
> conf\Catalina\locahost directory:
>
>
>
> 
>
>
>
>
>type="javax.sql.DataSource"
>
>username="user" password="pswd"
>
>
> driverClassName="net.sourceforge.jtds.jdbc.Driver"
>
>
> url="jdbc:jtds:sqlserver://127.0.0.1:1433;DatabaseName=MyDB;SelectMethod
> =cursor"
>
>maxActive="30" maxIdle="20" minIdle="10"
> maxWait="2" />
>
> debug="99"
>
>dataSourceName="jdbc/MyDB"
>
>userTable="zUsers" userNameCol="zUserName"
> userCredCol="zPassword"
>
>userRoleTable="wsViewRoles" roleNameCol="zRole"
> />
>
> 
>
>
>
> In my web.xml file I have:
>
>
>
> 
>
>jdbc/MyDB
>
>javax.sql.DataSource
>
>Container
>
> 
>
>
>
> But, when I execute the code
>
>
>
>DataSource ds = null;
>
>try
>
>{
>
>Context initCtx = new InitialContext();
>
>Context envCtx = (Context)
> initCtx.lookup("java:comp/env");
>
>envCtx = (Context)
> initCtx.lookup("java:comp/env");
>
>ds = (DataSource)
> envCtx.lookup("jdbc/MediaBrowserDB");
>
>}
>
>catch (NamingException e)
>
>{
>
>_log.error("Unable to retrieve MyDB DataSource",
> e);
>
>ds = null;
>
>}
>
>
>
> I get an error message which says "javax.naming.NamingException: Name is
> not bound to a Context"
>
>
>
> I understand the message.  I just don't know what I've done wrong.  Any
> suggestions?
>
>
>
> Scott
>
>
>
>
>
>
>
>
>


Tomcat 5.5.16 configuration problem

2006-04-14 Thread Scott Smith
Sorry, I hit send too soon-

 

I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:

 



 







 

In my web.xml file I have:

 

  

jdbc/MyDB

javax.sql.DataSource

Container

  

 

But, when I execute the code

 

DataSource ds = null;

try 

{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

envCtx = (Context)
initCtx.lookup("java:comp/env");

ds = (DataSource)
envCtx.lookup("jdbc/MediaBrowserDB");

} 

catch (NamingException e) 

{

_log.error("Unable to retrieve MyDB DataSource",
e);

ds = null;

}

 

I get an error message which says "javax.naming.NamingException: Name is
not bound to a Context"

 

I understand the message.  I just don't know what I've done wrong.  Any
suggestions?

 

Scott

 

 

 



Recall: Tomcat 5.5.16 configuration problem

2006-04-14 Thread Scott Smith
Scott Smith would like to recall the message, "Tomcat 5.5.16 configuration 
problem".

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



Tomcat 5.5.16 configuration problem

2006-04-14 Thread Scott Smith
I have specified the following as myapp.xml in the
conf\Catalina\locahost directory:

 



 







 

In my web.xml file I have:

 

  

jdbc/MyDB

javax.sql.DataSource

Container

  

 

But, when I execute the code

 

DataSource ds = null;

try 

{

Context initCtx = new InitialContext();

Context envCtx = (Context)
initCtx.lookup("java:comp/env");

envCtx = (Context)
initCtx.lookup("java:comp/env");

ds = (DataSource)
envCtx.lookup("jdbc/MediaBrowserDB");

} 

catch (NamingException e) 

{

_log.error("Unable to retrieve MyDB DataSource",
e);

ds = null;

}

 

I get an error message which says 

 

 

Scott Smith

 

SVP Technology

Mainstream Data

375 Chipeta Way, Suite B

Salt Lake City, Ut 84108

801-584-2817

 



help using SSL with Tomcat error no server.pem?

2006-04-14 Thread Jana Nguyen
Hi there,

I've posted my issues not being able to connect using tomcat with ssl
using port 8443 some days ago, but did not get any response.

I am running Tomcat 5.5 on RH Linux as user 'tomcat', I'm trying to
get tomcat to run on a secure port 8443 instead of 8080.  I
uncommented the "SSL HTTP/1.1 Connector" entry in
$CATALINA_HOME/conf/server.xml and generated a host certificate as
user 'tomcat' :

%keytool -genkey -alias tomcat -keyalg RSA

The .keystore file got generated in the tomcat home
dir at /export/home/tomcat.  After that I restarted the tomcat
container I launch my browser to:

https://:8443

I get error "unable to connect to server"

In catalina.out file, error:

Apr 14, 2006 2:49:36 PM
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory init
INFO: Error initializing SocketFactory
java.io.FileNotFoundException: server.pem (No such file or directory)

This is what looks like in my server.xml file at section SSL:

 

   

   
   

Any help would be appreciated!

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



Re: Tomcat & SSL

2006-04-14 Thread Dhaval Patel
Hi,

Try this in your web.xml file.


Secure Area
/*
GET
POST


CONFIDENTIAL



url-pattern is the list of pages, folders or whole webapp (/*). 

Regards,
Dhaval
--- hung ngole <[EMAIL PROTECTED]> wrote:

> Hi,
>   I'm using Tomcat 5 & I have configured SSL successful. But now I want to 
> use SSL for a
> particular pages not for all pages ( or for whole application ).
>   How can I do this? 
>   Thanks much,
>   Hung.
> 
>   
> -
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Tomcat 5.0.19 - softlink issue

2006-04-14 Thread Sandeep N
Hi,

 We have a web application deployed on Tomcat 5.0.19 running on Solaris 9. Our 
connection is https configured on port 8443. The web application runs fine.

Here is my issue.

We have two subfolders under the context folder named folderA and folderB. 
folderB is a softlink pointing to another folder outside of our context folder. 
The resources like images, reports etc stored under this folder is not 
accessible through URL whereas all the content stored under folderA can be 
accessed through url.Why I am not able to access anything stored under folderB?

Am I missing some settings or configuration??

Please advise.

Thanks
Sandeep. 


-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

RE: 5.5.16, Too many open files on startup

2006-04-14 Thread Corey Kaiser
Ah, yes, I wasn't setting the correct limit.
Thanks much, it works now...
But now Tomcat takes almost 5x longer to start up than it did with 5.5.15.
>From 7 seconds to 36 seconds.
It won't be restarted much, but that's a bit silly.
Why?

Corey

-Original Message-
From: Filip Hanik - Dev lists [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 13, 2006 11:34 AM
To: Tomcat Users List
Subject: Re: 5.5.16, Too many open files on startup


the question is if you're ulimit really is unlimited. there are a few 
settings, linux has 1024 for open files.

[EMAIL PROTECTED] tomcat]$ ulimit
unlimited

[EMAIL PROTECTED] tomcat]$ ulimit -a
core file size(blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size   (kbytes, -m) unlimited
open files(-n) 1024
pipe size  (512 bytes, -p) 8
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 7168
virtual memory(kbytes, -v) unlimited

Filip

Corey Kaiser wrote:
> Hi,
>
> I have a server.xml with 37 virtual hosts defined, each with 1 root
context
> also defined in the same file (yes, not recommended, but not explicitly
> disallowed either, right?).
>
> Tomcat starts up fine and is solid with this config on 5.5.15, but not on
> 5.5.16.
>
> After 14 loaded contexts on 5.5.16, I get "Too many open files" errors,
and
> exceptions like:
> Apr 10, 2006 5:56:23 PM org.apache.catalina.startup.ContextConfig
> processContextConfig
> SEVERE: Missing default web.xml, using application web.xml only
> conf/context.xml /usr/local/tomcat/conf/context.xml
> java.io.FileNotFoundException: /usr/local/tomcat/conf/context.xml (Too
many
> open files)
>
> That context.xml is in place and contains default values.
>
> I did notice that a change was made between 5.5.15 and 5.5.16 that may
have
> something to do with this (from the ChangeLog):
> Deploy folders which don't have a WEB-INF, and return an error when a
> context file does not contain a Context element (remm)
>
> Not sure why folders without a WEB-INF are being deployed now, as I have
> many folders that contain static content that I certainly don't want
> deployed as webapps.
>
> Also, I'm on Linux, and my ulimit is set to unlimited.
>
> Any help greatly appreciated.
> -corey
>
>
>
>
>
>
> -
> 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]



Re: stop ``ant install'' copying the app to /webapps

2006-04-14 Thread Aladin Alaily

LOL!

I read the first line of your response and automatically thought:
oh my god...

Then I laughed when I saw the "just kidding!" part.

You're welcome & thanks for the laugh.

Aladin



[EMAIL PROTECTED] wrote:


Aladin Alaily <[EMAIL PROTECTED]> wrote on 04/14/2006 12:45:52 PM:



[EMAIL PROTECTED] wrote:

This is a fundamental question, but I can't find an answer to it 


anywhere. 


Probably right in from of my nose.

I have set up my development environment exactly as directed in the 


tomcat 

docs.   When I ``ant install'', the app is copied to the 


/webapps 

directory, and a subsequent ``ant compile'' after a JSP change updates 


the 

copy in the build directory, but tomcat doesn't see it unless I do a 
``remove'' and ``install''.  I expected ``install'' to deploy it from 


the 


build directory.

Is there some setting in server.xml or web.xml that allows this?  I 


don't 


want to develop in the /webapps directory.

Thanks

Tim S.



Hi Tim,

Assuming your application is called "tim" and you want to map it to 


"/tim"


Place a tim.xml file in: ${TOMCAT_INSTALLATION}/conf/Catalina/localhost/

tim.xml contains:
=



build.xml:
==
Tell ant to compile the code in the location specified in tim.xml

Now, your applicaiton will reload everytime you re-build and you won't 
have to develop in the /webapps directory.

Hope this helps.
Aladin



But my application isn't called "tim".

Just kidding!  That works great, thanks.  This should be mentioned in the 
Application Developer's Guide of the Tomcat docs.


Tim S.




__
This email has been scanned by the MessageLabs Email Security System.
Our company accepts no liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.

WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.

11/29/2003 ACE Software, LLC

-
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]



Re: stop ``ant install'' copying the app to /webapps

2006-04-14 Thread tschaeffer
Aladin Alaily <[EMAIL PROTECTED]> wrote on 04/14/2006 12:45:52 PM:
> 
> 
> [EMAIL PROTECTED] wrote:
> > This is a fundamental question, but I can't find an answer to it 
anywhere. 
> >  Probably right in from of my nose.
> > 
> > I have set up my development environment exactly as directed in the 
tomcat 
> > docs.   When I ``ant install'', the app is copied to the 
/webapps 
> > directory, and a subsequent ``ant compile'' after a JSP change updates 
the 
> > copy in the build directory, but tomcat doesn't see it unless I do a 
> > ``remove'' and ``install''.  I expected ``install'' to deploy it from 
the 
> > build directory.
> > 
> > Is there some setting in server.xml or web.xml that allows this?  I 
don't 
> > want to develop in the /webapps directory.
> > 
> > Thanks
> > 
> > Tim S.
> > 
> Hi Tim,
> 
> Assuming your application is called "tim" and you want to map it to 
"/tim"
> 
> Place a tim.xml file in: ${TOMCAT_INSTALLATION}/conf/Catalina/localhost/
> 
> tim.xml contains:
> =
> 
> 
> build.xml:
> ==
> Tell ant to compile the code in the location specified in tim.xml
> 
> Now, your applicaiton will reload everytime you re-build and you won't 
> have to develop in the /webapps directory.
> Hope this helps.
> Aladin

But my application isn't called "tim".

Just kidding!  That works great, thanks.  This should be mentioned in the 
Application Developer's Guide of the Tomcat docs.

Tim S.




__
This email has been scanned by the MessageLabs Email Security System.
Our company accepts no liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

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



Re: Setting up to use 443

2006-04-14 Thread David Smith
Can you tell us the exact error?  Internet Explorer throws up that error 
in a lot of situations. This could be the result of a firewall or 
another process on 443. Anything show up in the logs?  Can you try it 
with Firefox for a better error display?  TCPView from SysInternals can 
show open and connected ports as well.


-- David

David Shaw wrote:
Sorry, I forgot to mention that I have root (or administrative) access 
and on an WindowsXP system.


Original Message Follows
From: Mike Sabroff <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Setting up to use 443
Date: Thu, 13 Apr 2006 20:05:16 -0500

run as root else nothing less than 1024

David Shaw wrote:
I have troubled setting up server.xml to use port 443 - always report 
that "The page cannot be displayed" in IE.  8080 and 8443 works fine 
though.  Using the same setting in server.xml and just changing the 
port to use 8443 instead of 443, I can access using 
https://localhost:8443.  Any idea what I need to set in order to get 
443 working?


Thanks,

David

_
Don�t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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

_
On the road to retirement? Check out MSN Life Events for advice on how 
to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



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




--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


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



Re: Setting up to use 443

2006-04-14 Thread David Shaw
Sorry, I forgot to mention that I have root (or administrative) access and 
on an WindowsXP system.


Original Message Follows
From: Mike Sabroff <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Setting up to use 443
Date: Thu, 13 Apr 2006 20:05:16 -0500

run as root else nothing less than 1024

David Shaw wrote:
I have troubled setting up server.xml to use port 443 - always report that 
"The page cannot be displayed" in IE.  8080 and 8443 works fine though.  
Using the same setting in server.xml and just changing the port to use 8443 
instead of 443, I can access using https://localhost:8443.  Any idea what I 
need to set in order to get 443 working?


Thanks,

David

_
Don�t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



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



Re: stop ``ant install'' copying the app to /webapps

2006-04-14 Thread Aladin Alaily

Hi Tim,

Assuming your application is called "tim" and you want to map it to "/tim"

Place a tim.xml file in: ${TOMCAT_INSTALLATION}/conf/Catalina/localhost/

tim.xml contains:
=



build.xml:
==
Tell ant to compile the code in the location specified in tim.xml


Now, your applicaiton will reload everytime you re-build and you won't 
have to develop in the /webapps directory.


Hope this helps.
Aladin




[EMAIL PROTECTED] wrote:
This is a fundamental question, but I can't find an answer to it anywhere. 
 Probably right in from of my nose.


I have set up my development environment exactly as directed in the tomcat 
docs.   When I ``ant install'', the app is copied to the /webapps 
directory, and a subsequent ``ant compile'' after a JSP change updates the 
copy in the build directory, but tomcat doesn't see it unless I do a 
``remove'' and ``install''.  I expected ``install'' to deploy it from the 
build directory.


Is there some setting in server.xml or web.xml that allows this?  I don't 
want to develop in the /webapps directory.


Thanks

Tim S.

__
This email has been scanned by the MessageLabs Email Security System.
Our company accepts no liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.

WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.

11/29/2003 ACE Software, LLC

-
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]



Re: webapp slow on first access every morning

2006-04-14 Thread Filip Hanik - Dev Lists


you have 8GB of RAM, but you only gave tomcat 256m?

Filip

Edward Quick wrote:
Thanks Peter. I've checked the performance history but there is very 
little running on the box, and CPU is usually 99% idle. There is also 
8GB of RAM on here, and usually 6GB free.


Ed.


Have you monitored your server during that time to work out what is the
rate-limiter?  On UNIX, 'vmstat 5' is a good (if terse) choice; on
Windows, performance monitor and look for %CPU, memory pages per second,
and disk I/O.

My own guess, based on nothing at all, is that other processes (backup,
AV scans, ...) running overnight have caused the Java VM running Tomcat
to be paged out and that your machine's taking a long time to page
everything back in.  But I wouldn't put money on it.

- Peter




-
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]



Re: IE 20 session cookies limitation

2006-04-14 Thread Rick Wong
It's been a while since my last posting of this topic.  I have a 
work-around that perhaps someone may find it useful.


I worked around the issue by implementing a Tomcat Valve, and screen out 
for the jsessionsso cookie on every request.  If I find it, I reinsert 
it back into the response within the valve to touch the timestamp of the 
jssessionsso cookie.  This way, when IE wants to throw away a cookie, 
jsessionsso would be the last one it picks.  It's not a perfect solution 
but there is nothing I can do about IE's deficiency (how often do you 
see Microsoft rigidly conforms to a spec?)



Thanks,
--
Rick

Rick Wong wrote:

Hi,

I am using Tomcat 5.0.26.  I have 20+ web applications hooked up with 
single-sign-on.  Each web application generates a JESSIONID session 
cookie with a different path, and shares a single JSESSIONIDSSO.


When testing my suite of applications, I notice that IE consistently 
drops my login after accessing the 20th web application within a 
session.  I did some research and learned about RFC 2109 where HTTP 
agents should support a minimum of 20 session cookies per domain.  
That appears to be just what IE does.  The following Microsoft 
knowledgebase article explains that: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306070.  I 
suspect JSESSIONIDSSO was the oldest cookie, and was the first to get 
dropped by IE when reaching over 20 session cookies.  Firefox does not 
have this problem.


Knowing that I cannot easily refactor the application suite to make 
less number of web application (< 19), I am wondering if anyone else 
has this problem, and if and how I might work around this IE limitation.


Thanks,
--
Rick

-
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]



Tomcat & SSL

2006-04-14 Thread hung ngole
Hi,
  I'm using Tomcat 5 & I have configured SSL successful. But now I want to use 
SSL for a particular pages not for all pages ( or for whole application ).
  How can I do this? 
  Thanks much,
  Hung.


-
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

stop ``ant install'' copying the app to /webapps

2006-04-14 Thread tschaeffer
This is a fundamental question, but I can't find an answer to it anywhere. 
 Probably right in from of my nose.

I have set up my development environment exactly as directed in the tomcat 
docs.   When I ``ant install'', the app is copied to the /webapps 
directory, and a subsequent ``ant compile'' after a JSP change updates the 
copy in the build directory, but tomcat doesn't see it unless I do a 
``remove'' and ``install''.  I expected ``install'' to deploy it from the 
build directory.

Is there some setting in server.xml or web.xml that allows this?  I don't 
want to develop in the /webapps directory.

Thanks

Tim S.

__
This email has been scanned by the MessageLabs Email Security System.
Our company accepts no liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information
provided, unless that information is subsequently confirmed in writing.
Any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company.
WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the 
presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.
11/29/2003 ACE Software, LLC

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



Re: Tomcat and Sysdeo Eclipse Plugin

2006-04-14 Thread Mike Sabroff

Sounds like a Sysdeo problem not tomcat

Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379



Asad Habib wrote:
Hello. I am experiencing a problem trying to start Tomcat from Eclipse 
using the Sysdeo Plugin.


The error I get is as follows:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/catalina/startup/Bootstrap


I am running Tomcat 5.5.16 and using Eclipse 3.1.2 with Sysdeo Eclipse 
Tomcat Plugin 3.1.0 on Mac OS X. I had no problems using this plugin 
with Tomcat 5.5.9. When I try starting Tomcat from the command line 
via the Terminal application, everything works. Also, I checked and 
the Bootstrap class does exist in the Tomcat bin directory.


Any help would be appreciated. Thank you.

- Asad



-
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]



Re: Tomcat and Sysdeo Eclipse Plugin

2006-04-14 Thread Paul Singleton

Asad

(I doubt that something as fundamental as this is a difference
between 5.5.9 and 5.5.16)

Have you checked Eclipse's Window / Preferences... / Tomcat
to ensure that all references to Tomcat files refer to your
new 5.5.16 installation?

I get the same error if "Tomcat home" is set incorrectly in
these preferences.

cheers

Paul Singleton


Asad Habib wrote:
Hello. I am experiencing a problem trying to start Tomcat from Eclipse 
using the Sysdeo Plugin.


The error I get is as follows:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/catalina/startup/Bootstrap


I am running Tomcat 5.5.16 and using Eclipse 3.1.2 with Sysdeo Eclipse 
Tomcat Plugin 3.1.0 on Mac OS X. I had no problems using this plugin 
with Tomcat 5.5.9. When I try starting Tomcat from the command line via 
the Terminal application, everything works. Also, I checked and the 
Bootstrap class does exist in the Tomcat bin directory.


Any help would be appreciated. Thank you.

- Asad



-
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]



WebappClassLoader delegates to SystemClassLoader, not CustomClassLoader

2006-04-14 Thread Andrew McDowall
Hi,

I'm running into ClassLoader problems when using a custom ClassLoader
with an embedded Tomcat.  The problem, as I understand it, is arising
due to multiple versions of log4j being loaded by different ClassLoaders
resulting in ClassCastExceptions or expected interfaces not being
implemented.

In my main application's libraries I have log4j.jar - this is loaded by
a URLClassLoader, while in my WebApp's libraries I have a different
log4j.jar which is loaded by Tomcat's WebAppClassLoader.  Within my main
application I have an embedded Tomcat which is also loaded using the
URLClassLoader, thus Tomcat expects to use log4j classes that are bound
to the URLClassLoader, unfortunately the WebAppClassLoader does not
appear to be searching the URLClassLoader and instead loads log4j from
its own libraries.

As far as I can tell, the search order for the WebAppClassLoader never
actually delegates up beyond the Common-classLoader, instead it skips
straight to the SystemClassLoader avoiding my URLClassLoader.  I should
add that I have successfully implemented a 'hack' to my system which
uses the SystemClassLoader and have not encountered the same problems -
since when the WebAppClassLoader interrogates the SystemClassLoader the
expected version of log4j would be loaded.

Does anybody know of a way to get round this?  I'd assume that setting
my URLClassLoader to be the parent of the Common-ClassLoader would work
but I can't seem to find any documentation on how to achieve this.
Failing that is there a way to specify that Tomcat uses a subclass of
WebAppClassLoader (which I could write)?

 

Thanks in advance.

Andy McDowall.



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

RE: Embedded Tomcat stops deploying WARs when using custom ClassLoader

2006-04-14 Thread Andrew McDowall
It would appear that my problem was solved by simply changing the line
'new Catalina();' to 'new Embedded();', so now it unpacks.

-Original Message-
From: Andrew McDowall [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2006 16:56
To: users@tomcat.apache.org
Subject: Embedded Tomcat stops deploying WARs when using custom
ClassLoader

Hi,

I am currently working on a fairly complex system which provides a means
to incorporate 'pluggable' functionality using an embedded Tomcat -
essentially it allows WARs to be dropped into a specific directory, the
embedded Tomcat then unpacks and deploys the WAR.

This has been working without any problems up until a few days ago when
I started incorporating our own proprietary ClassLoader into the system.
The rationale behind the ClassLoader is that I need to provide a degree
of separation between certain sub-components of the system while still
providing common shared libraries for all components - much like the
ClassLoading solution provided by Catalina.  My own ClassLoader now
allows me to navigate a tree of child ClassLoaders in an order different
to that of the standard Java delegation model ie: in my solution I wish
to perform a depth-first search rather than simply being limited to one
branch. 

The solution implemented is working (give or take a few minor flaws)
except for now the embedded Tomcat no longer deploys WARs.  At first I
believed this to be an issue with the ContextClassLoader for the Thread
in which the embedded Tomcat runs, but after investigation I am not so
sure.  It should be noted that the embedded Tomcat itself does not
produce any errors so I am at a loss to understand exactly why it has
stopped working, it's as if it is failing silently.  None of the
configuration for Tomcat has changed between the versions using the
System ClassLoader and the new version using the new custom ClassLoader.

I would be very grateful for any help with this problem, thanks in
advance.

 

Andy McDowall



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina
Software, this communication is to be treated as confidential and the
information in it may not be used or disclosed except for the purpose
for which it has been sent. If you have reason to believe that you are
not the intended recipient of this communication, please contact the
sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, 
this communication is to be treated as confidential and the information in it 
may not be used or disclosed except for the purpose for which it has been sent. 
If you have reason to believe that you are not the intended recipient of this 
communication, please contact the sender immediately. 

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Re: RE Tomcat and SSL

2006-04-14 Thread Franck UB
Hi Klaus,


> coming back to my issue: How can I make sure that my certificate is 
> right for tomcat? Could I attach it at one of these eMails? Or are 
> attachments not allowed?  Could you test it?

I think this could be one solution. Today I am not in office. But you
can send your stuff to [EMAIL PROTECTED] and I take a look at it
on Tuesday. We are working with shibboleth and so certificates are one
of our job. So, I am interested in problems users have to create
certificates or to integrate them in their workspace.

-- Franck



> Would be great.
> 
> Thanks
> Klaus
> 
> 
> Klaus-F. Kaal schrieb:
> > Franck,
> >
> > I changed that and restartet Tomcat. No different reading in the logs
> >
> > Klaus
> >
> >
> >
> > Franck Borel schrieb:
> >>
> >>> Does that tell you more?
> >>>
> >> Not really. But I think you must augment the debug value to 99:
> >>
> >>  >>debug="99"
> >> />
> >>
> >> Better?
> >>
> >> -- Franck
> >>
> >> 
> >>
> >> -
> >> 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]



Tomcat and Sysdeo Eclipse Plugin

2006-04-14 Thread Asad Habib
Hello. I am experiencing a problem trying to start Tomcat from Eclipse 
using the Sysdeo Plugin.


The error I get is as follows:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/catalina/startup/Bootstrap


I am running Tomcat 5.5.16 and using Eclipse 3.1.2 with Sysdeo Eclipse 
Tomcat Plugin 3.1.0 on Mac OS X. I had no problems using this plugin with 
Tomcat 5.5.9. When I try starting Tomcat from the command line via the 
Terminal application, everything works. Also, I checked and the Bootstrap 
class does exist in the Tomcat bin directory.


Any help would be appreciated. Thank you.

- Asad



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



changes in tomcat realms between 5.5.7 and 5.5.16?

2006-04-14 Thread David Delbecq
Hello,

I have a webapp here which comes with it's own realms. It's working
prefectly in tomcat 5.5.7.
I deployed this application and copied the realm files
(common/lib/MyRealm-api.jar and server/lib/MyRealm-impl-1.0.jar) to a
new tomcat installation. I the deployed to webapp and tried to access a
secure area. To my surprise, it seems the user trying to access it is
identified ok (according to my realm logs, everything is ok), but gets a
refusal from tomcat. The exact same user and same .war (which includes a
context in META-INF/) has no problems with tomcat 5.5.7

What change in realm / identification management in tomcat could cause this?

Thanks for informations.

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