Re: [Resin-interest] Classpath problem

2007-09-11 Thread Janene McCrillis
Hi Joe,

Thanks, I did remove it. Not that it helped ;)

There was more to the messages, basically going down the list of classes
that were undefined. 

I have changed the package the servlet is in to be in the same hierarchy
as others being run and that has somehow resolved this issue, even
though the rest of the servlets don't use the apache commons. I have no
idea why it's now working again, but I'll be grateful for it. Thanks for
the help!

Janene McCrillis
--

Message: 3
Date: Mon, 10 Sep 2007 08:46:22 -1000
From: Joe Dane [EMAIL PROTECTED]
Subject: Re: [Resin-interest] Classpath problem
To: General Discussion for the Resin application server
resin-interest@caucho.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


I will reiterate Daniel's good advice: never put application  
libraries/classes in the global classpath, unless you are  
absolutely certain you know what you're doing.  Even then, you  
probably should avoid the practice.

As to your particular problem, I notice that the error message seems  
a bit odd:

On Sep 7, 2007, at 10:32 AM, Janene McCrillis wrote:

 The resin error log file shows this:
 [2007/09/07 14:05:59] Unresolved compilation problems:
   The import org.apache cannot be resolved



Is that the entire message?  That would seem to indicate not a  
library problem at all, but a compilation problem.  In particular,  
that you've got the nonsensical statement

import org.apache

somewhere.  Actually, I've noticed something that I consider  
fascinating, which is that when I do an over-hasty compile/deploy and  
I miss the fact that one of my Java classes has compilation errors,  
resin (which has no access to the source) presents me with an error  
message like the one above, and includes an error message from the  
*compiler*.  Fascinating, because it seems to mean that even though  
the compile failed, the compiler produced some sort of object code  
which indicates the error, and the loading JVM is able to read that  
code and recreate the compiler message.

-- 

joe



**


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Classpath problem

2007-09-10 Thread Daniel López
Janene McCrillis escribió:
 I have a problem with my classpath that has me baffled. I'm using the
 Apache commons libraries in a small servlet. I have the Apache commons
 jar files in both my web-app library directory and also in my resin
 library directory...

Having the same library twice in the classpath is a sure recipe for 
unexpected behaviour, as depending on the way some classes are 
loaded/used, you will get ClassDefNotFoundException and similar problems.

AFAIK, there is no real solution apart of keeping just one version of 
the class in the classpath of your webapp. (Note that you can have two 
versions for different webapps, as they can have different classpaths)

S!
D.


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Classpath problem

2007-09-10 Thread Janene McCrillis
Hi Daniel. I do understand your point, but resin is not finding the library no 
matter where I have it, in one place or both. I don't really want to have it in 
my main resin library directory for the reason you mentioned, allowing 
different apps to have different versions, so I've removed it, but it still 
isn't finding the library. Any ideas?  TIA!

Janene McCrillis
NatureServe
Senior Software Engineer
703-797-4806
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel López
Sent: Monday, September 10, 2007 2:55 AM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] Classpath problem

Having the same library twice in the classpath is a sure recipe for 
unexpected behaviour, as depending on the way some classes are 
loaded/used, you will get ClassDefNotFoundException and similar problems.

AFAIK, there is no real solution apart of keeping just one version of 
the class in the classpath of your webapp. (Note that you can have two 
versions for different webapps, as they can have different classpaths)

S!
D.


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Classpath problem

2007-09-07 Thread Janene McCrillis
I have a problem with my classpath that has me baffled. I'm using the
Apache commons libraries in a small servlet. I have the Apache commons
jar files in both my web-app library directory and also in my resin
library directory, but the servlet fails to start because of unresolved
compilation issues with the apache libraries. 

I'm using Resin 2.1.17, and cannot upgrade right now, on Windows XP XP2,
with Apache 2.0.59 (ditto). 

What really gets me is this was working for awhile (wild cheers), then
stopped (sob). The libraries are still there and I didn't change the
servlet code. I've re-booted and restarted and stood on my head, but
it's not resolving this path issue.

Here's the classpath according to the resin stdout log file, and lo and
behold, the commons libraries are listed:

Classpath=C:\Program Files\resin-2.1.17\classes;C:\Program
Files\resin-2.1.17\lib\resin.jar;C:\Program
Files\java\j2sdk1.4.2_13\lib\tools.jar;C:\Program
Files\java\j2sdk1.4.2_13\jre\lib\rt.jar;C:\Program
Files\resin-2.1.17\lib\commons-fileupload-1.2.jar;C:\Program
Files\resin-2.1.17\lib\commons-io-1.3.2.jar;C:\Program
Files\resin-2.1.17\lib\dom.jar;C:\Program
Files\resin-2.1.17\lib\jaxp.jar;C:\Program
Files\resin-2.1.17\lib\jmx.jar;C:\Program
Files\resin-2.1.17\lib\jsdk23.jar;C:\Program
Files\resin-2.1.17\lib\jta_101.jar;C:\Program
Files\resin-2.1.17\lib\sax.jar;C:\Program
Files\resin-2.1.17\lib\webutil.jar

