Invalid Universal id

Thanks Steve Leland for help!:slight_smile: , I 've encountered a problem using domino tags .here is the snippets of my jsp

<%@ page contentType=“text/html; charset=GB2312” import=“java.util.*” %>

<%@ taglib uri=“domtags.tld” prefix=“domino” %>

<%@ taglib uri=“domutil.tld” prefix=“util” %>


<domino:session id=“mySession”>

<domino:form name=“person” unid=“671F92AAD1F75FD548256E4800506B5F” editmode=“edit” dbname=“bingle.nsf” user=“admin/duke” password=“password” schema=“test” debug=“true” onfailure=“exception” >

Server: <%=mySession.getServerName()%>

Platform: <%=mySession.getPlatform()%>

Domino Version: <%=mySession.getNotesVersion()%>

Name: <domino:input name=“UserName” />

Phone: <domino:input name=“Phone” />

<domino:deletedoc text=“Drop me” showdisabled=“false” onfailure=“exception”/>

</domino:form>

</domino:session>

The error message is :

NotesException(4091):Invalid Universal id

org.apache.jasper.JasperException

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)

at java.lang.Thread.run(Thread.java:536)

root cause

java.lang.NullPointerException

at lotus.domino.taglib.DominoCmd.getPageName(DominoCmd.java:17)

at lotus.domino.taglib.FormTag.getPageName(FormTag.java:463)

at lotus.domino.taglib.FormTag.getShortName(FormTag.java:63)

at lotus.domino.taglib.FormTag.release(FormTag.java:438)

at org.apache.jasper.runtime.TagHandlerPool.release(TagHandlerPool.java:138)

at org.apache.jsp.TestForm_jsp._jspDestroy(TestForm_jsp.java:36)

at org.apache.jasper.runtime.HttpJspBase.destroy(HttpJspBase.java:128)

at org.apache.jasper.servlet.JspServletWrapper.destroy(JspServletWrapper.java:260)

at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)

at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:440)

at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)

at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:471)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)

at java.lang.Thread.run(Thread.java:536)

many thanks!

Subject: Invalid Universal id

You are using a version of Tomcat that is 4.1 or greater, which does tag caching, also called tag pooling, by default. The Domino JSP tags can’t handle that until the 6.0.4/6.5.2 release which is now making its way through the release cycle. So you have to turn the tag pooling option off in Tomcat - from Apache Tomcat 4 - Jasper 2 JSP Engine How To :

"

The servlet which implements Jasper is configured using init parameters in your global $CATALINA_BASE/conf/web.xml.

enablePooling - Determines whether tag handler pooling is enabled. true or false, default true.

"

Just set it to false and restart your servlet container.

Hope That Helps!

Subject: RE: Invalid Universal id

Thanks Steve ,by the way I am wondering if I use Domino jsp tags to upload attachment,

is it necessary for me to install Quick Place TM

to perform this action?

Do you have any sample code on attachment uploading? Can you share?

Thanks a million!:slight_smile:

Subject: RE: Invalid Universal id

I’m glad I can help; I look forward to trying your app someday!

You do not need to install Quick Place to use the attachments tag.

Here is the Lotusphere 2004 presentation I gave on the JSP tags, it has a working sample application and database in it:

http://www-10.lotus.com/ldd/sandbox.nsf/ConferencePresentationsViewNJ/8507bff1146b707385256e2f006baea6?OpenDocument

The step most folks miss is to add the UploadHandler servlet to their web app’s web.xml.

The focus of the demo was taking a web app which uses the Domino Custom Tag library and get it to run in Portal server. So there is a working web app, the same app altered to run in WPS, and then a version of the app split into 2 portlets to demonstrate portlet messaging (that one is incomplete - it just handles views, no documents).

The biggest problem with the attachments tag is that it will not run in Portal Server, which is why that tag does not show up in the portalized versions of the sample application.

Enjoy!

-sl

Subject: RE: Invalid Universal id

Thanks Steve !:-)I followed your suggestion ,it works!However ,a new problem pops up! when I am using domtags with domino server started ,I received this error message:

