Re: Classpath for JSP

2010-04-27 Thread Yucca Nel
Try ensuring that no conflicts from duplicate libs in WEB-INF/lib sometimes 
libs are already provided by container and container will not be able to 
resolve which of the libs to use.


--
From: Tobias Crefeld t...@cataneo.eu
Sent: Monday, April 26, 2010 8:15 PM
To: users@tomcat.apache.org
Subject: Re: Classpath for JSP


Am Mon, 26 Apr 2010 13:22:49 -0400
schrieb Reuven Koblick reu...@koblick.com:


I verified that the class that was not found is indeed
in /WEB-INF/classes. Also, classes in *.jar files in WEB-INF/lib are
found. Does anyone have any thoughts or suggestions?


Maybe wrong rights for directories or files in the classes-directory?

Is the class at the correct place within the directory tree compared to
the class-hierarchy?

What does catalina.out report exactly?

There is a nice management tool called Lambda-Probe that could give you
some assistance under its menu applications/attributes. You get it
as a war-file at http://www.lambdaprobe.org/ .


Regards,
Tobias.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Classpath for JSP

2010-04-26 Thread Reuven Koblick
Newbie question:

I'm getting an error when code in a *.jsp file tries to instantiate a class
it is not found by the compiler used by Tomcat6. But the documentation says,
*WebappX* - A class loader is created for each web application that is
deployed in a single Tomcat 6 instance. *All unpacked classes and resources
in the /WEB-INF/classes director*y of your web application archive, plus
classes and resources in JAR files under the /WEB-INF/lib directory of your
web application archive, are made visible to the containing web application,
but to no others.

I verified that the class that was not found is indeed in /WEB-INF/classes.
Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have any
thoughts or suggestions?

Thanks in advance,
Reuven Koblick


Re: Classpath for JSP

2010-04-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Reuven,

On 4/26/2010 1:22 PM, Reuven Koblick wrote:
 I'm getting an error when code in a *.jsp file tries to instantiate a class
 [that] is not found by the compiler used by Tomcat6.

[snip]

 I verified that the class that was not found is indeed in /WEB-INF/classes.

Can you be specific? Where is the .class file for that class (including
full path)?

 Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have any
 thoughts or suggestions?

Can you post the import lines from the JSP as well?

Anything else that's relevant (symlinks, network file system, etc.)?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
=uV0D
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classpath for JSP

2010-04-26 Thread Reuven Koblick
Sure Chris more specifically, from the localhost.*.log

An error occurred at line: 21 in the jsp file:
/admin/GenerateTriggersManually.jsp
The constructor DB_Connection() is undefined
18: body
19:
20: %
21: DB_Connection dbCon = new DB_Connection();
22:
23: int timeInterval = 1;
24:

Here is the JSP file from the webapps/${appname} directory
less admin/GenerateTriggersManually.jsp

!doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
%...@page contentType=text/html%
%...@page pageEncoding=UTF-8%
%...@page import=com.bestrictlypersonal.db.DB_Connection %
%...@page import=com.bestrictlypersonal.trigger.* %
%...@page import=com.bestrictlypersonal.info.Volunteer %
%...@page
import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
%
%...@page import=com.bestrictlypersonal.error.ProcessError %
%...@page import=com.bestrictlypersonal.email.Email%
%...@page import=com.bestrictlypersonal.setup.* %
%...@page import=com.bestrictlypersonal.util.* %
%...@page import=com.bestrictlypersonal.info.Volunteer%



html
headtitleJSP Page/title/head
body

%
DB_Connection dbCon = new DB_Connection();

int timeInterval = 1;

lastly, I go to
webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the file
DB_Connection.class is present and accounted for.

Hope that is enough specific.

Reuven







On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Reuven,

 On 4/26/2010 1:22 PM, Reuven Koblick wrote:
  I'm getting an error when code in a *.jsp file tries to instantiate a
 class
  [that] is not found by the compiler used by Tomcat6.

 [snip]

  I verified that the class that was not found is indeed in
 /WEB-INF/classes.

 Can you be specific? Where is the .class file for that class (including
 full path)?

  Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have
 any
  thoughts or suggestions?

 Can you post the import lines from the JSP as well?

 Anything else that's relevant (symlinks, network file system, etc.)?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
 mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
 =uV0D
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Classpath for JSP

