Code Macro Requirements

I’ve got the same situation on the ubuntu.

But I found a simple solution but a little dirty. I manually upgraded tomcat to version 8.0.38 (by downloading debs for debian from internet) and downgraded jython to version 2.7.0. Now everything is ok, macros are fully functional.

So nobody wants to try https://launchpad.net/~nacc/+archive/ubuntu/tomcat8v2 ? I’m sure they would be happy on https://bugs.launchpad.net/ubuntu/+source/tomcat8/+bug/1644144 to have to validation if it’s working well so that they can apply it :slight_smile:

Hi. My Solution (Ubuntu LTS 16.04 with xwiki on TomCat 8 MySQL DB via DEB) was to download latest Tomcat 8 Release (tar.gz) and overwrite existing TomCat installation (i know its dirty :wink: )

service tomcat8 stop 
tar xvfz apache-tomcat-8.0.48.tar.gz
cd apache-tomcat-8.0.48
cp * /var/lib/tomcat8/ -Rv
service tomcat8 start

you should do a snapshot or a copy of the tomcat8 directory

It works!!!

sudo add-apt-repository ppa:nacc/tomcat8v2
sudo apt-get update
sudo apt-get install tomcat8=8.0.32-1ubuntu1.3~ppa2
sudo apt-get install tomcat8-common=8.0.32-1ubuntu1.3~ppa2
sudo apt-get install libtomcat8-java=8.0.32-1ubuntu1.3~ppa2
sudo service tomcat8 restart

Thank a lot for your help, @tmortagne !

1 Like

Thanks for the testing @bjoerne :slight_smile:

I added a note in http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HTomcat.

Works only for code macro but python macro doesn’t

That’s weird since the code macro essentially do the same than the python macro (it’s executing a python script using the exact same code that the python macro to use Pygments behind the scene).

There is a bug in jython 2.7.1
Downgrading to 2.7.0 solves the problem. I’d like to try 2.7.2a1 but cannot find a standalone version.

@silver-alx any details related to the bug you are referring to ? I did not noticed much issue in the context of XWiki (but I’m not doing much python).

This one - http://bugs.jython.org/issue2632

Discussion with some details - https://github.com/jythontools/jython/issues/90

This looks very specific to CSV tool and the issue does not indicate it’s a regression only present in 2.7.1.

Anyway i’ve got this error and resolved it by downgrading ))

With XWiki 10.1 Tomcat 7 doesn’t seem to be an option any more. I used the instructions on DigitalOcean to install Tomcat 8.5.28 bypassing the Advanced Packaging Tool. Works fine for me.

Hmm indeed there seems to be an issue on Tomcat 7 because of el-api. We need to look at it since it’s not really expected…

Will release a 10.1.1 shortly with a fix.

I just got bit by this one. Ubuntu 16, Tomcat 8.

I followed the instructions bjoerne listed, namely

sudo add-apt-repository ppa:nacc/tomcat8v2
sudo apt-get update
sudo apt-get install tomcat8=8.0.32-1ubuntu1.3~ppa2
sudo apt-get install tomcat8-common=8.0.32-1ubuntu1.3~ppa2
sudo apt-get install libtomcat8-java=8.0.32-1ubuntu1.3~ppa2
sudo service tomcat8 restart

and ignored the errors about downgrading my tomcat installation.

I did not change my JAVA_OPTS line.

After one restart, it’s working correctly for me.

Does anyone know if this will this cause a problem with future tomcat8 updates?

Thanks for posting your solution.

Hmm indeed it’s the first time I notice the patched version has a lower version than the standard one. Looks like a few patches were applied after this one in the standard repository, really a pity this one was not included… Might help if as many people as possible click “This bug affects me” on https://bugs.launchpad.net/ubuntu/+source/tomcat8/+bug/1644144.

I’ve marked it as affecting me.

@Kido I deployed a 10.1+1 version of the Debian packages which should be fine with Tomcat 7.

Fine! … I’ve marked it as affecting me as well.