Fixed it,

Apparently this was classpath hell again.

Ant and jasper also need the complete tomcat lib in classpath

2 suggestion for build.xml:

1. Add a property for the base tomcat dir:
<property name="tomcat"   value="C:/tomcat"/>

2. Add the /lib path into
a. both in the deployer classpath:

  <path id="deployer.classpath">
    <fileset dir="${basedir}/lib">
      <include name="*.jar"/>
    </fileset>
        
->    <fileset dir="${tomcat}/lib">
->      <include name="*.jar"/>
->    </fileset>

  </path>

b. and into the javac task:

    <javac destdir="${webapp.path}/WEB-INF/classes"
           optimize="off"
           debug="${compile.debug}"
           deprecation="${compile.deprecation}"
           failonerror="false"
           srcdir="${webapp.path}/WEB-INF/classes"
           encoding="UTF-8"
           excludes="**/*.smap">
      <classpath>
        <fileset dir="${webapp.path}/WEB-INF/lib">
          <include name="*.jar"/>
        </fileset>
        <fileset dir="${basedir}/lib">
          <include name="*.jar"/>
        </fileset>
->      <fileset dir="${tomcat}/lib">
->        <include name="*.jar"/>
->      </fileset>
                
      </classpath>
      <include name="**" />
      <exclude name="tags/**" />
    </javac>

Thanks for all your help!

John



On Mon, Jan 31, 2011 at 5:23 PM, John Bargos <jbargo...@gmail.com> wrote:
> On Mon, Jan 31, 2011 at 5:06 PM, Konstantin Kolinko
> <knst.koli...@gmail.com> wrote:
>> 2011/1/31 John Bargos <jbargo...@gmail.com>:
>>> 1) I checked the libs in ant 1.8.2.
>>> apparently ant ships with:
>>>
>>> jasper-compiler.version=4.1.36
>>> jasper-runtime.version=${jasper-compiler.version}
>>>
>>> ..in libraries.properties and you fetch those jars
>>
>> http://ant.apache.org/manual/Tasks/jspc.html
>> Deprecated. Nobody uses that.
>>
>> You should be using the jars that come with Tomcat.
>>
>> The real docs are here:
>> http://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html
>>
>>
>
> Yeah, I checked that doc b4 starting, I also checked catalina.tasks in
> catalina-ant.jar and the new jasper.jar libs in the deployer\lib, so
> yesterday I thought the task def was ok and I was ready to compile.
>
> I tried forcibly removing the old jasper jars from ant\lib.. it
> doesn't cut it..:
>
> BUILD FAILED
> \apache-tomcat-7.0.6-deployer\build.xml:66:
> java.lang.NoClassDefFoundError: org/apache/tomcat/JarScannerCa
> llback
>        at org.apache.jasper.JspC.initServletContext(JspC.java:1437)
>        at org.apache.jasper.JspC.execute(JspC.java:1303)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
>        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>        at org.apache.tools.ant.Task.perform(Task.java:348)
>        at org.apache.tools.ant.Target.execute(Target.java:390)
>        at org.apache.tools.ant.Target.performTasks(Target.java:411)
>        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>        at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>        at org.apache.tools.ant.Main.runBuild(Main.java:809)
>        at org.apache.tools.ant.Main.startAnt(Main.java:217)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tomcat.JarScannerCallback
>        at 
> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
>        at 
> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
>        at 
> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>        ... 25 more
>
> Total time: 0 seconds
>
>
> Kind regards,
>
> John
>
>>
>>> I think it's early to create a bugzilla entry. Should I look for jasper 
>>> >4.1.36?
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> 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

Reply via email to