On Wed, Aug 11, 2010 at 7:28 AM, Vicent Mas <uve...@gmail.com> wrote:
> 2010/8/11 Tim Williams <william...@gmail.com>:
>> On Wed, Aug 11, 2010 at 4:13 AM, Vicent Mas <uve...@gmail.com> wrote:
>>> 2010/8/11 Tim Williams <william...@gmail.com>:
>>>> On Tue, Aug 10, 2010 at 12:55 PM, Sina K. Heshmati <s...@khakbaz.com> 
>>>> wrote:
>>>>> --
>>>>> Prior discussions have been snipped, please view the complete thread at:
>>>>> http://markmail.org/message/fyloqkqilo2tqalr
>>>>> --
>>>>>
>>>>> Hi Vicent,
>>>>>
>>>>> "Vicent Mas" <uve...@gmail.com> said:
>>>>>
>>>>>> I don't know why I always get those errors. My connectivity to
>>>>>> Internet is just fine.
>>>>>
>>>>> It's been almost a week since you've reported your issue. At this point, 
>>>>> I'd like to advise you to share a fairly complete screencast of your 
>>>>> workflow, maybe someone could come up with an idea as to what's causing 
>>>>> this issue. In case you're willing to choose this option, please make 
>>>>> sure to echo e.g. the relevant environment variables, the output of 'java 
>>>>> -version'.
>>>>
>>>> Actually, I've been working on upgrading some libraries and realized
>>>> I've just ignored that my local ./build.sh test fails on the
>>>> dispatcher test.  Today, I looked at my log and also saw the
>>>> ClassNotFoundException on the DispatcherTransformer.   Are other folks
>>>> able to ./build.sh test with success on the second [dispatcher] build?
>>>>
>>>> Thanks,
>>>> --tim
>>>>
>>>
>>> That is interesting. Maybe the problem is not just the configuration of my
>>> box. In fact, after reading your message I've installed forrest on a laptop
>>> with kubuntu. It is the first time I install forrest there. The installed 
>>> JDK is
>>> the ubuntu package (java6-openjdk or something similar) not the Sun Java.
>>> When I try to create a dispatcher sample site I get the same error about
>>> DispatcherTransformer.
>>
>> Actually, the './build.sh test' issue seems to have been caused by
>> using the ./build.xml classpath instead of the forrest.build.xml
>> classpath.  The 'test' target calls the 'site' target which needs the
>> more robust classpath.  This was resolved by not letting the 'site'
>> target inherit the settings of the 'test' target.
>
> And how can I do the same (sorry if it is a stupid question)?

You shouldn't need to.  You're using the standard "site" target which
does add plugins (and all necessary jars) to the classpath.

>> ...You may want to do
>> 'forrest site -v' and grep the results for 'dispatcher.jar'
>>
>> --tim
>>
>
> In the directory of my seed site (after $ forrest clean):
>
> v...@rachael:/tmp/my_test$ forrest site -v | grep dispatcher.jar
> Unable to find build/org.apache.forrest.plugin.internal.dispatcher.jar
> Warning: /tmp/my_test/build/webapp/resources not found.
> Warning: /tmp/my_test/src/documentation/skins/common/images not found.
> Warning: /tmp/my_test/src/documentation/skins/pelt/images not found.
> Warning: /tmp/my_test/src/documentation/skins/common not found.
> Warning: /tmp/my_test/src/documentation/skins/pelt not found.
> Java Result: 1
>
> BUILD FAILED
> /opt/forrest/main/targets/site.xml:223: Error building site.
>
> There appears to be a problem with your site build.
>
> Read the output above:
> * Cocoon will report the status of each document:
>    - in column 1: *=okay X=brokenLink ^=pageSkipped (see FAQ).
> * Even if only one link is broken, you will still get "failed".
> * Your site would still be generated, but some pages would be broken.
>  - See /tmp/my_test/build/site/broken-links.xml
>        at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:142)
>        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>        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.taskdefs.Sequential.execute(Sequential.java:62)
>        at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
>        at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
>        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:288)
>        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>        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:357)
>        at org.apache.tools.ant.Target.performTasks(Target.java:385)
>        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>        at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>        at org.apache.tools.ant.Main.runBuild(Main.java:758)
>        at org.apache.tools.ant.Main.startAnt(Main.java:217)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
> Total time: 40 seconds
>
> So dispatcher.jar is not found.

Can you try to do a local deploy of that plugin?  So,
cd $FORREST_HOME/whiteboard/plugins/o.a.f.p.internal.dispatcher
ant local-deploy

and try again.

--tim