jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Pablo Santos Rodríguez <juanpablo.san...@gmail.com>
Subject Re: Error when building JSPWiki
Date Tue, 08 Jul 2014 22:03:44 GMT
Ah, now I remember, that was due to
https://issues.apache.org/jira/browse/JSPWIKI-823. In fact, when building a
TestEngine, System.currentTimeMillis() is added to the value of the
jspwiki.fileSystemProvider.pageDir property so the test is trying to create
a directory called something like
./jspwiki-war/target/non-existent-directory1404849857583

@Dave: I've added the original exception message to the exception you're
facing, would you mind to svn update trunk and running "mvn clean test
-Dtest=WikiEngineTest#testNonExistentDirectory"? That way only that test
will be run and you'll have the complete stacktrace under
./jspwiki-war/target/logs/jspwiki.log, with the specific underlying error
you're having.


thx + br,
juan pablo


On Tue, Jul 8, 2014 at 8:56 PM, Siegfried Goeschl <
siegfried.goeschl@it20one.com> wrote:

> Hi folks,
>
> actually the following snippet is defined in jspwiki-war/pom.xml
>
> <plugin>
>   <artifactId>maven-surefire-plugin</artifactId>
>   <configuration>
>     <systemPropertyVariables>
>         <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
>     </systemPropertyVariables>
>   </configuration>
> </plugin>
>
> In other words
>
> * the temp directory should be “./target”
> * the temp directory can be supplied on the command line, e.g.
> “-Djava.io.tmpdir=/tmp/jspwiki”
>
> Cheers,
>
> Siegfried Goeschl
>
> On 08 Jul 2014, at 12:24, Juan Pablo Santos Rodríguez <
> juanpablo.santos@gmail.com> wrote:
>
> > Hi Dave,
> >
> > yes, tests should run ok on a fresh install. Looking at the source, the
> > test is trying to create the directory
> > ${java.io.tmpdir.}/non-existent-directory and check that it has been able
> > to create it. Would you mind checking if you have rw on that folder?
> > Looking at AbstractFileProvider:110, seems that the test is failing due
> to
> > being unable to create that folder. Maybe we should change that test to
> > look into "./target/non-existent-directory" + System.currentTimeMillis()
> > instead, WDYT?
> >
> >
> > br,
> > juan pablo
> >
> >
> > On Tue, Jul 8, 2014 at 12:02 PM, Dave Koelmeyer <
> > dave.koelmeyer@davekoelmeyer.co.nz> wrote:
> >
> >>
> >> On 08/07/14 20:51, Brian Burch wrote:
> >>
> >>> On 08/07/14 08:35, Juan Pablo Santos Rodríguez wrote:
> >>>
> >>>>
> >>>> within that directory you'll see a bunch of txt and xml files, one of
> >>>> each
> >>>> type for every junit file; the xml ones have the same information as
> the
> >>>> txt ones, but they're in different format, so they can be consumed by
> >>>> other
> >>>> tools.
> >>>>
> >>>> As for the txt files, you'll see most of them weight about 1k, those
> are
> >>>> files corresponding to tests which have ended successfully. You'll
> surely
> >>>> have on txt file weighting a little more (say 5 or 6k, it depends on
> the
> >>>> test file), which will contain the failing test. It should also
> appear on
> >>>> your console, somewhat above the "build failure" message
> >>>>
> >>>>
> >>> grep -lir failed /home/dave/jspwiki/jspwiki-
> >>> war/target/surefire-reports/*.txt
> >>>
> >>> ought to identify the txt files containing the test that failed. You
> only
> >>> need to look at that one.
> >>>
> >>>
> >> Awesome, thanks all. The offending test appears to be:
> >>
> >> /home/dave/jspwiki/jspwiki-war/target/surefire-reports/org.apache.wiki.
> >> WikiEngineTest.txt
> >>
> >>
> >> And the contents:
> >>
> >> ------------------------------------------------------------
> >> -------------------
> >> Test set: org.apache.wiki.WikiEngineTest
> >> ------------------------------------------------------------
> >> -------------------
> >> Tests run: 40, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.894
> sec
> >> <<< FAILURE! - in org.apache.wiki.WikiEngineTest
> >> testNonExistentDirectory(org.apache.wiki.WikiEngineTest)  Time elapsed:
> >> 0.025 sec  <<< ERROR!
> >> org.apache.wiki.api.exceptions.WikiException: JSPWiki: Unable to load
> and
> >> setup properties from jspwiki.properties. Failed to start; please check
> log
> >> files for bett
> >> er information.
> >>    at org.apache.wiki.providers.AbstractFileProvider.initialize(
> >> AbstractFileProvider.java:110)
> >>    at org.apache.wiki.providers.CachingProvider.initialize(
> >> CachingProvider.java:146)
> >>    at org.apache.wiki.PageManager.<init>(PageManager.java:190)
> >>    at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown
> >> Source)
> >>    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> >> DelegatingConstructorAccessorImpl.java:45)
> >>    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> >>    at org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:359)
> >>    at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:563)
> >>    at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:430)
> >>    at org.apache.wiki.TestEngine.<init>(TestEngine.java:127)
> >>    at org.apache.wiki.WikiEngineTest.testNonExistentDirectory(
> >> WikiEngineTest.java:98)
> >>
> >>
> >> Is there some manual configuration I need to perform somewhere, or is
> >> running 'mvn package' supposed to "just work"?
> >>
> >> Cheers,
> >> Dave
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message