2010-04-26 Thread Tobias Crefeld
Am Mon, 26 Apr 2010 13:22:49 -0400
schrieb Reuven Koblick reu...@koblick.com:

 I verified that the class that was not found is indeed
 in /WEB-INF/classes. Also, classes in *.jar files in WEB-INF/lib are
 found. Does anyone have any thoughts or suggestions?

Maybe wrong rights for directories or files in the classes-directory?

Is the class at the correct place within the directory tree compared to
the class-hierarchy?

What does catalina.out report exactly?

There is a nice management tool called Lambda-Probe that could give you
some assistance under its menu applications/attributes. You get it
as a war-file at http://www.lambdaprobe.org/ .


Regards,
 Tobias.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classpath for JSP

2010-04-26 Thread Reuven Koblick
Here is the catalina.out file:

Apr 25, 2010 3:25:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/home/reuven/sp00/jre1.6.0_18/lib/i386/server:/home/reuven/sp00/jre1.6.0_18/lib/i386:/home/reuven/sp00/jre1.6.0_18/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Apr 25, 2010 3:25:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 25, 2010 3:25:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 690 ms
Apr 25, 2010 3:25:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 25, 2010 3:25:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Apr 25, 2010 3:25:31 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Apr 25, 2010 3:25:32 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Apr 25, 2010 3:25:32 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sp00.war
Apr 25, 2010 3:25:33 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sample.war
Apr 25, 2010 3:25:33 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory docs
Apr 25, 2010 3:25:33 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory ROOT
Apr 25, 2010 3:25:33 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory examples
Apr 25, 2010 3:25:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 25, 2010 3:25:33 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 25, 2010 3:25:33 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/24  config=null
Apr 25, 2010 3:25:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2033 ms


Thanks Tobias, I'll check out lambdaprobe

On Mon, Apr 26, 2010 at 2:15 PM, Tobias Crefeld t...@cataneo.eu wrote:

 Am Mon, 26 Apr 2010 13:22:49 -0400
 schrieb Reuven Koblick reu...@koblick.com:

  I verified that the class that was not found is indeed
  in /WEB-INF/classes. Also, classes in *.jar files in WEB-INF/lib are
  found. Does anyone have any thoughts or suggestions?

 Maybe wrong rights for directories or files in the classes-directory?


Everything installed is under my (reuven) ownership. That includes Tomcat,
Java SDK, JRE, everything.


 Is the class at the correct place within the directory tree compared to
 the class-hierarchy?


Yes


 What does catalina.out report exactly?

 There is a nice management tool called Lambda-Probe that could give you
 some assistance under its menu applications/attributes. You get it
 as a war-file at http://www.lambdaprobe.org/ .


 Regards,
  Tobias.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Classpath for JSP

2010-04-26 Thread Kris Schneider
On Mon, Apr 26, 2010 at 2:11 PM, Reuven Koblick groovyro...@gmail.com wrote:
 Sure Chris more specifically, from the localhost.*.log

 An error occurred at line: 21 in the jsp file:
 /admin/GenerateTriggersManually.jsp
 The constructor DB_Connection() is undefined

Does DB_Connection actually have a no-arg constructor 'cause the
compiler doesn't seem to think so...

 18:     body
 19:
 20: %
 21:         DB_Connection dbCon = new DB_Connection();
 22:
 23:         int timeInterval = 1;
 24:

 Here is the JSP file from the webapps/${appname} directory
 less admin/GenerateTriggersManually.jsp

 !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
 %...@page contentType=text/html%
 %...@page pageEncoding=UTF-8%
 %...@page import=com.bestrictlypersonal.db.DB_Connection %
 %...@page import=com.bestrictlypersonal.trigger.* %
 %...@page import=com.bestrictlypersonal.info.Volunteer %
 %...@page
 import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
 %
 %...@page import=com.bestrictlypersonal.error.ProcessError %
 %...@page import=com.bestrictlypersonal.email.Email%
 %...@page import=com.bestrictlypersonal.setup.* %
 %...@page import=com.bestrictlypersonal.util.* %
 %...@page import=com.bestrictlypersonal.info.Volunteer%



 html
    headtitleJSP Page/title/head
    body

 %
        DB_Connection dbCon = new DB_Connection();

        int timeInterval = 1;

 lastly, I go to
 webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the file
 DB_Connection.class is present and accounted for.

 Hope that is enough specific.

 Reuven







 On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Reuven,

 On 4/26/2010 1:22 PM, Reuven Koblick wrote:
  I'm getting an error when code in a *.jsp file tries to instantiate a
 class
  [that] is not found by the compiler used by Tomcat6.

 [snip]

  I verified that the class that was not found is indeed in
 /WEB-INF/classes.

 Can you be specific? Where is the .class file for that class (including
 full path)?

  Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have
 any
  thoughts or suggestions?

 Can you post the import lines from the JSP as well?

 Anything else that's relevant (symlinks, network file system, etc.)?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
 mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
 =uV0D
 -END PGP SIGNATURE-

