Hi,
When I try to use the domino view tag (sample code below), it throws NullPointerException.
When I try to connect to the same database and print the views using Domino Java API, it returns without any errors.
Code:
<%-- open domino session --%>
<domino:session
id=“session”
host=“<%= hostName %>”
user=“<%= user %>” password=“<%= pwd %>”>
<%-- connect to domino database --%>
<domino:db id=“db” dbname=“<%= dbPath %>”>
<%-- create table header --%>
<%
// get views from database
Vector allViews = db.getViews();
// check for existent view(s)
if (allViews.size() > 0) {
String viewName = null;
// iterate through view(s)
Enumeration enum = allViews.elements();
while (enum.hasMoreElements()) {
// get name of current view
View currentView = (View)enum.nextElement();
viewName = currentView.getName();
%>
<%-- create table body displaying the name of the views --%>
<%
}
}
%>
| Views: |
| <%= viewName %> |
</domino:db>
</domino:session>
Exceptions: (Truncated to save space).
java.lang.NullPointerException at lotus.domino.taglib.SessionData.init(SessionData.java:44) at lotus.domino.taglib.SessionTag.dominoStartTag(SessionTag.java:60) at lotus.domino.taglib.DominoTag.doStartTag(DominoTag.java:422) at org.apache.jsp._PMOViewPortletView._jspService(_PMOViewPortletView.java:218) …
I suspect that this has something to do with the domtags.jar version that I am using. For development I am using WSAD 5.0.2.
Any pointers on this will help.
Thanks,
Dharma