The resin error log file shows this:
[2007/09/07 14:05:59] Unresolved compilation problems: 
The import org.apache cannot be resolved

I'm at a loss. Is there some other trick? 

Janene 



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Classpath problem

2007-06-08 Thread Tim Manchester
I'm trying to use the jsp compiler and I know I must be having classpath
problems. When I attempt to execute the following command:
C:\resin30\resin-3.0.22\libjava com.caucho.jsp.JspCompiler -app-dir
/opt/www/foo test/foo.jsp
 
I get the following exception:
Exception in thread main java.lang.NoClassDefFoundError:
com/caucho/jsp/JspCompiler
 
So I modified my command to this:
C:\resin30\resin-3.0.22\libjava -jar resin.jar
com.caucho.jsp.JspCompiler -app-dir /opt/www/foo test/foo.jsp
and got this exception instead:
Exception in thread main java.lang.NoClassDefFoundError:
com/caucho/server/boot/ResinBoot
 
This is my classpath:
C:\resin30\resin-3.0.22\libset classpath
CLASSPATH=.;C:\resin30\resin-3.0.22\lib;C:\Program
Files\Java\jre1.6.0_01\lib\ext\QTJava.zip
 
The root dir for resin is C:\resin30\resin-3.0.22\ and the lib directory
contains the files:
C:\resin30\resin-3.0.22\libls
activation.jar j2ee-deploy-10.jar   jca-15.jar
jstl-11.jarresin-jdk15.jar
aopalliance.jar  j2ee-management-10.jar  jms-11.jar   jta-101.jar
resin.jar
ejb-20.jar  java   jmx-12.jar
portlet-10.jar   resinboot.jar
ejb-30.jar  javamail-14.jarjsdk-24.jar
quercus.jar script-10.jar
 
So, what am I missing? resinboot.jar is here. resin.jar is here. Which
jar file is ResinBoot in?
 
Regards,
 
Tim
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Classpath problem

2007-06-08 Thread Gary Zhu
Set your class path to include all resin jar files:

CLASSPATH=.;C:\resin30\resin-3.0.22\lib\resin.jar;C:\resin30\resin-3.0.22\lib\jsdk-24.jar;C:\resin30\resin-3.0.22\lib\j2ee-management-10.jar;..;C:\Program
 Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

and then, the following command should do:

java com.caucho.jsp.JspCompiler -app-dir /opt/www/foo test/foo.jsp

Resin distribution does not include  setenv.cmd or setenv.sh file, which allows 
users conveniently set environment, though usages are rare.


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Tim Manchester [EMAIL 
PROTECTED]
Sent: Friday, June 08, 2007 2:25 PM
To: resin-interest@caucho.com
Subject: [Resin-interest] Classpath problem

I'm trying to use the jsp compiler and I know I must be having classpath 
problems. When I attempt to execute the following command:
C:\resin30\resin-3.0.22\libjava com.caucho.jsp.JspCompiler -app-dir 
/opt/www/foo test/foo.jsp

I get the following exception:
Exception in thread main java.lang.NoClassDefFoundError: 
com/caucho/jsp/JspCompiler

So I modified my command to this:
C:\resin30\resin-3.0.22\libjava -jar resin.jar com.caucho.jsp.JspCompiler 
-app-dir /opt/www/foo test/foo.jsp
and got this exception instead:
Exception in thread main java.lang.NoClassDefFoundError: 
com/caucho/server/boot/ResinBoot

This is my classpath:
C:\resin30\resin-3.0.22\libset classpath
CLASSPATH=.;C:\resin30\resin-3.0.22\lib;C:\Program 
Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

The root dir for resin is C:\resin30\resin-3.0.22\ and the lib directory 
contains the files:
C:\resin30\resin-3.0.22\libls
activation.jar j2ee-deploy-10.jar   jca-15.jarjstl-11.jar   
 resin-jdk15.jar
aopalliance.jar  j2ee-management-10.jar  jms-11.jar   jta-101.jar   
resin.jar
ejb-20.jar  java   jmx-12.jar   
portlet-10.jar   resinboot.jar
ejb-30.jar  javamail-14.jarjsdk-24.jar  quercus.jar 
script-10.jar

So, what am I missing? resinboot.jar is here. resin.jar is here. Which jar file 
is ResinBoot in?

Regards,

Tim


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Classpath problem

2007-06-08 Thread atomi . archive
that works.