java.lang.Exception: Notes initialization java.lang.Exception: Notes initialization failure - err 417

at lotus.domino.NotesThread.NnotesInitThread(Native Method)

at lotus.domino.NotesThread.sinitThread(Unknown Source)

at lotus.domino.taglib.SessionData.init(SessionData.java:34)

at lotus.domino.taglib.SessionTag.dominoStartTag(SessionTag.java:66)

at lotus.domino.taglib.DominoTag.doStartTag(DominoTag.java:397)

at org.apache.jsp.InsertSuccess_jsp._jspService(InsertSuccess_jsp.java:122)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)

at java.lang.Thread.run(Thread.java:536)

Here is my jsp file snippets :

<%@ taglib uri=“WEB-INF/tld/domtags.tld” prefix=“domino” %>

<%@ page language=“java” import=“lotus.domino.*”%>

Session Test

<domino:session id=“sinfo”>

Print this text on screen

<% Session s = sinfo; %> //Sets session id equal to the variable s.

//The following code displays the platform of the server hosting this //session.

Platform = <%=s.getPlatform() %>

Domino Version: <%=s.getNotesVersion()%>

</domino:session>

I 've tried many times ,finally I 've found that when I turned off the domino server ,this problem was solved!!

Is that weired?

I am wondering if the domino server should be stopped when using domtags to access domino apps?

Does Domino server conflict with Tomcat server?

Thanks a million!

Subject: RE: Invalid Universal id

The Domino Custom Tags use the Domino Objects for Java (also known as the backend objects) to access the nsf. They can access the nsf locally, using the classes in Notes.jar, or remotely over iiop, using the classes in NCSO.jar. If you search the Designer help nsf for NotesFactory, you can readup on the different NotesFactory.createSession calls the tags use.

To create a local session, the session tag has no host attribute (or one set to an empty string), like you use in this statement: <domino:session id=“sinfo”> .

To create a remote session, the session tag’s host attribute needs to be valid -

<domino:session id=“sinfo” host=“youmachine.yourdomain.com”>

and the Domno server needs to be running the diiop task.

The thread model used in local access is well suited to development, in fact you as you noted, you don’t even need the Domino server running. There are some security settings in the Domino directory that govern java code running in the Domino JVM which impact some of the tags, like the attachments tag, so a correct local configuration takes a bit more work than you might first guess. If anything should go wrong in the user code running in the Domino JVM, it will bring down the Domino server.

In production and in final testing of your app, I would suggest starting up the Domino server with the diiop task and letting the tags use remote access. You take a small hit on Domino server startup, but I find it’s faster and more robust, so that’s the way I do most of my development. You can also take advantage of Session caching by setting the session tag’s duration attribute - this is ignored in local sessions.

In looking at your code sample, I wonder why you find this necessary:

<% Session s = sinfo; %> //Sets session id equal to the variable s.

Any place you use the variable s you could use sinfo - what do you gain by doing it this way?

Happy Coding!

-sl

Subject: RE: Invalid Universal id

Thanks a million Steve!Haha that statement you are pointing out is a mistake I 've made!Sorry for that!:slight_smile:

Now come to the point ,I 've read some articles

on accessing Domino apps using CORBA ,it should be the

final and perfect solution to access Domino in

web environment.However ,there is one thing I am wondering, that is ,Do I need install and configure any CORBA middleware such as Borland

VisoBroker or Orb ?

Could Domino do the same thing as those middleware do?

If not , what should I do to configure the Domino server to make it as a CORBA middleware?

Thanks again!

Have a nice day!:slight_smile:

Subject: RE: Invalid Universal id

From the Domino server’s perspect you don’t need other middleware products to gain access to Domino using CORBA. Once you start the diiop task, Domino is ready to service IIOP requests.

I am not familiar with the middleware products you mention, so I am unable to say what function they can do for you.

Use your notes client to open the help databases in the help subdirectory - the admin and the designer help files should tell you how to set up the Domino server’s diiop task.