Page 1 of 1

Trouble with Lotus Domino XPages

PostPosted: Thu May 24, 2012 7:33 am
by JoergAlthoff
Hello All,

I try to implement docx4j 2.7.1 in an Lotus Domino 8.5.3 Xpages Environment. On Windows 32-Bit with Java 1.6 Runtime.

If I try to create a Package with
Code: Select all
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();

I get an Exception. It seems, that the Class org.docx4j.jaxb.Context gets an uncaught Exception during the class loading process.

It seems further, that this exception occurs during this statement in org.docx4j.jaxb.Context.java on line 71

Code: Select all
         // JBOSS might use a different class loader to load JAXBContext, which causes problems,
         // so explicitly specify our class loader.
         Context tmp = new Context();


But maybe I'm completely wrong. Please Help.

Thx in advance for any advice
Joerg


Here comes the Stacktrace
java.lang.NoClassDefFoundError: org.docx4j.jaxb.Context (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at org.docx4j.openpackaging.parts.JaxbXmlPart.<init>(JaxbXmlPart.java:79)
at org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart.&lt;init&gt;(MainDocumentPart.java:97)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:426)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:415)
at de.krzn.esuite.ooxml.Controller.buttonCreateSimpleDocClicked(Controller.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321)
at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:221)
at com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:111)
at com.ibm.xsp.application.ActionListenerImpl.processAction(ActionListenerImpl.java:60)
at javax.faces.component.UICommand.broadcast(UICommand.java:324)
at com.ibm.xsp.component.UIEventHandler.broadcast(UIEventHandler.java:366)
at com.ibm.xsp.component.UIViewRootEx.broadcast(UIViewRootEx.java:1535)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:307)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:428)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:94)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)
at com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:223)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1267)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1251)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)

Re: Trouble with Lotus Domino XPages

PostPosted: Thu May 24, 2012 8:23 am
by jason
Is it IBM's Java or JAXB?

Different error, but see docx-java-f6/domino-illegalaccesserror-t982.html

He got it working on Domino. As did xlsx-java-f15/adding-data-to-an-existing-xlsx-file-t929.html

Re: Trouble with Lotus Domino XPages

PostPosted: Thu May 24, 2012 9:10 pm
by JoergAlthoff
Hi Jason,

thx for your fast response.

JRE:
Code: Select all
java.fullversion=JRE 1.6.0 IBM J9 2.4 Windows Server 2003 x86-32 jvmwi3260sr9-20110712_86792 (JIT enabled, AOT enabled)
J9VM - 20110712_086792
JIT  - r9_20101028_17488ifx19
GC   - 20101027_AA


VM-Arguments
Code: Select all
-Djavax.xml.bind.JAXBContext=com.sun.xml.internal.bind.v2.ContextFactory

Doesn't change anything

The Jar is placed in DOMINO\jvm\lib\ext and the java.poliy file shows:
// Standard extensions get all permissions by default
grant codeBase "file:${java.home}/lib/ext/*" {
permission java.security.AllPermission;
};

So I'm still clueless :?

Joerg

Re: Trouble with Lotus Domino XPages

PostPosted: Thu May 24, 2012 10:10 pm
by jason
If you are using the IBM JRE, I doubt you'll have the JAXB implementation in Sun's Java 6 (com.sun.xml.internal.bind.v2.ContextFactory).

Download the JAXB reference implementation, and configure things to use that.

Re: Trouble with Lotus Domino XPages

PostPosted: Fri May 25, 2012 12:06 am
by JoergAlthoff
Sorry,

i copied
activation.jar, jsr173_1.0_api.jar, jaxb-impl.jar, jaxb-api.jar
to lib/ext

i tried it with
-Djavax.xml.bind.JAXBContext=com.sun.xml.internal.bind.v2.ContextFactory

and
-Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory

and without -D

the error is always the same. :(

Is there anything else to configure?

Joerg

Re: Trouble with Lotus Domino XPages

PostPosted: Fri May 25, 2012 11:43 am
by jason
I don't use Domino, so there the limit to what I can suggest is based on general principles and Google.

I see it can be downloaded from http://www.ibm.com/developerworks/downloads/ls/lsds/ so I may give that a try later.

In the meantime, I suggest you try posting on StackOverflow (where you might find people who know Domino), using tags lotus-domino, domino, xpages, jaxb, docx4j.

Re: Trouble with Lotus Domino XPages

PostPosted: Fri May 25, 2012 4:56 pm
by JoergAlthoff
Hi Jason,

ok. I'll try that. Thanks for your efforts.

Joerg

Re: Trouble with Lotus Domino XPages

PostPosted: Tue Jun 05, 2012 1:10 pm
by jason