October 26, 2011

err.PersistenceServiceResourceProvider error in logs

I keep getting these errors in the log:

26.10.2011 09:04:09 HTTP JVM: !err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor!. For more detailed information, please consult error-log-0.xml located in D:/IBM/Lotus/Domino/data/domino/workspace/logs
26.10.2011 09:04:09 HTTP JVM: !err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor!. For more detailed information, please consult error-log-0.xml located in D:/IBM/Lotus/Domino/data/domino/workspace/logs
26.10.2011 09:04:09 HTTP JVM: !err.PersistenceServiceResourceProvider.Errorwritingtopersistedcontenttor!. For more detailed information, please consult error-log-0.xml located in D:/IBM/Lotus/Domino/data/domino/workspace/logs

Does anyone have a clue what is causing them ? Detailed logs wont give me any more specifics..

October 4, 2011

HTTP JVM: CLFAD0134E: Exception processing XPage request

On our server we keep getting these "informal" errors.. When I consult the error logs they are equally "informal". Since there is quite a large number of XPages and bases, it is not trivial to start commenting out code etc to know where the error is occurring...
Does anybody know WHY,WHAT and WHERE this error occurs? Getting really frustrated with this now..


HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression
HTTP JVM: CLFAD0134E: Exception processing XPage request. For more detailed information, please consult error-log-0.xml located in D:/IBM/Lotus/Domino/data/domino/workspace/logs

FROM error-log-0:
View log here

September 21, 2011

Can't find resource for bundle java.util.PropertyResourceBundle

I have browsed google several times, but I cant find a solution to the problem. First I found some posts regarding Agents not having read/write access to .jar files but none of my agents are reading in the .jar files located in this base.

Im having problems with this error I keep on receiving:

Can't find resource for bundle java.util.PropertyResourceBundle, key connect_not_allowed Nested exception: Can't find resource for bundle java.util.PropertyResourceBundle, key connect_not_allowed org.dom4j.io.SAXReader.read(SAXReader.java:484)
org.dom4j.io.SAXReader.read(SAXReader.java:291)
com.eoffice.xml.RSSReader.getLimitedRSS(RSSReader.java:25)
sun.reflect.GeneratedMethodAccessor1026.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
java.lang.reflect.Method.invoke(Method.java:600)
com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321)
com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
com.ibm.jscript.ASTTree.ASTReturn.interpret(ASTReturn.java:49)
com.ibm.jscript.std.FunctionObject._executeFunction(FunctionObject.java:261)
com.ibm.jscript.std.FunctionObject.executeFunction(FunctionObject.java:185)
com.ibm.jscript.std.FunctionObject.call(FunctionObject.java:171)
com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
com.ibm.jscript.ASTTree.ASTReturn.interpret(ASTReturn.java:49)
com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
java.security.AccessController.doPrivileged(AccessController.java:284)
com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:220)
com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:192)
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78)
javax.faces.component.UIOutput.getValue(UIOutput.java:159)
com.ibm.xsp.util.FacesUtil.convertValue(FacesUtil.java:1073)
com.ibm.xsp.renderkit.html_basic.OutputTextRenderer.encodeEnd(OutputTextRenderer.java:91)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:153)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:809)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1287)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1225)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:635)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:355)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:197)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:193)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:154)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:86)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:538)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1151)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:803)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:758)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:527)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1135)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:523)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:352)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:304)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:261)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:291)

July 6, 2011

SessionID parameter at end of URL

Sometimes links on my xpages gets the SessionID parameter appended at the end:
http://somepage.com/somebase.nsf/id/myWordDocument.doc?SessionID=CVX3WR

I read on this page some comments regarding the SessionID parameter.

Q. Sometimes when XPage is submitted it adds SessionID to the URL and some JavaScript stops working. What's that SessionID?

This is due to the way HTTP is working. HTTP is stateless so the browser must pass an ID to the server in order to keep a session open on the server. There are two ways for passing this ID.

1- Passing the ID as part of the URL
2 - Passing the ID as part of the cookie from the browser

The second way is the preferred way. But for the first page the XPages engine doesn't know if the browser that is connecting to the page is supporting cookies or not, so it tries first by passing an ID and a cookie. And on the second request it looks for the cookie, and if the cookie is there it removes the ID from the URL. So if you look at all the application servers they are all working like that. Now there is a property in XPages that says 'assume that the client has cookie', and in these cases do not use a session ID at all. So that would break some browsers that do not support having cookies enabled.


