You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Dave Koelmeyer <da...@davekoelmeyer.co.nz> on 2014/07/08 05:24:48 UTC

Error when building JSPWiki

Hi Folks,

Just trying to figure out how to build JSPWiki from source (not being in 
the habit of regularly building software). Last time I had to do this it 
was simply a matter of checking out the source, and running 'ant war' on 
it. Looks like Maven is now preferred.

I'm on Ubuntu 14.04, with the full OpenJDK 7 installed, and Maven 3.0.5.

I have checked out the source code thusly:

svn co http://svn.apache.org/repos/asf/jspwiki/trunk jspwiki

I then cd into the checked out directory, and run 'mvn package', which 
as I understand it is supposed to compile, build, and generate a WAR 
file in one go. Almost 2.5 minutes into the build, it fails with the 
following error:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) 
on project jspwiki-war: There are test failures.
[ERROR]
[ERROR] Please refer to 
/home/dave/jspwiki/jspwiki-war/target/surefire-reports for the 
individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test 
(default-test) on project jspwiki-war: There are test failures.


Within the directory referred to there are a stack of reports with no 
indication as to which exactly contains the relevant test failure 
detail. Before I go trawling through these, can someone please let me 
know if this is the correct way to build JSPWiki, or offer any clues as 
to what is going wrong here?

Thanks,
Dave





Re: Error when building JSPWiki

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
Hi Dave,

is it possible that the project in eclipse has been opened (or the project
itself has been svn'd checkout) with a different user that was issuing the
mvn package command? Would you mind checking that the user who issues the
mvn package has full r+w permissions on the project folder and its
subfolders? It seems to me you're having a file permission issue with that
specific test. Could you post the related stacktrace (mvn clean test
-Dtest=WikiEngineTest#
testNonExistentDirectory and then look under under
./jspwiki-war/target/logs/jspwiki.log), with latest trunk?


br,
juan pablo


On Wed, Jul 16, 2014 at 8:00 AM, Dave Koelmeyer <
dave.koelmeyer@davekoelmeyer.co.nz> wrote:

>
> On 09/07/14 10:03, Juan Pablo Santos Rodríguez wrote:
>
>> 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.
>>
>
> Hi Juan Pablo,
>
> Just an update – running mvn package as the root user allows me to
> successfully build the JSPWiki war with no other changes required as
> expected. For all I know this could be by design (in which case apologies
> for not realising this), but if it's not (that is, I should be able to
> build the WAR file as a standard user) please let me know and I'll post
> further details by way of logged errors.
>
> Cheers,
> Dave
>
>
>
>
>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>

Re: Error when building JSPWiki

Posted by Dave Koelmeyer <da...@davekoelmeyer.co.nz>.
On 09/07/14 10:03, Juan Pablo Santos Rodríguez wrote:
> 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.

Hi Juan Pablo,

Just an update – running mvn package as the root user allows me to 
successfully build the JSPWiki war with no other changes required as 
expected. For all I know this could be by design (in which case 
apologies for not realising this), but if it's not (that is, I should be 
able to build the WAR file as a standard user) please let me know and 
I'll post further details by way of logged errors.

Cheers,
Dave


>
> 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
>>>>
>>>>
>>>>


Re: Error when building JSPWiki

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
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
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
>
>

Re: Error when building JSPWiki

Posted by Siegfried Goeschl <si...@it20one.com>.
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 <ju...@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
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 


Re: Error when building JSPWiki

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
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
>
>
>
>
>
>
>
>
>

Re: Error when building JSPWiki

Posted by Dave Koelmeyer <da...@davekoelmeyer.co.nz>.
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









Re: Error when building JSPWiki

Posted by Brian Burch <br...@pingtoo.com>.
On 08/07/14 08:35, Juan Pablo Santos Rodríguez wrote:
> Hi Dave,
>
> 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.

Regards,

Brian

> HTH,
> juan pablo
>
>
>
>
>
>
> On Tue, Jul 8, 2014 at 5:24 AM, Dave Koelmeyer <
> dave.koelmeyer@davekoelmeyer.co.nz> wrote:
>
>> Hi Folks,
>>
>> Just trying to figure out how to build JSPWiki from source (not being in
>> the habit of regularly building software). Last time I had to do this it
>> was simply a matter of checking out the source, and running 'ant war' on
>> it. Looks like Maven is now preferred.
>>
>> I'm on Ubuntu 14.04, with the full OpenJDK 7 installed, and Maven 3.0.5.
>>
>> I have checked out the source code thusly:
>>
>> svn co http://svn.apache.org/repos/asf/jspwiki/trunk jspwiki
>>
>> I then cd into the checked out directory, and run 'mvn package', which as
>> I understand it is supposed to compile, build, and generate a WAR file in
>> one go. Almost 2.5 minutes into the build, it fails with the following
>> error:
>>
>> [ERROR] Failed to execute goal org.apache.maven.plugins:
>> maven-surefire-plugin:2.16:test (default-test) on project jspwiki-war:
>> There are test failures.
>> [ERROR]
>> [ERROR] Please refer to /home/dave/jspwiki/jspwiki-war/target/surefire-reports
>> for the individual test results.
>> [ERROR] -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
>> goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test
>> (default-test) on project jspwiki-war: There are test failures.
>>
>>
>> Within the directory referred to there are a stack of reports with no
>> indication as to which exactly contains the relevant test failure detail.
>> Before I go trawling through these, can someone please let me know if this
>> is the correct way to build JSPWiki, or offer any clues as to what is going
>> wrong here?
>>
>> Thanks,
>> Dave
>>
>>
>>
>>
>>
>


Re: Error when building JSPWiki

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
Hi Dave,

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


HTH,
juan pablo






On Tue, Jul 8, 2014 at 5:24 AM, Dave Koelmeyer <
dave.koelmeyer@davekoelmeyer.co.nz> wrote:

> Hi Folks,
>
> Just trying to figure out how to build JSPWiki from source (not being in
> the habit of regularly building software). Last time I had to do this it
> was simply a matter of checking out the source, and running 'ant war' on
> it. Looks like Maven is now preferred.
>
> I'm on Ubuntu 14.04, with the full OpenJDK 7 installed, and Maven 3.0.5.
>
> I have checked out the source code thusly:
>
> svn co http://svn.apache.org/repos/asf/jspwiki/trunk jspwiki
>
> I then cd into the checked out directory, and run 'mvn package', which as
> I understand it is supposed to compile, build, and generate a WAR file in
> one go. Almost 2.5 minutes into the build, it fails with the following
> error:
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-surefire-plugin:2.16:test (default-test) on project jspwiki-war:
> There are test failures.
> [ERROR]
> [ERROR] Please refer to /home/dave/jspwiki/jspwiki-war/target/surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test
> (default-test) on project jspwiki-war: There are test failures.
>
>
> Within the directory referred to there are a stack of reports with no
> indication as to which exactly contains the relevant test failure detail.
> Before I go trawling through these, can someone please let me know if this
> is the correct way to build JSPWiki, or offer any clues as to what is going
> wrong here?
>
> Thanks,
> Dave
>
>
>
>
>