Home » Domino Appdev » Using LanguageWare with Lotus Notes

Using LanguageWare with Lotus Notes

I had meant to finish this a long time ago, but I remembered how annoying it is to do video recording, so I might ramble on a bit (It’s no notes in 9!).

So this demo will give a very brief overview of how you can create a personalised live text/analysis system in XPages using UIMA. It demonstrates using Languageware, which takes a lot of the pain out of working with UIMA. We quickly create a names dictionary of over 5,000 first names, then teach it how to understand a full name.

[edit] I redid the video so it is more watchable now.

6 thoughts on “Using LanguageWare with Lotus Notes

  1. Hi Simon.
    Thanks for your video, before you post it i have no idea how to use UIMA pears in Lotus Notes. I try to do a same project like in your video.
    As far as I understood Example.nsf database shoud be placed on Domino server.
    On client it doesnt lunch. I put database on Domino server and installed Example.pear in domino\data directory.
    In browser I lunch Example.nsf but got an error http://oi48.tinypic.com/35ksi15.jpg
    Thanks for help.

  2. Hi, Your Example.nsf can be on the client or on a server. However depending on where the code executes, the UIMA jars will need to go into the lib\ext folder of the client or server.

    When you open an XPage in the Notes client, it will execute on the client. If you open in a browser, it will execute on the server.

    The Example.pear file needs to be installed using the UIMA runPearInstaller program. You can’t use the pear directly.

    Your error means something went wrong in the Agent, so I would recommend put some debug there.

    I’ll check to see what I can do about releasing the sample I used to make the video.

  3. Hi Simon.
    Thanks for reply.
    Thomething happend with my local database. It start to corrctly show main Xpage with inputs. But now I’ve got an error “Error 500 Unexpected error condition”.
    I installed pear file in notes\data directory in folder “pears”. And added all library in lib/ext folder.
    I will try to debud.
    Thanks.

  4. My @Stack trace@.

    javax.faces.FacesException: Error while executing JavaScript action expression
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    com.ibm.xsp.controller.FacesControllerImpl.execute(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
    com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression
    com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(Unknown Source)
    com.ibm.xsp.application.ActionListenerImpl.processAction(Unknown Source)
    javax.faces.component.UICommand.broadcast(Unknown Source)
    com.ibm.xsp.component.UIEventHandler.broadcast(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.broadcast(Unknown Source)
    javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
    javax.faces.component.UIViewRoot.processApplication(Unknown Source)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    com.ibm.xsp.controller.FacesControllerImpl.execute(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
    com.ibm.jscript.InterpretException: Script interpreter error, line=8, col=15: [TypeError] Exception occurred calling method NotesAgent.runWithDocumentContext(lotus.domino.local.Document)
    null
    com.ibm.xsp.script.WrapperDomino$fct_Agent.call(Unknown Source)
    com.ibm.jscript.types.FBSObject.call(Unknown Source)
    com.ibm.jscript.ASTTree.ASTCall.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTBlock.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTIf.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTProgram.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTProgram.interpretEx(Unknown Source)
    com.ibm.jscript.JSExpression._interpretExpression(Unknown Source)
    com.ibm.jscript.JSExpression.access$1(Unknown Source)
    com.ibm.jscript.JSExpression$2.run(Unknown Source)
    java.security.AccessController.doPrivileged(Unknown Source)
    com.ibm.jscript.JSExpression.interpretExpression(Unknown Source)
    com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
    com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
    com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(Unknown Source)
    com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(Unknown Source)
    com.ibm.xsp.application.ActionListenerImpl.processAction(Unknown Source)
    javax.faces.component.UICommand.broadcast(Unknown Source)
    com.ibm.xsp.component.UIEventHandler.broadcast(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.broadcast(Unknown Source)
    javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
    javax.faces.component.UIViewRoot.processApplication(Unknown Source)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    com.ibm.xsp.controller.FacesControllerImpl.execute(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)
    NotesException: Could not execute macro:
    Unsupported trigger and search in the background or embedded agent
    lotus.domino.local.Agent.runWithDocumentContext(Unknown Source)
    com.ibm.xsp.script.DominoHelper$5.run(Unknown Source)
    java.security.AccessController.doPrivileged(Unknown Source)
    com.ibm.xsp.script.DominoHelper.runWithDocumentContext(Unknown Source)
    com.ibm.xsp.script.WrapperDomino$fct_Agent.call(Unknown Source)
    com.ibm.jscript.types.FBSObject.call(Unknown Source)
    com.ibm.jscript.ASTTree.ASTCall.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTBlock.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTIf.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTProgram.interpret(Unknown Source)
    com.ibm.jscript.ASTTree.ASTProgram.interpretEx(Unknown Source)
    com.ibm.jscript.JSExpression._interpretExpression(Unknown Source)
    com.ibm.jscript.JSExpression.access$1(Unknown Source)
    com.ibm.jscript.JSExpression$2.run(Unknown Source)
    java.security.AccessController.doPrivileged(Unknown Source)
    com.ibm.jscript.JSExpression.interpretExpression(Unknown Source)
    com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
    com.ibm.jscript.JSExpression.evaluateValue(Unknown Source)
    com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(Unknown Source)
    com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(Unknown Source)
    com.ibm.xsp.application.ActionListenerImpl.processAction(Unknown Source)
    javax.faces.component.UICommand.broadcast(Unknown Source)
    com.ibm.xsp.component.UIEventHandler.broadcast(Unknown Source)
    com.ibm.xsp.component.UIViewRootEx.broadcast(Unknown Source)
    javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
    javax.faces.component.UIViewRoot.processApplication(Unknown Source)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    com.ibm.xsp.controller.FacesControllerImpl.execute(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(Unknown Source)
    com.ibm.xsp.webapp.FacesServlet.service(Unknown Source)
    com.ibm.xsp.webapp.FacesServletEx.service(Unknown Source)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(Unknown Source)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService.access$0(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceRequest.call(Unknown Source)
    java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    java.util.concurrent.FutureTask.run(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    java.lang.Thread.run(Unknown Source)
    com.ibm.domino.xsp.module.nsf.NSFService$NsfServiceThread.run(Unknown Source)

  5. So the related part of that error stack is this:

    NotesException: Could not execute macro:
    Unsupported trigger and search in the background or embedded agent

    In your agent make sure you have set it to either “Action Menu” or “Scheduled Never”, also set the Target to “None”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s