What im looking for is the 'assume that the client has cookie' property. Where is it located, or are there any other ways to turn off this SessionID ?

XPages / Notes < font > tags

XPages and/or Notes keep on adding tags < font > EVERYWHERE I use Rich Text fields.. Is there any way I can tell Notes/Xpages NOT to add these?

April 27, 2011

Recommended Reading: Mastering XPages


Back in January me and Rasmus attended Lotusphere 2011 in Orlando. In one of the many sessions the book "Mastering XPages" by Donnely,Wallace and McGuckin was mentioned as a good source of information and training.

So far our only training in XPages has been browsing numerous tutorials and blogs to try to get a grip of it. This book is actually the first book available regarding XPages and Notes(!).

After reading a good portion of the book I can happily recommend it to anyone wanting/needing to learn XPages. It gives a nice and simple introduction and also provides a lot of "real-world" examples. The structure of the book is nice and the material is presented in a logical order.

Available at Amazon.com

March 24, 2011

Error: Saving this document will change its format

I have an XPage that is used for editing news. Those news may be created from the Notes client and contain some Rich Text fields.

When editing the news I get an error like this:


Saying: Saving this document will change its format from native Notes rich text to HTML. This may cause a change or loss of formatting if opened again in the regular Notes client.

What "damage" might this inflict? And are there any way to avoid this smoothly?

March 10, 2011

Debugging tip: insertNotesClientLinks852

Today I got this fairly unknown error when trying to access a document with a XPage.

The runtime has encountered an unexpected error.

Error source
Page Name:/myXpage.xsp


Exception

java.lang.StringIndexOutOfBoundsException
java.lang.String.substring(String.java:1092)
com.ibm.xsp.model.domino.wrapped.DominoRichTextItem.insertNotesClientLinks852(DominoRichTextItem.java:387)


After doing a quick search on google I found a post on the IBM forums claiming this had to do with bad HTML markup within a Rich Text field.

Unfortunately this particular Document had tons of HTML, so it took some time narrowing it down. After some 30 mins I discovered the error was caused by a anchor tag where the href attribute was missing a " at the start...

Anyways.. problem solved!

March 9, 2011

Debugging tip:Error while executing JavaScript action expression

Occationally we stumble upon some "weird" errors on our xpages. Below is one such error:

Runtime Error

Error source

Page Name:/someXPage.xsp

Exception

Error while executing JavaScript action expression
Script interpreter error, line=385, col=20: 'someJavaScriptMethod()' is undefined and cannot be accessed as an array
at [/someJavaScriptFile.js].methodOne()
at [/someJavaScriptFile.js].methodTwo()
at [/someJavaScriptFile.js].methodThree()

In this specific example it is indeed possible to access the method as an array. The clue here is someJavaScriptMethod(), with no parameters. In my code, line 385(correctly pointed out), the methodcall has several parameters. When the exception is displayed as this, it usually means that at least one of the input parameters is null. This should narrow your scope when searching for the error!

Happy debugging!

March 1, 2011

Solved:Display picture from Rich Text Field with XPages


Im having a Form where I have a Rich Text Field(lets call it imageField) added there to hold an image. The user of the Form will directly copy an image into the imageField , not the location of the image, THE image will be copied into the field.

When I then later try to display this image on a Xpage nothing comes up..

Google wont help me with this particular problem either. Anyone out there know how to do this?

SOLVED:
As Ben over at My Comfy Chair pointed out this is in fact quite easy to solve.

Start by making the Rich Text Field save as HTML and MIME. After that you simply refer to the field in the src part of the img tag:
src=\"myView/"+itemInView.getDocument()+"/FieldName/M2?OpenElement"

Worked like a charm for me! Thanks alot Ben!

February 28, 2011

XPages:RedirectSignal - found the issue

A while back Rasmus reported an error constantly appearing in the logfiles on our servers. Read the entry here: http://devxpages.blogspot.com/2010/10/http-jvm-comibmxspaclredirectsignal.html

As written then, noone seemed to know why the RedirectSignal message appeared in the logs. Finally we have figured out whats the source of this weird and "unknown" message.

In some of our XPages files, xsp, we use a function context.redirectToPage() to forward the user to the desired page. A code example:


if (someCondition) {
return context.redirectToPage("myXpage1",false);
} else {
return context.redirectToPage("myXpage2",false);
}

Removing this code seems to solve the problem.. Finally!