You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gav...." <br...@brightontown.com.au> on 2006/12/13 13:24:02 UTC
RE: Building Forrest 2
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Thursday, 23 November 2006 9:13 AM
> To: dev@forrest.apache.org
> Subject: Re: Building Forrest 2
<snip>
> I really am trying to do too many things tonight (the Ashes have start
> as well, so that's me out of the real world for 5 days)
>
> It's in
> http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/co
> re/org/apache/forrest/core/Controller.java?revision=477949&view=markup
>
> The CLI calls the default constructor which calls
> this("src/locationmap.xml", "src/forrestContext.xml");
>
> The file resolution is in the parameterised constructor and consists of
> two parts:
>
> final File file = new File(contextPath);
>
> and
>
> this.context = new FileSystemXmlApplicationContext(file
> .getAbsolutePath());
>
> (contextPath in the first line is the "src/forrestContext.xml")
>
> The problem is that getAbsolutePath() should be getPath().
>
> I've made the change, please test.
>
> Ross
Just got round to trying this and mine fails :-
[java] 828 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Adding location:
Matcher:org.apache.forrest.core.matcher.REMatcher@1242b1
1
[java] org.apache.forrest.core.exception.ProcessingException: Unable to
cre
ate the output documents for helloWorld.html because null caused by null
[java] Processing request for helloWorld.html
[java] 828 [main] DEBUG org.apache.forrest.cli.CLI (?:?) -
Processing: he
lloWorld.html
[java] at
org.apache.forrest.core.Controller.getOutputDocument(Unknown
Source)
[java] at org.apache.forrest.cli.CLI.processURIs(Unknown Source)
[java] at org.apache.forrest.cli.CLI.main(Unknown Source)
[java] 828 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Getting potential locations for request of helloWorld.html
[java] 828 [main] INFO
org.apache.forrest.core.locationMap.LocationMap (?
:?) - 1 potenatial location from pattern (.*)/(.*).html
[java] 843 [main] ERROR org.apache.forrest.cli.CLI (?:?) -
org.apache.for
rest.core.exception.ProcessingException: Unable to create the output
documents f
or helloWorld.html because null caused by null
[java] Caused by: java.lang.NullPointerException
[java] at
org.apache.forrest.core.document.InternalDocument.<init>(Unkn
own Source)
[java] at
org.apache.forrest.core.document.InternalErrorDocument.<init>
(Unknown Source)
[java] at
org.apache.forrest.core.Controller.processInputPlugins(Unknow
n Source)
[java] at org.apache.forrest.core.Controller.processRequest(Unknown
Sou
rce)
[java] ... 3 more
BUILD FAILED
D:\Apache2\forrest\whiteboard\forrest2\core\build.xml:118: Java returned: 1
Total time: 7 seconds
D:\Apache2\forrest\whiteboard\forrest2\core>ant
-Dcontent.object.dir=d:/apache2/
forrest/whiteboard/forrest2/core/src/examples/helloWorld
-Dcontent.object.start.
uri=helloWorld.html run
Buildfile: build.xml
clean:
[delete] Deleting directory
D:\Apache2\forrest\whiteboard\forrest2\core\build
\classes
[delete] Deleting directory
D:\Apache2\forrest\whiteboard\forrest2\core\dist
init:
[mkdir] Created dir:
D:\Apache2\forrest\whiteboard\forrest2\core\build\class
es
[mkdir] Created dir: D:\Apache2\forrest\whiteboard\forrest2\core\dist
[mkdir] Created dir:
D:\Apache2\forrest\whiteboard\forrest2\core\dist\lib
[ivy:cachepath] :: Ivy 1.4.1 - 20061109165313 :: http://ivy.jayasoft.org/ ::
[ivy:cachepath] :: configuring :: file =
D:\Apache2\forrest\whiteboard\forrest2\
core\ivyconf.xml
[ivy:cachepath] :: resolving dependencies :: [ Apache | forrest2 |
working@devel
oper ]
[ivy:cachepath] confs: [default]
[ivy:cachepath] found [ apache | commons-httpclient | 3.1-alpha1 ]
in lo
cal-repository
[ivy:cachepath] [3.1-alpha1] [ apache | commons-httpclient |
latest.mile
stone ]
[ivy:cachepath] found [ apache | commons-codec | 1.3 ] in
local-reposito
ry
[ivy:cachepath] found [ apache | commons-logging | 1.1 ] in
local-reposi
tory
[ivy:cachepath] found [ apache | xerces | 2.5.0 ] in
local-repository
[ivy:cachepath] [2.5.0] [ apache | xerces | latest.release ]
[ivy:cachepath] found [ jtidy | jtidy | 4aug2000r7-dev ] in
local-reposi
tory
[ivy:cachepath] found [ junit | junit | 4.1 ] in local-repository
[ivy:cachepath] found [ springframework | springframework | 2.0 ] in
loc
al-repository
[ivy:cachepath] [2.0] [ springframework | springframework |
latest.relea
se ]
[ivy:cachepath] found [ apache | commons-dbcp | 1.2.1 ] in
local-reposit
ory
[ivy:cachepath] found [ apache | commons-collections | 3.2 ] in
local-re
pository
[ivy:cachepath] found [ apache | commons-pool | 1.3 ] in
local-repositor
y
[ivy:cachepath] found [ apache | log4j | 1.2.14 ] in
local-repository
[ivy:cachepath] found [ asm | asm | 2.2.2 ] in ivyrep
[ivy:cachepath] found [ asm | asm-commons | 2.2.2 ] in
local-repository
[ivy:cachepath] found [ asm | asm-util | 2.2.2 ] in local-repository
[ivy:cachepath] found [ cglib | cglib-nodep | 2.1_3 ] in
local-repositor
y
[ivy:cachepath] :: resolution report ::
---------------------------------------------------------------------
| | modules || artifacts
|
| conf | number| search|dwnlded|evicted||
number|dwnlded|
---------------------------------------------------------------------
| default | 15 | 3 | 0 | 0 || 16 | 0
|
---------------------------------------------------------------------
copy-core-resources:
[copy] Copying 2 files to
D:\Apache2\forrest\whiteboard\forrest2\core\build
\classes
[copy] Copied 14 empty directories to 8 empty directories under
D:\Apache2\
forrest\whiteboard\forrest2\core\build\classes
compile-core:
[javac] Compiling 40 source files to
D:\Apache2\forrest\whiteboard\forrest2\
core\build\classes
copy-content-object-resources:
[copy] Copying 4 files to
D:\Apache2\forrest\whiteboard\forrest2\core\build
\classes
compile-content-object:
run:
[java] log4j:ERROR Could not connect to remote log4j server at
[localhost].
We will try again later.
[java] java.net.ConnectException: Connection refused: connect
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
[java] at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.jav
a:195)
[java] at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
[java] at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
[java] at java.net.Socket.connect(Socket.java:516)
[java] at java.net.Socket.connect(Socket.java:466)
[java] at java.net.Socket.<init>(Socket.java:366)
[java] at java.net.Socket.<init>(Socket.java:208)
[java] at
org.apache.log4j.net.SocketAppender.connect(SocketAppender.ja
va:203)
[java] at
org.apache.log4j.net.SocketAppender.activateOptions(SocketApp
ender.java:160)
[java] at
org.apache.log4j.config.PropertySetter.activate(PropertySette
r.java:256)
[java] at
org.apache.log4j.config.PropertySetter.setProperties(Property
Setter.java:132)
[java] at
org.apache.log4j.config.PropertySetter.setProperties(Property
Setter.java:96)
[java] at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyC
onfigurator.java:654)
[java] at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyC
onfigurator.java:612)
[java] at
org.apache.log4j.PropertyConfigurator.configureRootCategory(P
ropertyConfigurator.java:509)
[java] at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyCon
figurator.java:415)
[java] at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyCon
figurator.java:441)
[java] at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(O
ptionConverter.java:470)
[java] at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
[java] at org.apache.log4j.Logger.getLogger(Logger.java:104)
[java] at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLo
gger.java:283)
[java] at
org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogge
r.java:108)
[java] at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
[java] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC
onstructorAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del
egatingConstructorAccessorImpl.java:27)
[java] at
java.lang.reflect.Constructor.newInstance(Constructor.java:49
4)
[java] at
org.apache.commons.logging.impl.LogFactoryImpl.createLogFromC
lass(LogFactoryImpl.java:1040)
[java] Forrest 2 Command Line Interface
[java] ================================
[java] at
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImp
lementation(LogFactoryImpl.java:838)
[java] at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:601)
[java] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:333)
[java] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:307)
[java] at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:
645)
[java] at org.apache.forrest.cli.CLI.<clinit>(Unknown Source)
[java] 0 [main] INFO org.apache.forrest.core.Controller (?:?) -
Using
Spring Context definition in src/forrestContext.xml
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Java version: 1.5.0_08
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Java vendor: Sun Microsystems Inc.
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Java class path: C:\Documents and
Settings\Gavin\.ivy\cache\apache\commons-httpc
lient\jars\commons-httpclient-3.1-alpha1.jar;C:\Documents and
Settings\Gavin\.iv
y\cache\apache\commons-codec\jars\commons-codec-1.3.jar;C:\Documents and
Setting
s\Gavin\.ivy\cache\apache\commons-logging\jars\commons-logging-1.1.jar;C:\Do
cume
nts and
Settings\Gavin\.ivy\cache\apache\xerces\jars\xercesImpl-2.5.0.jar;C:\Doc
uments and
Settings\Gavin\.ivy\cache\jtidy\jtidy\jars\jtidy-4aug2000r7-dev.jar;C
:\Documents and
Settings\Gavin\.ivy\cache\junit\junit\jars\junit-4.1.jar;C:\Docu
ments and
Settings\Gavin\.ivy\cache\springframework\springframework\jars\spring-
mock-2.0.jar;C:\Documents and
Settings\Gavin\.ivy\cache\springframework\springfr
amework\jars\spring-2.0.jar;C:\Documents and
Settings\Gavin\.ivy\cache\apache\co
mmons-dbcp\jars\commons-dbcp-1.2.1.jar;C:\Documents and
Settings\Gavin\.ivy\cach
e\apache\log4j\jars\log4j-1.2.14.jar;C:\Documents and
Settings\Gavin\.ivy\cache\
asm\asm\jars\asm-2.2.2.jar;C:\Documents and
Settings\Gavin\.ivy\cache\asm\asm-co
mmons\jars\asm-commons-2.2.2.jar;C:\Documents and
Settings\Gavin\.ivy\cache\asm\
asm-util\jars\asm-util-2.2.2.jar;C:\Documents and
Settings\Gavin\.ivy\cache\cgli
b\cglib-nodep\jars\cglib-nodep-2.1_3.jar;C:\Documents and
Settings\Gavin\.ivy\ca
che\apache\commons-collections\jars\commons-collections-3.2.jar;C:\Documents
and
Settings\Gavin\.ivy\cache\apache\commons-pool\jars\commons-pool-1.3.jar;D:\A
pac
he2\forrest\whiteboard\forrest2\core\build\classes;D:\apache2\forrest\whiteb
oard
\forrest2\core\src\examples\helloWorld\build
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Operating system name: Windows XP
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Operating system architecture: x86
[java] 500 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
Operating system version: 5.1
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SUN 1.5: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests;
Sec
ureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPa
thBuilder; LDAP, Collection CertStores)
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SunRsaSign 1.5: Sun RSA signature provider
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SunJSSE 1.5: Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3,
TLSv1
)
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SunJCE 1.5: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish,
ARC
FOUR, RC2, PBE, Diffie-Hellman, HMAC)
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SunJGSS 1.0: Sun (Kerberos v5)
[java] 594 [main] DEBUG org.apache.commons.httpclient.HttpClient (?:?)
-
SunSASL 1.5: Sun SASL provider(implements client mechanisms for: DIGEST-MD5,
GSS
API, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI,
CRAM-
MD5)
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.useragent = Jakarta
Commons-HttpClient/3.1-alph
a1
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.protocol.version = HTTP/1.1
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.connection-manager.class = class
org.apache.com
mons.httpclient.SimpleHttpConnectionManager
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.protocol.cookie-policy = default
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.protocol.element-charset = US-ASCII
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.protocol.content-charset = ISO-8859-1
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.method.retry-handler =
org.apache.commons.httpc
lient.DefaultHttpMethodRetryHandler@11381e7
[java] 610 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy
HH:mm:s
s zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE,
dd-MMM-yyyy H
H:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE
dd-MMM-yy
yy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE
dd-MM
M-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
EEE,dd-MMM-
yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
[java] 625 [main] DEBUG
org.apache.commons.httpclient.params.DefaultHttpPa
rams (?:?) - Set parameter http.connection.timeout = 30000
[java] 688 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Initialise locationmap from config file src/locationmap.xml
[java] 703 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Adding location:
Matcher:org.apache.forrest.core.matcher.REMatcher@197601
1
[java] 703 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Adding location:
Matcher:org.apache.forrest.core.matcher.REMatcher@1242b1
1
[java] Processing request for helloWorld.html
[java] org.apache.forrest.core.exception.ProcessingException: Unable to
cre
ate the output documents for helloWorld.html because null caused by null
[java] 703 [main] DEBUG org.apache.forrest.cli.CLI (?:?) -
Processing: he
lloWorld.html
[java] 703 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (?
:?) - Getting potential locations for request of helloWorld.html
[java] 703 [main] INFO
org.apache.forrest.core.locationMap.LocationMap (?
:?) - 1 potenatial location from pattern (.*)/(.*).html
[java] at
org.apache.forrest.core.Controller.getOutputDocument(Unknown
Source)
[java] at org.apache.forrest.cli.CLI.processURIs(Unknown Source)
[java] 719 [main] ERROR org.apache.forrest.cli.CLI (?:?) -
org.apache.for
rest.core.exception.ProcessingException: Unable to create the output
documents f
or helloWorld.html because null caused by null
[java] at org.apache.forrest.cli.CLI.main(Unknown Source)
[java] Caused by: java.lang.NullPointerException
[java] at
org.apache.forrest.core.document.InternalDocument.<init>(Unkn
own Source)
[java] at
org.apache.forrest.core.document.InternalErrorDocument.<init>
(Unknown Source)
[java] at
org.apache.forrest.core.Controller.processInputPlugins(Unknow
n Source)
[java] at org.apache.forrest.core.Controller.processRequest(Unknown
Sou
rce)
[java] ... 3 more
BUILD FAILED
D:\Apache2\forrest\whiteboard\forrest2\core\build.xml:118: Java returned: 1
The above was using the latest trunk and the command line -
ant -Dcontent.object.dir=src/examples/helloWorld
-Dcontent.object.start.uri=helloWorld.html run
Also tried with the full path from root and the relative path ./
Gav...
Re: Building Forrest 2
Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
>
...
> I think more people would be more inclined to take a look if there was an
> Initial running site in the web browser.
I totally agree.
> But you can't do everything, there
> May be those interested in Forrest2 but are holding backto do this, or
> They may simply be concentrating on the official Forrest 1 version.
Yes. As you know I am concerned about diverting attention from Forrest
1. Personally I have outgrown Forrest1 and need a leaner, meaner version
(as explained in my original RT). However, that doesn't mean Forrest 1
should die, only that my *personal* interest in it is waning.
I believe that my work on Forrest2 will, in the long term, be of
interest to the wider community. But first individual community members
will have to outgrow Forrest1 as I have or Forrest2 will have to be a
suitable drop in replacement for Forrest1. The latter is a very long way
away at present, but I'm working on it.
Any assistance I get along the way is great, in the meantime I am
scratching my own itches.
>>> I don't have a JAVA editor AFAIK so can not edit the .class or .java
>> files,
>>> Any suggestions on a suitable program to use?
>> I use Eclipse. All my Java code committed to SVN have the necessary
>> eclipse config files (although they are not tested outside of my own
>> environment).
>
> Hmm, I do have Eclipse, forgot I had it, no real time to learn it at
> The moment. I didn't really want to set up projects within it at the
> Moment, just wanted something that I can use to just edit a .class
Well you don't edit class files, you edit .java files. But I guess that
is what you meant.
For basic work like this I recommend JEdit. Even better, IMHO, is EMacs,
there is a gui version called XEmacs, but I don't have experience of it
(others would recomend Vi).
Ross
RE: Building Forrest 2
Posted by "Gav...." <br...@brightontown.com.au>.
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Monday, 18 December 2006 6:53 AM
> To: dev@forrest.apache.org
> Subject: Re: Building Forrest 2
>
> Gav.... wrote:
> >
> >> -----Original Message-----
> >> From: Ross Gardler [mailto:rgardler@apache.org]
> >> Sent: Saturday, 16 December 2006 9:46 AM
> >> To: dev@forrest.apache.org
> >> Subject: Re: Building Forrest 2
> >>
> >> Ross Gardler wrote:
> >>> Gav.... wrote:
> >> ...
> >>
> >>>> [java] org.apache.forrest.core.exception.ProcessingException:
> >>>> Unable to
> >>>> cre
> >>>> ate the output documents for helloWorld.html because null caused by
> >> null
> >>> Now there is a useful error message! It has been improved in the
> latest
> >>> SVN, I think, but if you did an SVN up then obviously not.
> >> Seems I forgot to commit to SVN before setting off on my travels.
> >>
> >>> Anyway, I just tried the "Getting Started" instructions word for word
> >>> and reproduced the error you report.
> >> ...
> >>
> >> I believe I have now fixed this bug, thanks for testing Gav.
> >>
> >> I've also improved the log messages even more.
> >>
> >> Ross
> >
> > Thanks, the improved error messages worked fine, my build still failed.
> > I've committed a couple of changes that allowed my build to succeed.
> > Let me know if they don't break your build because of them.
> >
> > The source .xhtml2 files are now be located correctly and also the
> > Resultant .html files are being produced correctly.
>
> Sorry, I had not committed my locationmap change that fixed this.
No problem.
>
> I've been using the Eclipse SVN plugin recently and, as always seems to
> be the case when I use GUI interfaces I make mistakes. Not excusable -
> I'm back to the command line again (this was an experiment to review a
> claim I make in a presentation I make fairly frequently about GUI's
> interfaces to version control being c**p - glad I don't have to change
> my slide ;-)
I have Eclipse and I saw the SVN integration, I remembered conversations
Before about using GUIs (specifically TortoiseSVN in that case) so I
Kept well away.
>
> Anyway, your solution is slightly different to mine, but I yours is in
> there now, so we'll stick with that. Thanks.
Ok.
>
> With respect to your change to the build.xml file, it's not necessary.
> But if you find it more appropriate this way, I have no problem with it
> (this whole section will need to be refactored when we have plugin
> loading code etc.)
Ok.
>
> Big thanks for the corrections to my docs too.
No problem. My approach here was to purposely go through and spot any
Errors, spelling or otherwise. This has the effect of me therefore
Reading through all of your docs and code to familiarise myself
With it all a bit more. It's doing the trick.
>
> > Using the 'dot' in '.*' in regexp can I believe cause problems
> > Between Unix and Windows if used in such a way the newlines
> > Are part of the equation, not sure if it will apply here or in
> > The future.
>
> I really want to reuse the matcher code from Cocoon for the matcher
> stuff that would provide us with the more user friendly Cocoon notation
> (as well as a more complete RE implementation).
>
> > I also think that as part of the 'clean' process we should be deleting
> the
> > Content.object.build.dir, WDYT?
>
> +1 (I've made the change)
I see this just came through as I'm replying , thanks.
The 9 hours time difference now is coming in handy :)
(Perth just re-introduced daylight saving after 20+ years)
>
> > It would be nice at this stage to be able to run a webapp (using Jetty
> ?)
> > To see some styled output to a web browser.
> >
> > What needs to be done to do this?
>
> It's very simple (if you know servlets), one of the goals of Forrest2 is
> to make it easy to embed in different environments.
>
> I do have basic code for this, I committed it to SVN just before sending
> this mail. See the see forrest-webapp dir.
>
> The "problem" with this code is that it does not have a *working* ANT
> script (or other mechanism) for running it in Jetty or whatever, I have
> not found the time to complete this yet. If you want to complete the
> necessary runner in the ANT script, that would be very helpful.
Ok, I'll take a look.
>
> The second problem is that there is very little testing on this code (in
> fact none since I did all the recent refactoring) and I have not made
> any attempt to make it configurable. Of course, I am more than happy to
> turn some of my attention to this if it is what is needed to help people
> explore Forrest2.
I think more people would be more inclined to take a look if there was an
Initial running site in the web browser. But you can't do everything, there
May be those interested in Forrest2 but are holding backto do this, or
They may simply be concentrating on the official Forrest 1 version.
As said before, I am interested in Forrest 2 and where it's heading, so
I'm looking at it when I find extra time, but my main focus must still
Lie with Forrest 1, we need to get 0.8 finished.
>
> > I see the Wicket Demo has a webapp, how can I run that?
>
> The easiest way is to use Eclipse with the Wicket Bench plugin. However,
> be aware that this uses wicket 2 (still in alpha) and that the published
> Wicket Bench plugin is for Wicket 1.2 (there is a snapshot compiled
> against Wicket 2.0).
>
> The current Wicket Demo is pretty limited and is only really useful as a
> demo. Whilst this is also true of the webapp code I think our community
> efforts would be better spent on the servlet webapp since this is more
> accessible, i.e. it has no additional dependencies.
>
> Of course, if you have a special interest in Wicket integration stuff
> then I'll be happy to help you get it up and running.
No, I have no special interest in Wicket personally (atm) , just curious, so
I'll leave that alone.
>
> > I don't have a JAVA editor AFAIK so can not edit the .class or .java
> files,
> > Any suggestions on a suitable program to use?
>
> I use Eclipse. All my Java code committed to SVN have the necessary
> eclipse config files (although they are not tested outside of my own
> environment).
Hmm, I do have Eclipse, forgot I had it, no real time to learn it at
The moment. I didn't really want to set up projects within it at the
Moment, just wanted something that I can use to just edit a .class
File and look inside. I also Have IntelliJ Idea, though my request
For a license in February still has not come through. This is also
Similar to Eclipse in that as far as I can see , you need to set up
Complete projects rather than peeking at individual class files.
Gav...
>
> Ross
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.15.23/591 - Release Date:
> 12/17/2006
Re: Building Forrest 2
Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
>
>> -----Original Message-----
>> From: Ross Gardler [mailto:rgardler@apache.org]
>> Sent: Saturday, 16 December 2006 9:46 AM
>> To: dev@forrest.apache.org
>> Subject: Re: Building Forrest 2
>>
>> Ross Gardler wrote:
>>> Gav.... wrote:
>> ...
>>
>>>> [java] org.apache.forrest.core.exception.ProcessingException:
>>>> Unable to
>>>> cre
>>>> ate the output documents for helloWorld.html because null caused by
>> null
>>> Now there is a useful error message! It has been improved in the latest
>>> SVN, I think, but if you did an SVN up then obviously not.
>> Seems I forgot to commit to SVN before setting off on my travels.
>>
>>> Anyway, I just tried the "Getting Started" instructions word for word
>>> and reproduced the error you report.
>> ...
>>
>> I believe I have now fixed this bug, thanks for testing Gav.
>>
>> I've also improved the log messages even more.
>>
>> Ross
>
> Thanks, the improved error messages worked fine, my build still failed.
> I've committed a couple of changes that allowed my build to succeed.
> Let me know if they don't break your build because of them.
>
> The source .xhtml2 files are now be located correctly and also the
> Resultant .html files are being produced correctly.
Sorry, I had not committed my locationmap change that fixed this.
I've been using the Eclipse SVN plugin recently and, as always seems to
be the case when I use GUI interfaces I make mistakes. Not excusable -
I'm back to the command line again (this was an experiment to review a
claim I make in a presentation I make fairly frequently about GUI's
interfaces to version control being c**p - glad I don't have to change
my slide ;-)
Anyway, your solution is slightly different to mine, but I yours is in
there now, so we'll stick with that. Thanks.
With respect to your change to the build.xml file, it's not necessary.
But if you find it more appropriate this way, I have no problem with it
(this whole section will need to be refactored when we have plugin
loading code etc.)
Big thanks for the corrections to my docs too.
> Using the 'dot' in '.*' in regexp can I believe cause problems
> Between Unix and Windows if used in such a way the newlines
> Are part of the equation, not sure if it will apply here or in
> The future.
I really want to reuse the matcher code from Cocoon for the matcher
stuff that would provide us with the more user friendly Cocoon notation
(as well as a more complete RE implementation).
> I also think that as part of the 'clean' process we should be deleting the
> Content.object.build.dir, WDYT?
+1 (I've made the change)
> It would be nice at this stage to be able to run a webapp (using Jetty ?)
> To see some styled output to a web browser.
>
> What needs to be done to do this?
It's very simple (if you know servlets), one of the goals of Forrest2 is
to make it easy to embed in different environments.
I do have basic code for this, I committed it to SVN just before sending
this mail. See the see forrest-webapp dir.
The "problem" with this code is that it does not have a *working* ANT
script (or other mechanism) for running it in Jetty or whatever, I have
not found the time to complete this yet. If you want to complete the
necessary runner in the ANT script, that would be very helpful.
The second problem is that there is very little testing on this code (in
fact none since I did all the recent refactoring) and I have not made
any attempt to make it configurable. Of course, I am more than happy to
turn some of my attention to this if it is what is needed to help people
explore Forrest2.
> I see the Wicket Demo has a webapp, how can I run that?
The easiest way is to use Eclipse with the Wicket Bench plugin. However,
be aware that this uses wicket 2 (still in alpha) and that the published
Wicket Bench plugin is for Wicket 1.2 (there is a snapshot compiled
against Wicket 2.0).
The current Wicket Demo is pretty limited and is only really useful as a
demo. Whilst this is also true of the webapp code I think our community
efforts would be better spent on the servlet webapp since this is more
accessible, i.e. it has no additional dependencies.
Of course, if you have a special interest in Wicket integration stuff
then I'll be happy to help you get it up and running.
> I don't have a JAVA editor AFAIK so can not edit the .class or .java files,
> Any suggestions on a suitable program to use?
I use Eclipse. All my Java code committed to SVN have the necessary
eclipse config files (although they are not tested outside of my own
environment).
Ross
RE: Building Forrest 2
Posted by "Gav...." <br...@brightontown.com.au>.
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Saturday, 16 December 2006 9:46 AM
> To: dev@forrest.apache.org
> Subject: Re: Building Forrest 2
>
> Ross Gardler wrote:
> > Gav.... wrote:
>
> ...
>
> >> [java] org.apache.forrest.core.exception.ProcessingException:
> >> Unable to
> >> cre
> >> ate the output documents for helloWorld.html because null caused by
> null
> >
> > Now there is a useful error message! It has been improved in the latest
> > SVN, I think, but if you did an SVN up then obviously not.
>
> Seems I forgot to commit to SVN before setting off on my travels.
>
> > Anyway, I just tried the "Getting Started" instructions word for word
> > and reproduced the error you report.
>
> ...
>
> I believe I have now fixed this bug, thanks for testing Gav.
>
> I've also improved the log messages even more.
>
> Ross
Thanks, the improved error messages worked fine, my build still failed.
I've committed a couple of changes that allowed my build to succeed.
Let me know if they don't break your build because of them.
The source .xhtml2 files are now be located correctly and also the
Resultant .html files are being produced correctly.
Using the 'dot' in '.*' in regexp can I believe cause problems
Between Unix and Windows if used in such a way the newlines
Are part of the equation, not sure if it will apply here or in
The future.
I also think that as part of the 'clean' process we should be deleting the
Content.object.build.dir, WDYT?
It would be nice at this stage to be able to run a webapp (using Jetty ?)
To see some styled output to a web browser.
What needs to be done to do this?
I see the Wicket Demo has a webapp, how can I run that?
I don't have a JAVA editor AFAIK so can not edit the .class or .java files,
Any suggestions on a suitable program to use?
Thanks
Gav...
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.15.21/589 - Release Date:
> 12/15/2006
Re: Building Forrest 2
Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> Gav.... wrote:
...
>> [java] org.apache.forrest.core.exception.ProcessingException:
>> Unable to
>> cre
>> ate the output documents for helloWorld.html because null caused by null
>
> Now there is a useful error message! It has been improved in the latest
> SVN, I think, but if you did an SVN up then obviously not.
Seems I forgot to commit to SVN before setting off on my travels.
> Anyway, I just tried the "Getting Started" instructions word for word
> and reproduced the error you report.
...
I believe I have now fixed this bug, thanks for testing Gav.
I've also improved the log messages even more.
Ross
Re: Building Forrest 2
Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
> I'll take a look tomorrow Ross,
>
> I did notice that the /build/* is being created in [FORREST2_HOME]/build/*
> And output messages seemed to indicate it is looking for it but can not
> Find it in [FORREST2_HOME]/src/examples/helloworld/build/*
>
> So is 'build/*' being created in the wrong place or looked for in the
> Wrong place, or is this the correct operation (and so I'll look at your
> Other hints tomorrow)
It's a little clumsy at present. The core code is compiled to
FORREST2_HOME/build - which makes sense.
However (from memory - i.e. check against the code, which I don't have
access to right now) in order to honour locations such as
"classpath:xdocs/$(1)" we currently also compile the content object
stuff to FORREST2_HOME/build.
The reason for this is that some content objects currently contain
plugin code which needs compiling and there is no plugin loading
mechanism at present.
So, in answer to your question, if Forrest is looking in
[FORREST2_HOME]/src/examples/helloworld/build this is probably wrong
(needs verifying).
It would be better to compile the plugin code in place (i.e. to
[PLUGIN_HOME]/build) and add this to the classpath of the VM executing
Forrest, if your using the ANT run task this is easy enough to do (just
add it to the classpath in the target). It will also need to be added to
the CLI but I would ignore that for now, I plan to use a CLI helper
class for this.
All this then leaves the question of what to do with the XDocs and
suchlike. Most important is that we don't want to be copying source code
into the build directories as we are doing now. We need copyless editing
as in Forrest1. Again, this should be a case of just adding the
[CONTENT_OBJECT]/src directory to the classpath.
I hope this helps if you want to take a look at things. I'll be back on
my usually dev machines at the weekend and can help out then if need be.
Ross
RE: Building Forrest 2
Posted by "Gav...." <br...@brightontown.com.au>.
I'll take a look tomorrow Ross,
I did notice that the /build/* is being created in [FORREST2_HOME]/build/*
And output messages seemed to indicate it is looking for it but can not
Find it in [FORREST2_HOME]/src/examples/helloworld/build/*
So is 'build/*' being created in the wrong place or looked for in the
Wrong place, or is this the correct operation (and so I'll look at your
Other hints tomorrow)
Gav...
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Wednesday, 13 December 2006 10:14 PM
> To: dev@forrest.apache.org
> Subject: Re: Building Forrest 2
>
> Gav.... wrote:
> >
> >> -----Original Message-----
> >> From: Ross Gardler [mailto:rgardler@apache.org]
> >> Sent: Thursday, 23 November 2006 9:13 AM
> >> To: dev@forrest.apache.org
> >> Subject: Re: Building Forrest 2
> >
> > <snip>
> >
> >> I really am trying to do too many things tonight (the Ashes have start
> >> as well, so that's me out of the real world for 5 days)
> >>
> >> It's in
> >>
> http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/co
> >> re/org/apache/forrest/core/Controller.java?revision=477949&view=markup
> >>
> >> The CLI calls the default constructor which calls
> >> this("src/locationmap.xml", "src/forrestContext.xml");
> >>
> >> The file resolution is in the parameterised constructor and consists of
> >> two parts:
> >>
> >> final File file = new File(contextPath);
> >>
> >> and
> >>
> >> this.context = new FileSystemXmlApplicationContext(file
> >> .getAbsolutePath());
> >>
> >> (contextPath in the first line is the "src/forrestContext.xml")
> >>
> >> The problem is that getAbsolutePath() should be getPath().
> >>
> >> I've made the change, please test.
> >>
> >> Ross
> >
> > Just got round to trying this and mine fails :-
> >
> > [java] 828 [main] DEBUG
> > org.apache.forrest.core.locationMap.LocationMap (?
> > :?) - Adding location:
> > Matcher:org.apache.forrest.core.matcher.REMatcher@1242b1
> > 1
> >
> > [java] org.apache.forrest.core.exception.ProcessingException:
> Unable to
> > cre
> > ate the output documents for helloWorld.html because null caused by null
>
> Now there is a useful error message! It has been improved in the latest
> SVN, I think, but if you did an SVN up then obviously not.
>
> Anyway, I just tried the "Getting Started" instructions word for word
> and reproduced the error you report. I must have broken something in my
> recent work. All the automated tests run, but the getting started
> instructions do not.
>
> I'll look at this ASAP, but it won't be for a few days.
>
> If you are interested in looking into the problem the key is:
>
> [java] Processing request for helloWorld.html
> [java] 4717 [main] DEBUG org.apache.forrest.cli.CLI (CLI.java:94)
> - Proces
> sing: helloWorld.html
> [java] 4717 [main] DEBUG
> org.apache.forrest.core.locationMap.LocationMap (L
> ocationMap.java:114) - Getting potential locations for request of
> helloWorld.ht
> ml
> [java] 4777 [main] INFO
> org.apache.forrest.core.locationMap.LocationMap (L
> ocationMap.java:123) - 1 potential location from pattern (.*)/(.*).html
> [java] org.apache.forrest.core.exception.ProcessingException:
> Unable to cre
> ate the output documents for helloWorld.html caused by Unable to get a
> source do
> cument for request helloWorld.html
> [java] at
> org.apache.forrest.core.Controller.getOutputDocument(Controll
> er.java:486)
> [java] at org.apache.forrest.cli.CLI.processURIs(CLI.java:95)
> [java] at org.apache.forrest.cli.CLI.main(CLI.java:65)
> [java] 4787 [main] ERROR org.apache.forrest.cli.CLI (CLI.java:69)
> - org.ap
> ache.forrest.core.exception.ProcessingException: Unable to create the
> output doc
> uments for helloWorld.html caused by Unable to get a source document for
> request
> helloWorld.html
> [java] Caused by:
> org.apache.forrest.core.exception.ProcessingException: Un
> able to get a source document for request helloWorld.html
>
> (note the improved error messages in the latest version)
>
> It looks like the reader is unable to find the source document, but it
> is finding a potential match in the locationmap.
>
> Three possibilities immediately jump to mind:
>
> - the reader is not finding the resource (perhaps it is not being copied
> into the classpath by the build system - it's not copyless yet)
>
> - the reader is incorrectly loading the source document (I've done lots
> of refactoring of the readers and internal docs recently, so this could
> be the case - need to add better log messages to the readers to trace
> this - or step through with a debugger)
>
> - The locationmap is not being resolved correctly and hence the reader
> is looking in the wrong place (again need to improve logging in the
> reader)
>
> You understand I'm not asking you to debug this, just documenting the
> potential issues in an attempt to help build an understanding of how
> things work internally.
>
> Ross
Re: Building Forrest 2
Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
>
>> -----Original Message-----
>> From: Ross Gardler [mailto:rgardler@apache.org]
>> Sent: Thursday, 23 November 2006 9:13 AM
>> To: dev@forrest.apache.org
>> Subject: Re: Building Forrest 2
>
> <snip>
>
>> I really am trying to do too many things tonight (the Ashes have start
>> as well, so that's me out of the real world for 5 days)
>>
>> It's in
>> http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/co
>> re/org/apache/forrest/core/Controller.java?revision=477949&view=markup
>>
>> The CLI calls the default constructor which calls
>> this("src/locationmap.xml", "src/forrestContext.xml");
>>
>> The file resolution is in the parameterised constructor and consists of
>> two parts:
>>
>> final File file = new File(contextPath);
>>
>> and
>>
>> this.context = new FileSystemXmlApplicationContext(file
>> .getAbsolutePath());
>>
>> (contextPath in the first line is the "src/forrestContext.xml")
>>
>> The problem is that getAbsolutePath() should be getPath().
>>
>> I've made the change, please test.
>>
>> Ross
>
> Just got round to trying this and mine fails :-
>
> [java] 828 [main] DEBUG
> org.apache.forrest.core.locationMap.LocationMap (?
> :?) - Adding location:
> Matcher:org.apache.forrest.core.matcher.REMatcher@1242b1
> 1
>
> [java] org.apache.forrest.core.exception.ProcessingException: Unable to
> cre
> ate the output documents for helloWorld.html because null caused by null
Now there is a useful error message! It has been improved in the latest
SVN, I think, but if you did an SVN up then obviously not.
Anyway, I just tried the "Getting Started" instructions word for word
and reproduced the error you report. I must have broken something in my
recent work. All the automated tests run, but the getting started
instructions do not.
I'll look at this ASAP, but it won't be for a few days.
If you are interested in looking into the problem the key is:
[java] Processing request for helloWorld.html
[java] 4717 [main] DEBUG org.apache.forrest.cli.CLI (CLI.java:94)
- Proces
sing: helloWorld.html
[java] 4717 [main] DEBUG
org.apache.forrest.core.locationMap.LocationMap (L
ocationMap.java:114) - Getting potential locations for request of
helloWorld.ht
ml
[java] 4777 [main] INFO
org.apache.forrest.core.locationMap.LocationMap (L
ocationMap.java:123) - 1 potential location from pattern (.*)/(.*).html
[java] org.apache.forrest.core.exception.ProcessingException:
Unable to cre
ate the output documents for helloWorld.html caused by Unable to get a
source do
cument for request helloWorld.html
[java] at
org.apache.forrest.core.Controller.getOutputDocument(Controll
er.java:486)
[java] at org.apache.forrest.cli.CLI.processURIs(CLI.java:95)
[java] at org.apache.forrest.cli.CLI.main(CLI.java:65)
[java] 4787 [main] ERROR org.apache.forrest.cli.CLI (CLI.java:69)
- org.ap
ache.forrest.core.exception.ProcessingException: Unable to create the
output doc
uments for helloWorld.html caused by Unable to get a source document for
request
helloWorld.html
[java] Caused by:
org.apache.forrest.core.exception.ProcessingException: Un
able to get a source document for request helloWorld.html
(note the improved error messages in the latest version)
It looks like the reader is unable to find the source document, but it
is finding a potential match in the locationmap.
Three possibilities immediately jump to mind:
- the reader is not finding the resource (perhaps it is not being copied
into the classpath by the build system - it's not copyless yet)
- the reader is incorrectly loading the source document (I've done lots
of refactoring of the readers and internal docs recently, so this could
be the case - need to add better log messages to the readers to trace
this - or step through with a debugger)
- The locationmap is not being resolved correctly and hence the reader
is looking in the wrong place (again need to improve logging in the reader)
You understand I'm not asking you to debug this, just documenting the
potential issues in an attempt to help build an understanding of how
things work internally.
Ross