Gary Zhu wrote:
 Set your class path to include all resin jar files:

 CLASSPATH=.;C:\resin30\resin-3.0.22\lib\resin.jar;C:\resin30\resin-3.0.22\lib\jsdk-24.jar;C:\resin30\resin-3.0.22\lib\j2ee-management-10.jar;..;C:\Program
  Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

 and then, the following command should do:

 java com.caucho.jsp.JspCompiler -app-dir /opt/www/foo test/foo.jsp

 Resin distribution does not include  setenv.cmd or setenv.sh file, which 
 allows users conveniently set environment, though usages are rare.

 
 From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Tim Manchester [EMAIL 
 PROTECTED]
 Sent: Friday, June 08, 2007 2:25 PM
 To: resin-interest@caucho.com
 Subject: [Resin-interest] Classpath problem

 I'm trying to use the jsp compiler and I know I must be having classpath 
 problems. When I attempt to execute the following command:
 C:\resin30\resin-3.0.22\libjava com.caucho.jsp.JspCompiler -app-dir 
 /opt/www/foo test/foo.jsp

 I get the following exception:
 Exception in thread main java.lang.NoClassDefFoundError: 
 com/caucho/jsp/JspCompiler

 So I modified my command to this:
 C:\resin30\resin-3.0.22\libjava -jar resin.jar com.caucho.jsp.JspCompiler 
 -app-dir /opt/www/foo test/foo.jsp
 and got this exception instead:
 Exception in thread main java.lang.NoClassDefFoundError: 
 com/caucho/server/boot/ResinBoot

 This is my classpath:
 C:\resin30\resin-3.0.22\libset classpath
 CLASSPATH=.;C:\resin30\resin-3.0.22\lib;C:\Program 
 Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

 The root dir for resin is C:\resin30\resin-3.0.22\ and the lib directory 
 contains the files:
 C:\resin30\resin-3.0.22\libls
 activation.jar j2ee-deploy-10.jar   jca-15.jarjstl-11.jar 
resin-jdk15.jar
 aopalliance.jar  j2ee-management-10.jar  jms-11.jar   jta-101.jar   
 resin.jar
 ejb-20.jar  java   jmx-12.jar   
 portlet-10.jar   resinboot.jar
 ejb-30.jar  javamail-14.jarjsdk-24.jar  quercus.jar   
   script-10.jar

 So, what am I missing? resinboot.jar is here. resin.jar is here. Which jar 
 file is ResinBoot in?

 Regards,

 Tim


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

   


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Classpath problem

2007-06-08 Thread atomi . archive
I'm terribly terribly, sorry, wrong thread.
cheers!

Gary Zhu wrote:
 Set your class path to include all resin jar files:

 CLASSPATH=.;C:\resin30\resin-3.0.22\lib\resin.jar;C:\resin30\resin-3.0.22\lib\jsdk-24.jar;C:\resin30\resin-3.0.22\lib\j2ee-management-10.jar;..;C:\Program
  Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

 and then, the following command should do:

 java com.caucho.jsp.JspCompiler -app-dir /opt/www/foo test/foo.jsp

 Resin distribution does not include  setenv.cmd or setenv.sh file, which 
 allows users conveniently set environment, though usages are rare.

 
 From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Tim Manchester [EMAIL 
 PROTECTED]
 Sent: Friday, June 08, 2007 2:25 PM
 To: resin-interest@caucho.com
 Subject: [Resin-interest] Classpath problem

 I'm trying to use the jsp compiler and I know I must be having classpath 
 problems. When I attempt to execute the following command:
 C:\resin30\resin-3.0.22\libjava com.caucho.jsp.JspCompiler -app-dir 
 /opt/www/foo test/foo.jsp

 I get the following exception:
 Exception in thread main java.lang.NoClassDefFoundError: 
 com/caucho/jsp/JspCompiler

 So I modified my command to this:
 C:\resin30\resin-3.0.22\libjava -jar resin.jar com.caucho.jsp.JspCompiler 
 -app-dir /opt/www/foo test/foo.jsp
 and got this exception instead:
 Exception in thread main java.lang.NoClassDefFoundError: 
 com/caucho/server/boot/ResinBoot

 This is my classpath:
 C:\resin30\resin-3.0.22\libset classpath
 CLASSPATH=.;C:\resin30\resin-3.0.22\lib;C:\Program 
 Files\Java\jre1.6.0_01\lib\ext\QTJava.zip

 The root dir for resin is C:\resin30\resin-3.0.22\ and the lib directory 
 contains the files:
 C:\resin30\resin-3.0.22\libls
 activation.jar j2ee-deploy-10.jar   jca-15.jarjstl-11.jar 
resin-jdk15.jar
 aopalliance.jar  j2ee-management-10.jar  jms-11.jar   jta-101.jar   
 resin.jar
 ejb-20.jar  java   jmx-12.jar   
 portlet-10.jar   resinboot.jar
 ejb-30.jar  javamail-14.jarjsdk-24.jar  quercus.jar   
   script-10.jar

 So, what am I missing? resinboot.jar is here. resin.jar is here. Which jar 
 file is ResinBoot in?

 Regards,

 Tim


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

   


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest