You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Dirk Frederickx <di...@gmail.com> on 2020/03/04 21:38:33 UTC

Error on latest 2.11.0-M7-git-10

I'm getting following error after installing the latest version. It
occurs when trying to edit a page.  Seems a problem with the latest
version of the EditorManager class.  Any clue?

(running tomcat 8.5.37;  with jdk 1.8)


>>>>

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [72] in the jsp file: [/Edit.jsp]
References to interface static methods are allowed only at source
level 1.8 or above

69:     String edit    = request.getParameter("edit");
70:     String author  = TextUtil.replaceEntities( findParam(
pageContext, "author" ) );
71:     String changenote = findParam( pageContext, "changenote" );
72:     String text    = EditorManager.getEditedText( pageContext );
73:     String link    = TextUtil.replaceEntities( findParam(
pageContext, "link") );
74:     String spamhash = findParam( pageContext,
SpamFilter.getHashFieldName(request) );
75:     String captcha = (String)session.getAttribute("captcha");



dirk

Re: Error on latest 2.11.0-M7-git-10

Posted by Dirk Frederickx <di...@gmail.com>.
Juan

Txs!

dirk

On Fri, Mar 6, 2020 at 7:40 PM Juan Pablo Santos Rodríguez <
juanpablo.santos@gmail.com> wrote:

> Hi,
>
> pushed the changes with last commit, now both maven cargo plugin and
> portable binaries use a tomcat 9.x
> server. I've also updated
>
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Getting%20Started#section-Getting+Started-Requirements
> to note that tomcat 9.x is recommended, although tomcat 8.x is supported
> (any editing to make it clearer are welcome)
>
>
> best regards,
> juan pablo
>
> On Thu, Mar 5, 2020 at 5:39 PM Juan Pablo Santos Rodríguez <
> juanpablo.santos@gmail.com> wrote:
>
> > Hi Dirk,
> >
> > ok, I'll proceed with the mentioned changes.
> >
> > re. integration tests, Selenium based tests had a number of problems:
> > - they were very brittle, hard to mantain and hard to reuse
> > - they were targetted for the 210 template, so when changing the default
> > to the haddock template they became obsolete
> > - making them work with the haddock template meant completely rewriting
> > them
> > - some of the tests were incomplete / commented out
> >
> > Given that, https://issues.apache.org/jira/browse/JSPWIKI-1086 was
> > created to rewrite the functional tests infrastructure
> > using Selenide, which is a java based framework which greatly simplifies
> > the use of Selenium (see [#1] for an example),
> > which makes functional tests very easy to write and maintain.
> >
> > The integration tests remain to be written, though, and right now there
> > are only a couple of them. Old selenium tests are
> > being kept for reference but I suppose one day they'll go away..
> >
> >
> > best regards,
> > juan pablo
> >
> > [#1]:
> >
> https://github.com/apache/jspwiki/blob/master/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java#L38
> >
> >
> > On Thu, Mar 5, 2020 at 4:27 PM Dirk Frederickx <
> dirk.frederickx@gmail.com>
> > wrote:
> >
> >> Juan,
> >>
> >> Indeed,  it is strange that the default on TOMCAT 8.x is the compile the
> >> JSP with 1.7.
> >> Anyway, ok to move the recommendation up to TOMCAT 9.X ;  possillbly
> >> adding
> >> the information on the extra config lines needed to run jspwiki on
> TOMCAT
> >> 8.x.
> >>
> >> It took some time to diagnose, as indeed all tests were running
> >> successfully.
> >> I was not aware that we have no page-edit yet in the integration tests
> ?
> >>
> >>
> >> dirk
> >>
> >>
> >> On Thu, Mar 5, 2020 at 1:50 PM Juan Pablo Santos Rodríguez <
> >> juanpablo.santos@gmail.com> wrote:
> >>
> >> > Hi Dirk,
> >> >
> >> > also running with JDK-8, and ran into the same problem. Seems
> extremely
> >> > weird to me, as we're enforcing/building/running with JDK-8,
> >> > but according to https://stackoverflow.com/a/47461590 it's the
> expected
> >> > behaviour: tomcat 8 by default uses JDK-7 level to compile and
> >> > run the JSPs (tomcat 9 uses JDK-8 for the same thing).
> >> >
> >> > Our README.md file simply states that the following prerequisites are
> >> > needed (textually):
> >> >
> >> > - A JSP engine that supports Servlet API 3.1.  We recommend Tomcat
> from
> >> > http://tomcat.apache.org/ for a really easy installation.
> >> >   Tomcat 8.x or later is supported.
> >> >
> >> > - JDK 8+
> >> >
> >> > I'd rather update that doc to state that Tomcat 9 is recommended,
> >> although
> >> > Tomcat 8 is supported, with a link to a new entry to
> >> >
> >> >
> >>
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki
> >> > describing how to run JSPWiki
> >> > with Tomcat 8.x.
> >> >
> >> > That way the expected installation should be as smooth as ever.. We
> >> should
> >> > also update the cargo maven plugin configuration to use
> >> > tomcat 9, but that should be trivial.
> >> >
> >> > Thoughts?
> >> >
> >> > Also related to this, I ran the integration tests before last push
> >> (there
> >> > were a lot of changes), and they were ok, as they right now just
> >> > perform a login / logout + an anonymous view test. I still have
> pending
> >> > adding an integration test to verify a page edit which would have
> caught
> >> > this problem on the first place :-/
> >> >
> >> >
> >> > best regards,
> >> > juan pablo
> >> >
> >> > On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <
> >> dirk.frederickx@gmail.com>
> >> > wrote:
> >> >
> >> > > Following additions to the tomcat/conf/web.xml fixed the problem.
> >> > > We probably need to make a note of this on the jspwiki docs (min
> >> > > requirement tomcat 8.5; + ...  )  ?
> >> > >
> >> > >         <init-param>
> >> > >           <param-name>compilerSourceVM</param-name>
> >> > >           <param-value>1.8</param-value>
> >> > >         </init-param>
> >> > >         <init-param>
> >> > >           <param-name>compilerTargetVM</param-name>
> >> > >           <param-value>1.8</param-value>
> >> > >         </init-param>
> >> > >
> >> > >
> >> > > dirk
> >> > >
> >> > > On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <
> >> > dirk.frederickx@gmail.com
> >> > > >
> >> > > wrote:
> >> > >
> >> > > > I'm getting following error after installing the latest version.
> It
> >> > > occurs when trying to edit a page.  Seems a problem with the latest
> >> > version
> >> > > of the EditorManager class.  Any clue?
> >> > > >
> >> > > > (running tomcat 8.5.37;  with jdk 1.8)
> >> > > >
> >> > > >
> >> > > > >>>>
> >> > > >
> >> > > > org.apache.jasper.JasperException: Unable to compile class for
> JSP:
> >> > > >
> >> > > > An error occurred at line: [72] in the jsp file: [/Edit.jsp]
> >> > > > References to interface static methods are allowed only at source
> >> level
> >> > > 1.8 or above
> >> > > >
> >> > > > 69:     String edit    = request.getParameter("edit");
> >> > > > 70:     String author  = TextUtil.replaceEntities( findParam(
> >> > > pageContext, "author" ) );
> >> > > > 71:     String changenote = findParam( pageContext, "changenote"
> );
> >> > > > 72:     String text    = EditorManager.getEditedText( pageContext
> );
> >> > > > 73:     String link    = TextUtil.replaceEntities( findParam(
> >> > > pageContext, "link") );
> >> > > > 74:     String spamhash = findParam( pageContext,
> >> > > SpamFilter.getHashFieldName(request) );
> >> > > > 75:     String captcha = (String)session.getAttribute("captcha");
> >> > > >
> >> > > >
> >> > > >
> >> > > > dirk
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
>

Re: Error on latest 2.11.0-M7-git-10

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

pushed the changes with last commit, now both maven cargo plugin and
portable binaries use a tomcat 9.x
server. I've also updated
https://jspwiki-wiki.apache.org/Wiki.jsp?page=Getting%20Started#section-Getting+Started-Requirements
to note that tomcat 9.x is recommended, although tomcat 8.x is supported
(any editing to make it clearer are welcome)


best regards,
juan pablo

On Thu, Mar 5, 2020 at 5:39 PM Juan Pablo Santos Rodríguez <
juanpablo.santos@gmail.com> wrote:

> Hi Dirk,
>
> ok, I'll proceed with the mentioned changes.
>
> re. integration tests, Selenium based tests had a number of problems:
> - they were very brittle, hard to mantain and hard to reuse
> - they were targetted for the 210 template, so when changing the default
> to the haddock template they became obsolete
> - making them work with the haddock template meant completely rewriting
> them
> - some of the tests were incomplete / commented out
>
> Given that, https://issues.apache.org/jira/browse/JSPWIKI-1086 was
> created to rewrite the functional tests infrastructure
> using Selenide, which is a java based framework which greatly simplifies
> the use of Selenium (see [#1] for an example),
> which makes functional tests very easy to write and maintain.
>
> The integration tests remain to be written, though, and right now there
> are only a couple of them. Old selenium tests are
> being kept for reference but I suppose one day they'll go away..
>
>
> best regards,
> juan pablo
>
> [#1]:
> https://github.com/apache/jspwiki/blob/master/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java#L38
>
>
> On Thu, Mar 5, 2020 at 4:27 PM Dirk Frederickx <di...@gmail.com>
> wrote:
>
>> Juan,
>>
>> Indeed,  it is strange that the default on TOMCAT 8.x is the compile the
>> JSP with 1.7.
>> Anyway, ok to move the recommendation up to TOMCAT 9.X ;  possillbly
>> adding
>> the information on the extra config lines needed to run jspwiki on TOMCAT
>> 8.x.
>>
>> It took some time to diagnose, as indeed all tests were running
>> successfully.
>> I was not aware that we have no page-edit yet in the integration tests  ?
>>
>>
>> dirk
>>
>>
>> On Thu, Mar 5, 2020 at 1:50 PM Juan Pablo Santos Rodríguez <
>> juanpablo.santos@gmail.com> wrote:
>>
>> > Hi Dirk,
>> >
>> > also running with JDK-8, and ran into the same problem. Seems extremely
>> > weird to me, as we're enforcing/building/running with JDK-8,
>> > but according to https://stackoverflow.com/a/47461590 it's the expected
>> > behaviour: tomcat 8 by default uses JDK-7 level to compile and
>> > run the JSPs (tomcat 9 uses JDK-8 for the same thing).
>> >
>> > Our README.md file simply states that the following prerequisites are
>> > needed (textually):
>> >
>> > - A JSP engine that supports Servlet API 3.1.  We recommend Tomcat from
>> > http://tomcat.apache.org/ for a really easy installation.
>> >   Tomcat 8.x or later is supported.
>> >
>> > - JDK 8+
>> >
>> > I'd rather update that doc to state that Tomcat 9 is recommended,
>> although
>> > Tomcat 8 is supported, with a link to a new entry to
>> >
>> >
>> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki
>> > describing how to run JSPWiki
>> > with Tomcat 8.x.
>> >
>> > That way the expected installation should be as smooth as ever.. We
>> should
>> > also update the cargo maven plugin configuration to use
>> > tomcat 9, but that should be trivial.
>> >
>> > Thoughts?
>> >
>> > Also related to this, I ran the integration tests before last push
>> (there
>> > were a lot of changes), and they were ok, as they right now just
>> > perform a login / logout + an anonymous view test. I still have pending
>> > adding an integration test to verify a page edit which would have caught
>> > this problem on the first place :-/
>> >
>> >
>> > best regards,
>> > juan pablo
>> >
>> > On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <
>> dirk.frederickx@gmail.com>
>> > wrote:
>> >
>> > > Following additions to the tomcat/conf/web.xml fixed the problem.
>> > > We probably need to make a note of this on the jspwiki docs (min
>> > > requirement tomcat 8.5; + ...  )  ?
>> > >
>> > >         <init-param>
>> > >           <param-name>compilerSourceVM</param-name>
>> > >           <param-value>1.8</param-value>
>> > >         </init-param>
>> > >         <init-param>
>> > >           <param-name>compilerTargetVM</param-name>
>> > >           <param-value>1.8</param-value>
>> > >         </init-param>
>> > >
>> > >
>> > > dirk
>> > >
>> > > On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <
>> > dirk.frederickx@gmail.com
>> > > >
>> > > wrote:
>> > >
>> > > > I'm getting following error after installing the latest version. It
>> > > occurs when trying to edit a page.  Seems a problem with the latest
>> > version
>> > > of the EditorManager class.  Any clue?
>> > > >
>> > > > (running tomcat 8.5.37;  with jdk 1.8)
>> > > >
>> > > >
>> > > > >>>>
>> > > >
>> > > > org.apache.jasper.JasperException: Unable to compile class for JSP:
>> > > >
>> > > > An error occurred at line: [72] in the jsp file: [/Edit.jsp]
>> > > > References to interface static methods are allowed only at source
>> level
>> > > 1.8 or above
>> > > >
>> > > > 69:     String edit    = request.getParameter("edit");
>> > > > 70:     String author  = TextUtil.replaceEntities( findParam(
>> > > pageContext, "author" ) );
>> > > > 71:     String changenote = findParam( pageContext, "changenote" );
>> > > > 72:     String text    = EditorManager.getEditedText( pageContext );
>> > > > 73:     String link    = TextUtil.replaceEntities( findParam(
>> > > pageContext, "link") );
>> > > > 74:     String spamhash = findParam( pageContext,
>> > > SpamFilter.getHashFieldName(request) );
>> > > > 75:     String captcha = (String)session.getAttribute("captcha");
>> > > >
>> > > >
>> > > >
>> > > > dirk
>> > > >
>> > > >
>> > >
>> >
>>
>

Re: Error on latest 2.11.0-M7-git-10

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

ok, I'll proceed with the mentioned changes.

re. integration tests, Selenium based tests had a number of problems:
- they were very brittle, hard to mantain and hard to reuse
- they were targetted for the 210 template, so when changing the default to
the haddock template they became obsolete
- making them work with the haddock template meant completely rewriting them
- some of the tests were incomplete / commented out

Given that, https://issues.apache.org/jira/browse/JSPWIKI-1086 was created
to rewrite the functional tests infrastructure
using Selenide, which is a java based framework which greatly simplifies
the use of Selenium (see [#1] for an example),
which makes functional tests very easy to write and maintain.

The integration tests remain to be written, though, and right now there are
only a couple of them. Old selenium tests are
being kept for reference but I suppose one day they'll go away..


best regards,
juan pablo

[#1]:
https://github.com/apache/jspwiki/blob/master/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java#L38


On Thu, Mar 5, 2020 at 4:27 PM Dirk Frederickx <di...@gmail.com>
wrote:

> Juan,
>
> Indeed,  it is strange that the default on TOMCAT 8.x is the compile the
> JSP with 1.7.
> Anyway, ok to move the recommendation up to TOMCAT 9.X ;  possillbly adding
> the information on the extra config lines needed to run jspwiki on TOMCAT
> 8.x.
>
> It took some time to diagnose, as indeed all tests were running
> successfully.
> I was not aware that we have no page-edit yet in the integration tests  ?
>
>
> dirk
>
>
> On Thu, Mar 5, 2020 at 1:50 PM Juan Pablo Santos Rodríguez <
> juanpablo.santos@gmail.com> wrote:
>
> > Hi Dirk,
> >
> > also running with JDK-8, and ran into the same problem. Seems extremely
> > weird to me, as we're enforcing/building/running with JDK-8,
> > but according to https://stackoverflow.com/a/47461590 it's the expected
> > behaviour: tomcat 8 by default uses JDK-7 level to compile and
> > run the JSPs (tomcat 9 uses JDK-8 for the same thing).
> >
> > Our README.md file simply states that the following prerequisites are
> > needed (textually):
> >
> > - A JSP engine that supports Servlet API 3.1.  We recommend Tomcat from
> > http://tomcat.apache.org/ for a really easy installation.
> >   Tomcat 8.x or later is supported.
> >
> > - JDK 8+
> >
> > I'd rather update that doc to state that Tomcat 9 is recommended,
> although
> > Tomcat 8 is supported, with a link to a new entry to
> >
> >
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki
> > describing how to run JSPWiki
> > with Tomcat 8.x.
> >
> > That way the expected installation should be as smooth as ever.. We
> should
> > also update the cargo maven plugin configuration to use
> > tomcat 9, but that should be trivial.
> >
> > Thoughts?
> >
> > Also related to this, I ran the integration tests before last push (there
> > were a lot of changes), and they were ok, as they right now just
> > perform a login / logout + an anonymous view test. I still have pending
> > adding an integration test to verify a page edit which would have caught
> > this problem on the first place :-/
> >
> >
> > best regards,
> > juan pablo
> >
> > On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <
> dirk.frederickx@gmail.com>
> > wrote:
> >
> > > Following additions to the tomcat/conf/web.xml fixed the problem.
> > > We probably need to make a note of this on the jspwiki docs (min
> > > requirement tomcat 8.5; + ...  )  ?
> > >
> > >         <init-param>
> > >           <param-name>compilerSourceVM</param-name>
> > >           <param-value>1.8</param-value>
> > >         </init-param>
> > >         <init-param>
> > >           <param-name>compilerTargetVM</param-name>
> > >           <param-value>1.8</param-value>
> > >         </init-param>
> > >
> > >
> > > dirk
> > >
> > > On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <
> > dirk.frederickx@gmail.com
> > > >
> > > wrote:
> > >
> > > > I'm getting following error after installing the latest version. It
> > > occurs when trying to edit a page.  Seems a problem with the latest
> > version
> > > of the EditorManager class.  Any clue?
> > > >
> > > > (running tomcat 8.5.37;  with jdk 1.8)
> > > >
> > > >
> > > > >>>>
> > > >
> > > > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > > >
> > > > An error occurred at line: [72] in the jsp file: [/Edit.jsp]
> > > > References to interface static methods are allowed only at source
> level
> > > 1.8 or above
> > > >
> > > > 69:     String edit    = request.getParameter("edit");
> > > > 70:     String author  = TextUtil.replaceEntities( findParam(
> > > pageContext, "author" ) );
> > > > 71:     String changenote = findParam( pageContext, "changenote" );
> > > > 72:     String text    = EditorManager.getEditedText( pageContext );
> > > > 73:     String link    = TextUtil.replaceEntities( findParam(
> > > pageContext, "link") );
> > > > 74:     String spamhash = findParam( pageContext,
> > > SpamFilter.getHashFieldName(request) );
> > > > 75:     String captcha = (String)session.getAttribute("captcha");
> > > >
> > > >
> > > >
> > > > dirk
> > > >
> > > >
> > >
> >
>

Re: Error on latest 2.11.0-M7-git-10

Posted by Dirk Frederickx <di...@gmail.com>.
Juan,

Indeed,  it is strange that the default on TOMCAT 8.x is the compile the
JSP with 1.7.
Anyway, ok to move the recommendation up to TOMCAT 9.X ;  possillbly adding
the information on the extra config lines needed to run jspwiki on TOMCAT
8.x.

It took some time to diagnose, as indeed all tests were running
successfully.
I was not aware that we have no page-edit yet in the integration tests  ?


dirk


On Thu, Mar 5, 2020 at 1:50 PM Juan Pablo Santos Rodríguez <
juanpablo.santos@gmail.com> wrote:

> Hi Dirk,
>
> also running with JDK-8, and ran into the same problem. Seems extremely
> weird to me, as we're enforcing/building/running with JDK-8,
> but according to https://stackoverflow.com/a/47461590 it's the expected
> behaviour: tomcat 8 by default uses JDK-7 level to compile and
> run the JSPs (tomcat 9 uses JDK-8 for the same thing).
>
> Our README.md file simply states that the following prerequisites are
> needed (textually):
>
> - A JSP engine that supports Servlet API 3.1.  We recommend Tomcat from
> http://tomcat.apache.org/ for a really easy installation.
>   Tomcat 8.x or later is supported.
>
> - JDK 8+
>
> I'd rather update that doc to state that Tomcat 9 is recommended, although
> Tomcat 8 is supported, with a link to a new entry to
>
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki
> describing how to run JSPWiki
> with Tomcat 8.x.
>
> That way the expected installation should be as smooth as ever.. We should
> also update the cargo maven plugin configuration to use
> tomcat 9, but that should be trivial.
>
> Thoughts?
>
> Also related to this, I ran the integration tests before last push (there
> were a lot of changes), and they were ok, as they right now just
> perform a login / logout + an anonymous view test. I still have pending
> adding an integration test to verify a page edit which would have caught
> this problem on the first place :-/
>
>
> best regards,
> juan pablo
>
> On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <di...@gmail.com>
> wrote:
>
> > Following additions to the tomcat/conf/web.xml fixed the problem.
> > We probably need to make a note of this on the jspwiki docs (min
> > requirement tomcat 8.5; + ...  )  ?
> >
> >         <init-param>
> >           <param-name>compilerSourceVM</param-name>
> >           <param-value>1.8</param-value>
> >         </init-param>
> >         <init-param>
> >           <param-name>compilerTargetVM</param-name>
> >           <param-value>1.8</param-value>
> >         </init-param>
> >
> >
> > dirk
> >
> > On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <
> dirk.frederickx@gmail.com
> > >
> > wrote:
> >
> > > I'm getting following error after installing the latest version. It
> > occurs when trying to edit a page.  Seems a problem with the latest
> version
> > of the EditorManager class.  Any clue?
> > >
> > > (running tomcat 8.5.37;  with jdk 1.8)
> > >
> > >
> > > >>>>
> > >
> > > org.apache.jasper.JasperException: Unable to compile class for JSP:
> > >
> > > An error occurred at line: [72] in the jsp file: [/Edit.jsp]
> > > References to interface static methods are allowed only at source level
> > 1.8 or above
> > >
> > > 69:     String edit    = request.getParameter("edit");
> > > 70:     String author  = TextUtil.replaceEntities( findParam(
> > pageContext, "author" ) );
> > > 71:     String changenote = findParam( pageContext, "changenote" );
> > > 72:     String text    = EditorManager.getEditedText( pageContext );
> > > 73:     String link    = TextUtil.replaceEntities( findParam(
> > pageContext, "link") );
> > > 74:     String spamhash = findParam( pageContext,
> > SpamFilter.getHashFieldName(request) );
> > > 75:     String captcha = (String)session.getAttribute("captcha");
> > >
> > >
> > >
> > > dirk
> > >
> > >
> >
>

Re: Error on latest 2.11.0-M7-git-10

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

also running with JDK-8, and ran into the same problem. Seems extremely
weird to me, as we're enforcing/building/running with JDK-8,
but according to https://stackoverflow.com/a/47461590 it's the expected
behaviour: tomcat 8 by default uses JDK-7 level to compile and
run the JSPs (tomcat 9 uses JDK-8 for the same thing).

Our README.md file simply states that the following prerequisites are
needed (textually):

- A JSP engine that supports Servlet API 3.1.  We recommend Tomcat from
http://tomcat.apache.org/ for a really easy installation.
  Tomcat 8.x or later is supported.

- JDK 8+

I'd rather update that doc to state that Tomcat 9 is recommended, although
Tomcat 8 is supported, with a link to a new entry to
https://jspwiki-wiki.apache.org/Wiki.jsp?page=Common%20problems%20when%20building%20JSPWiki
describing how to run JSPWiki
with Tomcat 8.x.

That way the expected installation should be as smooth as ever.. We should
also update the cargo maven plugin configuration to use
tomcat 9, but that should be trivial.

Thoughts?

Also related to this, I ran the integration tests before last push (there
were a lot of changes), and they were ok, as they right now just
perform a login / logout + an anonymous view test. I still have pending
adding an integration test to verify a page edit which would have caught
this problem on the first place :-/


best regards,
juan pablo

On Thu, Mar 5, 2020 at 1:22 PM Dirk Frederickx <di...@gmail.com>
wrote:

> Following additions to the tomcat/conf/web.xml fixed the problem.
> We probably need to make a note of this on the jspwiki docs (min
> requirement tomcat 8.5; + ...  )  ?
>
>         <init-param>
>           <param-name>compilerSourceVM</param-name>
>           <param-value>1.8</param-value>
>         </init-param>
>         <init-param>
>           <param-name>compilerTargetVM</param-name>
>           <param-value>1.8</param-value>
>         </init-param>
>
>
> dirk
>
> On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <dirk.frederickx@gmail.com
> >
> wrote:
>
> > I'm getting following error after installing the latest version. It
> occurs when trying to edit a page.  Seems a problem with the latest version
> of the EditorManager class.  Any clue?
> >
> > (running tomcat 8.5.37;  with jdk 1.8)
> >
> >
> > >>>>
> >
> > org.apache.jasper.JasperException: Unable to compile class for JSP:
> >
> > An error occurred at line: [72] in the jsp file: [/Edit.jsp]
> > References to interface static methods are allowed only at source level
> 1.8 or above
> >
> > 69:     String edit    = request.getParameter("edit");
> > 70:     String author  = TextUtil.replaceEntities( findParam(
> pageContext, "author" ) );
> > 71:     String changenote = findParam( pageContext, "changenote" );
> > 72:     String text    = EditorManager.getEditedText( pageContext );
> > 73:     String link    = TextUtil.replaceEntities( findParam(
> pageContext, "link") );
> > 74:     String spamhash = findParam( pageContext,
> SpamFilter.getHashFieldName(request) );
> > 75:     String captcha = (String)session.getAttribute("captcha");
> >
> >
> >
> > dirk
> >
> >
>

Re: Error on latest 2.11.0-M7-git-10

Posted by Dirk Frederickx <di...@gmail.com>.
Following additions to the tomcat/conf/web.xml fixed the problem.
We probably need to make a note of this on the jspwiki docs (min
requirement tomcat 8.5; + ...  )  ?

        <init-param>
          <param-name>compilerSourceVM</param-name>
          <param-value>1.8</param-value>
        </init-param>
        <init-param>
          <param-name>compilerTargetVM</param-name>
          <param-value>1.8</param-value>
        </init-param>


dirk

On Wed, Mar 4, 2020 at 10:38 PM Dirk Frederickx <di...@gmail.com>
wrote:

> I'm getting following error after installing the latest version. It occurs when trying to edit a page.  Seems a problem with the latest version of the EditorManager class.  Any clue?
>
> (running tomcat 8.5.37;  with jdk 1.8)
>
>
> >>>>
>
> org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> An error occurred at line: [72] in the jsp file: [/Edit.jsp]
> References to interface static methods are allowed only at source level 1.8 or above
>
> 69:     String edit    = request.getParameter("edit");
> 70:     String author  = TextUtil.replaceEntities( findParam( pageContext, "author" ) );
> 71:     String changenote = findParam( pageContext, "changenote" );
> 72:     String text    = EditorManager.getEditedText( pageContext );
> 73:     String link    = TextUtil.replaceEntities( findParam( pageContext, "link") );
> 74:     String spamhash = findParam( pageContext, SpamFilter.getHashFieldName(request) );
> 75:     String captcha = (String)session.getAttribute("captcha");
>
>
>
> dirk
>
>