-- 
Kris Schneider

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Classpath for JSP

2010-04-26 Thread Harry Metske
Reuven,

you say the error is it is not found by the compiler used by Tomcat6, but
that is not clear from the JSP compiler output.
It says The constructor DB_Connection() is undefined, so Kris's
suggestion is right.
You could split the statement in a declaration and an assignment to prove
it:

DB_Connection dbCon;
dbCon = new DB_Connection();

Also, do you get this error only if you declare the DB_Connection() in a
JSP, or also if you declare it in another Java class ?
(the JSP compiler uses a slightly different classpath than the webapp
classloader)

regards,
Harry


2010/4/26 Kris Schneider kschnei...@gmail.com

 On Mon, Apr 26, 2010 at 2:11 PM, Reuven Koblick groovyro...@gmail.com
 wrote:
  Sure Chris more specifically, from the localhost.*.log
 
  An error occurred at line: 21 in the jsp file:
  /admin/GenerateTriggersManually.jsp
  The constructor DB_Connection() is undefined

 Does DB_Connection actually have a no-arg constructor 'cause the
 compiler doesn't seem to think so...

  18: body
  19:
  20: %
  21: DB_Connection dbCon = new DB_Connection();
  22:
  23: int timeInterval = 1;
  24:
 
  Here is the JSP file from the webapps/${appname} directory
  less admin/GenerateTriggersManually.jsp
 
  !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
  %...@page contentType=text/html%
  %...@page pageEncoding=UTF-8%
  %...@page import=com.bestrictlypersonal.db.DB_Connection %
  %...@page import=com.bestrictlypersonal.trigger.* %
  %...@page import=com.bestrictlypersonal.info.Volunteer %
  %...@page
 
 import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
  %
  %...@page import=com.bestrictlypersonal.error.ProcessError %
  %...@page import=com.bestrictlypersonal.email.Email%
  %...@page import=com.bestrictlypersonal.setup.* %
  %...@page import=com.bestrictlypersonal.util.* %
  %...@page import=com.bestrictlypersonal.info.Volunteer%
 
 
 
  html
 headtitleJSP Page/title/head
 body
 
  %
 DB_Connection dbCon = new DB_Connection();
 
 int timeInterval = 1;
 
  lastly, I go to
  webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the
 file
  DB_Connection.class is present and accounted for.
 
  Hope that is enough specific.
 
  Reuven
 
 
 
 
 
 
 
  On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
  ch...@christopherschultz.net wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Reuven,
 
  On 4/26/2010 1:22 PM, Reuven Koblick wrote:
   I'm getting an error when code in a *.jsp file tries to instantiate a
  class
   [that] is not found by the compiler used by Tomcat6.
 
  [snip]
 
   I verified that the class that was not found is indeed in
  /WEB-INF/classes.
 
  Can you be specific? Where is the .class file for that class (including
  full path)?
 
   Also, classes in *.jar files in WEB-INF/lib are found. Does anyone
 have
  any
   thoughts or suggestions?
 
  Can you post the import lines from the JSP as well?
 
  Anything else that's relevant (symlinks, network file system, etc.)?
 
  - -chris
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.10 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
  iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
  mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
  =uV0D
  -END PGP SIGNATURE-

 --
 Kris Schneider

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Classpath for JSP

2010-04-26 Thread Reuven Koblick
Harry,

I looked at the java class files and verified there is no constructor
without arguments. That's good enough for me. You're correct that my error
description fell short of the mark. As expected, the compiler output is much
more precise than my description. That's probably why Chris Schultz asked
for more specifics.

