You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@apache.org> on 2009/12/05 01:25:43 UTC

strange Dispatcher behaviour after merge

Dispatcher seems to have some strange behaviours after the recent merge.
I don't have much time, so here is a quick dump of notes.
Perhaps someone else can raise Jira issues for them.

Using Java-1.5

1) Rebuild forrest. All seems okay.
2) cd $FORREST_HOME/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher
3) rm -rf build
3) $FORREST_HOME/tools/ant/bin/ant local-deploy
4) Get compilation errors and "BUILD FAILED" (see [A])

It sounds like someone needs to get the PMC to agree on
increasing the base Java version.

Now follow the instructions for a Dispatcher-based sample site:
5) cd /tmp/forrest-sample-2
6) forrest seed-sample
7) Follow instructions in forrest.properties* to configure Dispatcher
8) forrest
9) Those same errors whizz by at the Dispatcher plugin deployment phase.
10) The build continues.
11) Get "BUILD SUCCESSFUL" and yes there are pages generated.

The configuration at our zone uses Java-1.4.2
It has different errors in its logfile, but similar behaviour.

Doing 'forrest run' on that sample seems to basically work.
Of course those same errors are issued, but the process continues.

Using the "forrestbar" to access the internal parts, does not work at all.
It gives Cocoon errors.

That "sample" site does not really exercise the Dispatcher.

I have a production site based on Dispatcher (see Forrest Examples)
which was working okay just before the merge.
It has various uses of specific structurers to show different layouts
for different pages, e.g. additional right-hand panel.
None of that is working. It seems to be using the default theme/structurer.

The Dispatcher plugin's own website seems to basically work in
the 'forrest run' mode. It has a very basic demonstration of using
a structurer. That does seem to work.

I suppose that with my own project i am going to need to follow the
instructions from scratch again. Is that plugin documentation and
changes up-to-date? Does someone have hints about what has changed
with structurer configuration?

--------------------------
[A] snipped beginning and end of output
...
compile:
    [mkdir] Created dir: /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/build/classes
    [javac] Compiling 31 source files to /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/build/classes
    [javac] /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/api/Contract.java:79: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]   InputStream execute(InputStream dataStream, Map<String, Object> properties)
    [javac]                                                  ^
    [javac] /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/factories/ContractFactory.java:54: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]   private Map<String, Contract> map = null;
...
...
    [javac] /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java:637: for-each loops are not supported in -source 1.4
    [javac] (try -source 1.5 to enable for-each loops)
    [javac]         for (OMNamespace space : spaces) {
    [javac]                                ^
    [javac] /svn/asf/forrest/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherWrapperTransformer.java:318: generics are not supported in -source 1.4
    [javac] (try -source 1.5 to enable generics)
    [javac]     HashMap<String, Object> map = new HashMap<String, Object>();
    [javac]            ^
    [javac] 21 errors

BUILD FAILED
/svn/asf/forrest/plugins/build.xml:389: Compile failed; see the compiler error output for details.

Total time: 1 second
--------------------------

Java version of plugins/main (was Re: strange Dispatcher behaviour after merge)

Posted by Thorsten Scherler <th...@apache.org>.
On 05/12/2009, at 01:25, David Crossley wrote:

> Dispatcher seems to have some strange behaviours after the recent merge.
> I don't have much time, so here is a quick dump of notes.
> Perhaps someone else can raise Jira issues for them.
> 
> Using Java-1.5
> 
> 1) Rebuild forrest. All seems okay.
> 2) cd $FORREST_HOME/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher
> 3) rm -rf build
> 3) $FORREST_HOME/tools/ant/bin/ant local-deploy
> 4) Get compilation errors and "BUILD FAILED" (see [A])
> 
> It sounds like someone needs to get the PMC to agree on
> increasing the base Java version.

You are right that a version change needs a PMC vote. When I did the rewrite of the dispatcher I was using 1.5 and 1.6 since I do not use 1.4 since a long time. 

Regarding the support of 1.4, the EOSL transition period began Dec, 11 2006 and completed October 30th, 2008, meaning 1.4 is only supported for Solaris user.
Regarding the support for 1.5 it reached its End of Service Life (EOSL) on November the 3rd 2009.

Like said dispatcher is ATM 1.5 due to use of generics and a couple of other things (annotations). It should not be hard to fix this, if we decide to keep our support for 1.4.

However in the light of above (1.4 and 1.5 reached their EOSL) I think we should raise the minimum version of forrest to at least 1.5 if not 1.6.

salu2


Re: strange Dispatcher behaviour after merge

Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
> David Crossley wrote:
> > Dispatcher seems to have some strange behaviours after the recent merge.
> >
> > It sounds like someone needs to get the PMC to agree on
> > increasing the base Java version.
> 
> I don't think I was around for the last Java version bump. What would
> keep us from doing this?
> 
> I was hesitant to switch locally to Java 5 when it first came out, but 1.4.2
> is quite old now. Java 6 is up to Update 17. I just saw this on
> java.sun.com:
> 
> "On October 30, 2008 J2SE 1.4.2 reached the end of its service life
> (EOSL)."
> 
> It's not just old, its service life has ended.

It would have been on the dev list during the lead-up to each release:
http://forrest.apache.org/procedures/release/How_to_release.html#PrepProject

-David

Re: strange Dispatcher behaviour after merge

Posted by Brian M Dube <bd...@apache.org>.
On Sat, Dec 05, 2009 at 11:25:43AM +1100, David Crossley wrote:
> Dispatcher seems to have some strange behaviours after the recent merge.

> It sounds like someone needs to get the PMC to agree on
> increasing the base Java version.

I don't think I was around for the last Java version bump. What would
keep us from doing this?

I was hesitant to switch locally to Java 5 when it first came out, but 1.4.2
is quite old now. Java 6 is up to Update 17. I just saw this on
java.sun.com:

"On October 30, 2008 J2SE 1.4.2 reached the end of its service life
(EOSL)."

It's not just old, its service life has ended.

Brian