NullPointerException on opening OpenOffice config page

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException on opening OpenOffice config page

Roman Muntyanu
Hello,

  I receive this error when navigating to OpenOffice administration page:

Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [xwiki:XWiki.OfficeImporterAdmin]
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:195)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:152)
        at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:124)
        ... 99 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHomePath' in  class org.xwiki.officeimporter.openoffice.OpenOfficeConfigurationVelocityBridge threw exception java.lang.NullPointerException at xwiki:XWiki.OfficeImporterAdmin[line 75, column 15]
        at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:186)
        ... 101 more
Caused by: java.lang.NullPointerException
Looks like the problem is that 'ooconfig' is null when OO Admin Page is rendered
Line 75: <dd>$ooconfig.homePath</dd>
I also receive this error on startup
2011-11-23 16:56:20,871 [main] ERROR .o.i.DefaultObservationManager - Fail to send event [org.xwiki.observation.event.ApplicationStartedEvent@5ed711] to listener [org.xwiki.officeimporter.internal.openoffice.OpenOfficeManagerLifecycleListener@79a890]
java.lang.NullPointerException: null
        at org.xwiki.configuration.internal.CommonsConfigurationSource.getProperty(CommonsConfigurationSource.java:60) ~[xwiki-platform-configuration-default-3.2.jar:na]
        at org.xwiki.configuration.internal.CompositeConfigurationSource.getProperty(CompositeConfigurationSource.java:117) ~[xwiki-platform-configuration-default-3.2.jar:na]
        at org.xwiki.officeimporter.internal.openoffice.DefaultOpenOfficeConfiguration.getHomePath(DefaultOpenOfficeConfiguration.java:120) ~[xwiki-platform-office-importer-3.2.jar:na]
        at org.xwiki.officeimporter.internal.openoffice.DefaultOpenOfficeManager.initialize(DefaultOpenOfficeManager.java:113) ~[xwiki-platform-office-importer-3.2.jar:na]
        at org.xwiki.officeimporter.internal.openoffice.DefaultOpenOfficeManager.start(DefaultOpenOfficeManager.java:181) ~[xwiki-platform-office-importer-3.2.jar:na]
        at org.xwiki.officeimporter.internal.openoffice.OpenOfficeManagerLifecycleListener.startOpenOffice(OpenOfficeManagerLifecycleListener.java:107) ~[xwiki-platform-office-importer-3.2.jar:na]
        at org.xwiki.officeimporter.internal.openoffice.OpenOfficeManagerLifecycleListener.onEvent(OpenOfficeManagerLifecycleListener.java:94) ~[xwiki-platform-office-importer-3.2.jar:na]
        at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:263) [xwiki-commons-observation-local-3.2.jar:na]
        at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:232) [xwiki-commons-observation-local-3.2.jar:na]
        at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:280) [xwiki-commons-observation-local-3.2.jar:na]
        at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:74) [xwiki-platform-container-servlet-3.2.jar:na]
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) [catalina.jar:6.0.29]
        ......

My environment is
  XWiki 3.2 (incrementally upgraded from 2.2), Database upgraded
  OO was configured to run in internally-managed mode and it worked until this error at some point of time.

Any ideas what the problem could be, or how to resolve this?

Regards,
  Roman
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException on opening OpenOffice config page

Roman Muntyanu
The stack trace is similar to one in http://jira.xwiki.org/browse/XWIKI-7169 
But adding office.path
XWIKI_OPTS='-Doffice.path="/usr/lib/openoffice.org3/"'
JAVA_OPTS="$JAVA_OPTS -Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME -Xmx1738m -Xms1738m -XX:MaxPermSize=256m $XWIKI_OPTS"
did not help.
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException on opening OpenOffice config page

Roman Muntyanu
In reply to this post by Roman Muntyanu
Same issue after upgrade to 3.3
Any hints?
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException on opening OpenOffice config page

Roman Muntyanu
In reply to this post by Roman Muntyanu
Same issue after upgrading to 3.4.

I use following OO version
[user@host logs]# yum info openoffice.org-headless
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
Installed Packages
Name       : openoffice.org-headless
Arch       : i386
Epoch      : 1
Version    : 3.1.1
Release    : 19.5.el5_5.6
Size       : 2.1 M
Repo       : installed
Summary    : Headless plugin for openoffice.org
URL        : http://www.openoffice.org/
License    : LGPLv2 and LGPLv2+ and MPLv1.1 and BSD
Description: A plugin for openoffice.org that enables it to function without an X server.
           : It implements the -headless command line option and allows openoffice.org to be
           : used as a backend server for e.g. document conversion.
Autostart is set to "true" in configuration file + all the paths are correct because it worked before.

To double-check I have configured XWiki to work in externally managed mode and everything is fine. But I'd prefer the internally managed way for its convenience.

So, again if there are hints for troubleshooting the issue, I'd gladly hear them out.