I'm new here and can't tell everyone how much I appreciate your help and how
quick it all came. I'm new to Tomcat and JSP -- usually work with a
different framework in a different language. You all couldn't be more
helpful.

Reuven Koblick

On Mon, Apr 26, 2010 at 4:14 PM, Harry Metske harry.met...@gmail.comwrote:

 Reuven,

 you say the error is it is not found by the compiler used by Tomcat6, but
 that is not clear from the JSP compiler output.
 It says The constructor DB_Connection() is undefined, so Kris's
 suggestion is right.
 You could split the statement in a declaration and an assignment to prove
 it:

 DB_Connection dbCon;
 dbCon = new DB_Connection();

 Also, do you get this error only if you declare the DB_Connection() in a
 JSP, or also if you declare it in another Java class ?
 (the JSP compiler uses a slightly different classpath than the webapp
 classloader)

 regards,
 Harry


 2010/4/26 Kris Schneider kschnei...@gmail.com

  On Mon, Apr 26, 2010 at 2:11 PM, Reuven Koblick groovyro...@gmail.com
  wrote:
   Sure Chris more specifically, from the localhost.*.log
  
   An error occurred at line: 21 in the jsp file:
   /admin/GenerateTriggersManually.jsp
   The constructor DB_Connection() is undefined
 
  Does DB_Connection actually have a no-arg constructor 'cause the
  compiler doesn't seem to think so...
 
   18: body
   19:
   20: %
   21: DB_Connection dbCon = new DB_Connection();
   22:
   23: int timeInterval = 1;
   24:
  
   Here is the JSP file from the webapps/${appname} directory
   less admin/GenerateTriggersManually.jsp
  
   !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN
   %...@page contentType=text/html%
   %...@page pageEncoding=UTF-8%
   %...@page import=com.bestrictlypersonal.db.DB_Connection %
   %...@page import=com.bestrictlypersonal.trigger.* %
   %...@page import=com.bestrictlypersonal.info.Volunteer %
   %...@page
  
 
 import=com.bestrictlypersonal.db.getTrigger.DB_GetInterruptedSessionReportTrigger
   %
   %...@page import=com.bestrictlypersonal.error.ProcessError %
   %...@page import=com.bestrictlypersonal.email.Email%
   %...@page import=com.bestrictlypersonal.setup.* %
   %...@page import=com.bestrictlypersonal.util.* %
   %...@page import=com.bestrictlypersonal.info.Volunteer%
  
  
  
   html
  headtitleJSP Page/title/head
  body
  
   %
  DB_Connection dbCon = new DB_Connection();
  
  int timeInterval = 1;
  
   lastly, I go to
   webapps/${app-name}/WEB-INF/classes/com/bestrictlypersonal/db and the
  file
   DB_Connection.class is present and accounted for.
  
   Hope that is enough specific.
  
   Reuven
  
  
  
  
  
  
  
   On Mon, Apr 26, 2010 at 1:42 PM, Christopher Schultz 
   ch...@christopherschultz.net wrote:
  
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA1
  
   Reuven,
  
   On 4/26/2010 1:22 PM, Reuven Koblick wrote:
I'm getting an error when code in a *.jsp file tries to instantiate
 a
   class
[that] is not found by the compiler used by Tomcat6.
  
   [snip]
  
I verified that the class that was not found is indeed in
   /WEB-INF/classes.
  
   Can you be specific? Where is the .class file for that class
 (including
   full path)?
  
Also, classes in *.jar files in WEB-INF/lib are found. Does anyone
  have
   any
thoughts or suggestions?
  
   Can you post the import lines from the JSP as well?
  
   Anything else that's relevant (symlinks, network file system, etc.)?
  
   - -chris
   -BEGIN PGP SIGNATURE-
   Version: GnuPG v1.4.10 (MingW32)
   Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
  
   iEYEARECAAYFAkvV0IcACgkQ9CaO5/Lv0PA+5ACguUaVhNrjTQS3c3r4fXxpIl/v
   mBQAoKLuW9++5QpV/tRcFKQV9QAHC8V+
   =uV0D
   -END PGP SIGNATURE-
 
  --
  Kris Schneider
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org