:doSecurityJpda with Tomcat 5.0.x

2005-04-22 Thread Marc Logemann
Hi,
i am trying to turn on Jpda AND securityManager on tomcat start without 
success. First it seems that its not possible to launch this 
configuration via parameters isnt it?

I modified the catalina.bat so that it reaches the :doSecurityJpda label 
on startup. Of course i ve set the policy file manually right before the 
%_EXECJAVA

Now i get:
JDWP unable to access JVMDI Version 1.
Maybe you need to start the VM with the -Xdebug option
Error occured during initialisation of VM
-Xrun library failed to init: jdwp
Can someone help me on this? Is there an easy way via catalina 
parameters and if not, how to start such a configuration?

Environment: Tomcat 5.0 latest, Windows, JRE 1.4.2_06
Thanks
--
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5.5.3 and JRE 1.5.0 on linux

2004-10-12 Thread Marc Logemann
Hi,
i am feeling a little bit silly to ask, but i have to ;-)
I installed JRE 1.5.0 and Tomcat 5.5.3 on linux, set the JAVA_HOME
to the JRE location and started tomcat with ./catalina start
Then i got the point to a JDK not a JRE error. I checked the 
setclasspath.sh and there is a paragraph that checks for javac and 
stuff. Do i miss something here? There must be some straightforward 
explanation for this, because i dont think the setclasspath.sh is from 
an old tomcat distro ;-)

Thanks for infos on that.
--
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5.5.3 and JRE 1.5.0 on linux

2004-10-12 Thread Marc Logemann
Remy Maucherat wrote:
On Tue, 12 Oct 2004 21:32:51 +0200, Marc Logemann [EMAIL PROTECTED] wrote:
Hi,
i am feeling a little bit silly to ask, but i have to ;-)
I installed JRE 1.5.0 and Tomcat 5.5.3 on linux, set the JAVA_HOME
to the JRE location and started tomcat with ./catalina start
Then i got the point to a JDK not a JRE error. I checked the
setclasspath.sh and there is a paragraph that checks for javac and
stuff. Do i miss something here? There must be some straightforward
explanation for this, because i dont think the setclasspath.sh is from
an old tomcat distro ;-)

I think nobody updated the shell scripts yet (either for Unix or
Windows). If you do hack them a little, it will work.
Remy,
thanks for pointing out. Of course its not very hard to do it, in fact i 
just removed the checks for javac and jdb and it runs like a charm. I 
somehow havent believed that the scripts are not updated yet and 
searched for the error on my site.


--
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DBCP Factory

2003-01-30 Thread Marc Logemann
Hi,

i am using 4.18 and i am wondering if its true that DBCP is the default factory for 
javax.sql.DataSource
resource definitions. I read it in the JNDI DataSource tomcat docs.

I defined the resource in the server.xml

Resource name=jdbc/db2dbcp auth=Container type=javax.sql.DataSource/
ResourceParams name=jdbc/db2dbcp
parameternamemaxActive/namevalue5/value/parameter
[..]

but on lookup it seems tomcat cant find the DBCP object factory. I searched for the 
DBCP libs
and couldnt find it either. Now i am confused.

1. Is DBCP bundlded with 4.18 ?
2. is it true that i dont need to declare the factory inside parameter?

thx for any hints, i am mainly puzzled since i heard that tyrex is not default 
anymore, but
tyrex is the only pooling library i can find in the tomcat distro.

Thanks for clearifying.
---
greetings from
Marc Logemann
http://www.logemann.info


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




RE: DBCP Factory

2003-01-30 Thread Marc Logemann
Hi,

i tried also the factory paramter, w/o success, can somebody tell me where the DBCP 
lib should be?
i checked common/lib, but didnt see something.

 DBCP is bundled with tomcat, but AFAIK is not the
 default factory for javax.sql.DataSource.

 According to
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-h
 owto.htm
 you have to explicitly set the factory:

 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value


---
greetings from
Marc Logemann
http://www.logemann.info

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




RE: DBCP Factory

2003-01-30 Thread Marc Logemann
Hi,

