ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Smith <javadevm...@yahoo.com>
Subject Re: How does Ant find classes? ( ClassLoader problem )
Date Tue, 29 Oct 2002 16:15:21 GMT
> Is your build including the jars in the Tomcat lib directories in creating 
> a <path> to use for classpaths in your taskdefs?

No, I don't use any taskdefs.

<project name="login" default="build" basedir=".">

 <property environment="env"/>
 
    <target name="build">

        <javac srcdir="."
			debug="true"
			optimize="false"
			includes="**/*.java">
			
			<classpath>
				<pathelement location="/development/tomcat/common/lib/servlet.jar"/>
				<pathelement location="/development/tomcat/common/lib/jdbc2_0-stdext.jar"/>
			</classpath>
		</javac>
    </target>
</project>

[localhost:dhtmlkitchen_dev/WEB-INF/classes] garrett% sudo find / -name
mail.jar -print
/development/jaxp/jaxm-1.0.1-ea2/lib/mail.jar
/Users/garrett/Desktop/jars/mail.jar
/Users/garrett/Desktop/java docs/javamail-1.3/mail.jar
/Users/garrett/Desktop/mail.jar


So where is mail.jar found? These locations are not part of my classpath.



You never know, it might be included as part 
> of a jar file in some other library on your system.

I couldn't find it in jstl.jar, but I didn't get the problem before installing
jstl, so I still suspect.

Garrett


--- Jacob Kjome <hoju@visi.com> wrote:
> 
> Well, javax.mail.Session is obviously somewhere on your system.  This can 
> be in the system CLASSPATH variable, the JAVA_HOME/jre/lib/ext folder, the 
> ANT_HOME/lib folder or in any custom <path> that you have set up for your 
> local build.  It has got to be in one of those places.  I would double and 
> triple check if I were you.  You never know, it might be included as part 
> of a jar file in some other library on your system.
> 
> As far as Tomcat finding the javax.mail package, your webapp has access to 
> a number of classloaders.  Look in $CATALINA_HOME/common/lib.  I'll bet you 
> find a jar file named "mail.jar" there.  Your webapp can see that.  It can 
> also see jars in $CATALINA_HOME/shared/lib.
> 
> Is your build including the jars in the Tomcat lib directories in creating 
> a <path> to use for classpaths in your taskdefs?
> 
> Jake
> 
> At 07:04 PM 10/28/2002 -0800, you wrote:
> >You probably wouldn't care and say, "It just does." ...until you had some
> >serious ClassLoader. An ominous problem such as that that I now face is too
> >much for one of my level of experience.
> >
> >I want to know where Ant finds javax.mail.Session. I took mail.jar out of my
> >classpath.
> >
> >Tomcat also finds javax.mail.Session. Tomcat uses WebappClassLoader. For
> JNDI,
> >SystemClassLoader is used. Tomcat has no problem loading classes through 
> >either
> >classloader (even though this seems impossible).
> >
> >Learning where ant finds classes will not fix the runtime errors I get
> >(ClassCastException), but It may lead me in the right direction.
> >
> >mail.jar is not in my classpath. Where does Ant find javax.mail?
> >
> >
> >Garrett
> >
> >For an explanation of this serious problem:
> >http://jguru.com/forums/view.jsp?EID=1018030
> >
> >=====
> >http://dhtmlkitchen.com/
> >JSP | Servlets | DHTML
> >
> >Garrett Needs A Job
> >
> >__________________________________________________
> >Do you Yahoo!?
> >HotJobs - Search new jobs daily now
> >http://hotjobs.yahoo.com/
> >
> >--
> >To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 


=====
http://dhtmlkitchen.com/
JSP | Servlets | DHTML 

Garrett Needs A Job

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message