ohhh i DLed the LE version, of course i thought that LE only means that libs like
xml parser are missing, cause they are bundled in jdk1.4. But DBCP is missing too.


 Which file did you download ?
 tomcat-4.1.18.tar.gz contains
 jakarta-tomcat-4.1.18/common/lib/commons-dbcp.jar
 and the other jar files that belong to it.

 -Original Message-
 From: Marc Logemann [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 30, 2003 3:08 PM
 To: [EMAIL PROTECTED]
 Subject: RE: DBCP Factory


 i tried also the factory paramter, w/o success, can somebody
 tell me where the DBCP lib should be?
 i checked common/lib, but didnt see something.


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

---
greetings from
Marc Logemann
http://www.logemann.info

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




BasicDataSourceFactory (dbcp)

2002-07-12 Thread Marc Logemann

Hi,

i just read 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
and saw that dbcp uses username as a property for their DataSource Implementation.

I allways thought that the specs say that one should use user.
Shouldnt this be consistent across all DataSource implementations?


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




Re: BasicDataSourceFactory (dbcp)

2002-07-12 Thread Marc Logemann

Hi,

 I have posted several times regarding this! In answer to your question,

sorry to bother you :)

 it ought to be, but because there is no standard DTD for servlet
 containers, or EJB containers, everybody can do his own thing! :-(

i dont know if a DTD would help out, i mean we cant define bean
properties for a custom datasource in advance in an DTD or?

 I still think that there ought to be an DTD for server.xml, and maybe a
 way to map 'tomcat standard' parameter names to individual DataSource
 implementations.
 IMO, such a DTD (if documented!) would cut out a large proportion of the
 posts on this list!

THe point is, SUN defined at least some property names in
http://java.sun.com/products/jdbc/jdbc20.stdext.pdf Paragraph: 5.3.1
it would be nice if at least the common ones would be uniform.

Also just my 2 cents.


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




Debugging Servlets with IDEA (or just an IDE)

2002-07-11 Thread Marc Logemann

Hi,

Tomcat 4.0.4 on Windows

i am one of these IDEA guys who frequently want to debug servlets in the
IDE. IntelliJ suggests to integrate tomcat into the RUN proccess so that you can
test servlets and get the output to IDE console and of course being able to add
breakpoints and stuff.

Here is the startup for IDEA (this could be used for any other IDE also IMO)

Main Class: org.apache.catalina.startup.Bootstrap

VM Parms: 
-Djava.endorsed.dirs=c:\development\java\tomcat\bin;c:\development\java\tomcat\common\lib
-Dcatalina.base=c:\development\java\tomcat
-Dcatalina.home=c:\development\java\tomcat
-Djava.io.tmpdir=c:\development\java\tomcat\temp

Program Parms: start

WorkDir: c:\development\java\tomcat

In fact everything seems to work fine, until you reach some special issues:

- using /manager to reload, stop/start web-application
- using JNDI to obtain DataSources or whatever

the first issue is heavy, cause after i have done changes to the webapp, i normally
stop the webapp via /manager (with ANT task), copy the new classes to the webapp folder
and then do a start via /manager. And again each log says that /manager did a good 
job.
I ve also done it with reload of course. But the realitiy is, that tomcat (still 
running
under IDEA) is still using the old classes.

the second issue with JDNI is also somehow crazy, i am just not able to do a lookup on 
any
object.

its for sure no config thing, cause when i use the same insallation and start it on 
the shell,
everything works as exptected.

Now i am wondering where is the difference between calling bootstrap.jar start on 
the DOS
shell and calling the same via some tool.

Has anyone experience with tomcat integration in IDEs especially in IDEA? Or has 
someone ideas
what could go wrong?

thx


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




way to get tomcat versionnumber on commandline

2002-07-04 Thread Marc Logemann

Hi,

is there a way to resolve the tomcat version number on command line?
Or are there any other hints in the tomcat dirstructure / files?

thx
---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




Unknown Source in Trace?

2002-07-03 Thread Marc Logemann

Hi,

sometimes when tomcat prints out traces, i get the following:

java.lang.NullPointerException
at de.bahr.mapping.MOCompany.getByPrimaryKey(Unknown Source)
at de.bahr.erp.servlets.LoginServlet.showMainMenu(LoginServlet.java:108)

Why do i get Unknown Source in the first line, i mean this makes it a little
bit hard to debug the class, what can i do that tomcat knows the source and
can point me to the correct line?

Thx
---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




Re: AW: Unknown Source in Trace?

2002-07-03 Thread Marc Logemann

Hi,

this class is not a servlet, but i understand your point and will try
to play around with compiler settings...

 You have to compile your servlets with the -g option.

 If you still don't get line numbers you may have to disable
 the jit/hotspot compiler.

 -Ursprüngliche Nachricht-
 Von: Marc Logemann [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 3. Juli 2002 10:53
 An: [EMAIL PROTECTED]
 Betreff: Unknown Source in Trace?

 sometimes when tomcat prints out traces, i get the following:

 java.lang.NullPointerException
  at de.bahr.mapping.MOCompany.getByPrimaryKey(Unknown Source)
  at
 de.bahr.erp.servlets.LoginServlet.showMainMenu(LoginServlet.java:108)

 Why do i get Unknown Source in the first line, i mean this  makes
 it a little bit hard to debug the class, what can i do that tomcat
 knows the source and can point me to the correct line?

---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Marc Logemann

Hi,

i am one of the guys trying to get a valid MysqlDataSource reference via
JNDI. But i am getting crazy without knowing where the problem is (perhaps
the reason is, i cant debug JNDI too good, cause i am no expert in it..)

i have the following:

server.xml
--
context 
Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/
ResourceParams name=jdbc/TestDB
parameter
namefactory/name
valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/value
  /parameter
parameter nameuser/namevalueroot/value /parameter
parameter namepassword/namevalue/value /parameter
parameter 
namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSource/value/parameter
parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value 
/parameter
/ResourceParams
/context

web.xml
---
web-app
resource-ref
  descriptionDataSource MySQL/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-type javax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app

i placed the mysql mm jar into commons/lib

When i run a servlet with the standard lookup code:
 try {
 javax.naming.Context jndictx = new InitialContext();
 if (jndictx == null) throw new Exception(Boom - No Context);

 DataSource ds =
 (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB);
 if (ds != null) {
[..]

i get no exception but i also dont get any reference returned from lookup.

I read tons of websites including the tomcat JNDI howto, without beeing able to 
understand it
better (in fact it gets worse cause of thousands of combinations in the web for 
server.xml and
web.xml)

When i leave out factory in the server.xml, i get a tyrex exception regarding loading 
a factory...

I just thought that using a datasource is better than just calling the DriverManager, 
but the
effort seems amazing... or i am too unclever... whatever...

thx for help.
---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Marc Logemann

Hi,

i figured out how to use the default DataSource with MySQL:

Resource name=jdbc/mysql auth=Container type=javax.sql.DataSource/
ResourceParams name=jdbc/mysql
parameter nameuser/namevalueroot/value /parameter
parameter namepassword/namevalue/value /parameter
parameter 
namedriverClassName/namevalueorg.gjt.mm.mysql.Driver/value/parameter
parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value 
/parameter
/ResourceParams

But i wonder how i can use the MysqlDataSource class and i wonder where is the real 
need to
use the MysqlDataSource class.

With this scenario however, is there a connection pooling implied? For me it seems that
when i do DataSource.getConnection() i just get a normal MySQL connection as when i do
classForName(Driver) or?


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




ANT tasks

2002-06-25 Thread Marc Logemann

Hi,

i am just doing some build tests with the ANT tasks supplied by the Tomcat
CVS.

I am wondering if its so good to throw an exception on failing to start
an webapp with org.apache.catalina.ant.StartTask

When for some reason my webapp is allready started, i dont want to have my build
fail with buildError.

Instead there could be an attribute buildErrorOnFail which can be set to
true or false, indicating how to proceed on error situation:


taskdef name=tcstart classname=org.apache.catalina.ant.StartTask/
tcstart  url=${catalina.url} username=${catalina.username} 
password=${catalina.password}
path=/webapp/ builderroronfail=false

If we doesnt provide this, the user must handle this situation in ANT itself which is
quite an emberassing issue.

This goes also for some other Tasks in the tomcat distro.

Any comments on this? I could provide a version of the tasks which is capable of that, 
Craig
i think you coded them, i would like to hear especially your oppinion :)

bye


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




tomcat 3.2.4 versus recent one

2002-06-10 Thread Marc Logemann

Hi,

i am dealing with a project on an IBM iSeries (AS/400). There you can use
a pre-installed tomcat 3.2.4 or you can chose to install a recent one of course.
Cause installing a recent one would require some efforts (we speak of more than
one machine in this project), i want to ask if there are fundamental differences
so that its not wise to use 3.2.4 ...

Any comments appreciated.




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




install/remove via manager (ant)

2002-05-27 Thread Marc Logemann

Hi,

i am using (or trying) to use ant for redeploying my applications on my 
development-site.
Perhaps you can help me with the following tasks:

1. i want to install a webapplication, so i do:

tcinstall url=${catalina.url} username=${catalina.username} 
password=${catalina.password}
path=/mshop war=jar:file://c:\dev\my.war!//

After this task, ant responds: OK - installed application at context path /mshop

When i look in the webapps folder of tomcat, i see an empty mshop folder (?). So where 
is my actual
application? THe path to the war file is correct and the content is also correct.

2. assuming that i have a running application, is it suitable to do /remove and 
/install in order
to see changes i made to the war file (web.xml or some classes in libs)? What is the 
best combination
for a real hot-redeploy? I know that there is a reload, but remember that i have a new 
war file somewhere
on my disk which must be re-deployed, so i dont do any copies to /tomcat/webapps/mshop 
in order
to change some parts of my app, i want to package a new war and (re)install it on the 
fly.

Any comments on this are highly appreciated :)




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




reloading with ant

2002-05-22 Thread Marc Logemann

Hi,

i just wanna ask if the following scenario is the best for re-deploying WARs:

I am doing my build task with ant and transfer the WAR file of my application
into the webapps folder of tomcat. Then i do a GET task with ant in order to
re-deploy it, exacltly i would do a MANAGER REMOVE and MANAGER INSTALL with ant.
I could delete the existing appfolder before i do install, but it should be the same.

Are there any better routines for automatic re-deploy or hot-deploy? 

Of course in order to do a manager remoce or manager install, i have to edit the 
web.xml
of the manager app in order not to come up with basic http authentication or?

I am quite sure that there must be tons of developers which solved this problem
cause the ANT-Tomcat workflow seems very common :)




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