Servlet rights problems

I havig troubles running a servlet in a domino 6.0.1CF2, when I try to invoque the method evaluate from session class or getFirstItem from Document class I get te following error in the server console:trying to invoque the “evaluate” method


HTTP JVM: NotesException: Notes error: You are not authorized to perform that operation

04/09/2004 04:10:56 PM HTTP JVM: at lotus.domino.local.Session.NEvaluate(Native Method)

04/09/2004 04:10:56 PM HTTP JVM: at lotus.domino.local.Session.evaluate(Session.java:555)

04/09/2004 04:10:56 PM HTTP JVM: at getPortada.doGet(getPortada.java:81)


trying to invoque the “getFirstItem” method


TTP JVM: NotesException: Notes error: You are not authorized to perform that operation

04/09/2004 12:56:28 PM HTTP JVM: at lotus.domino.local.Document.NgetFirstItem(Native Method)

04/09/2004 12:56:28 PM HTTP JVM: at lotus.domino.local.Document.getFirstItem(Unknown Source)

04/09/2004 12:56:28 PM HTTP JVM: at getPortada.doGet(getPortada.java:80)


this is the code of the servlet:


/*

###############################################################################

$Author$

$Date$

$Log$

###############################################################################

*/

import java.util.*;

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

import lotus.domino.*;

import java.io.InputStream;

public class getPortada extends HttpServlet {

public void init(ServletConfig config){

	try{

		System.out.println("iniciando...");

		super.init(config);

	}catch(Exception e){

		e.printStackTrace();

	}		

}

public void doGet (HttpServletRequest request, HttpServletResponse response) throws IOException{

		//---Obtengo el objeto que me permite escribir codigo html

		ServletOutputStream out = response.getOutputStream();

		try{

		//---[Devfino los objetos]---

		Vector vctItemValues=null,

			vctItemValuesAlias=null;

		Enumeration values, valuesAlias;

		NotesThread.sinitThread();

		Session s=null;

		Database db = null;

		Document myDocPortada = null,

			myDocNoticia = null;

		String strImageName="";

		//---[Parametros del Servlet]

		String strDatabase="";

		String strUser="";

		String strPassword="";

		String strServer = "";

		String strAlias="";

		//---Obtengo la ubicacion de la base de datos

		try{

			strDatabase = "infosalud/infosalud.nsf";

			strUser = "Administrator";

			strPassword = "password";

			strServer = "209.167.44.444";

		}catch(Exception e){

			e.printStackTrace();

		}

		View newsView;

		s = NotesFactory.createSession("", strUser, strPassword);

		ViewEntryCollection myViewEntries;

		ViewEntry myViewEntry;

		Vector myItems;

		Item myItem;

		int intContadorItems=0;

		//---[Inicializacion de Variables]---

		//---Login del usuario

		db = s.getDatabase(strServer, strDatabase);

		newsView = db.getView("portadasToXML");





		//---[Entry Point]----

		newsView.refresh();

		//myViewEntries = newsView.getAllEntries();

		//myViewEntry = myViewEntries.getEntryByKey(request.getParameter("categoria"),true);

		myViewEntry = newsView.getEntryByKey(request.getParameter("categoria"),true);

		response.setContentType("text/xml");

		out.println("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");

		out.println("<portada>");

		//while(myViewEntry!=null){

		myDocPortada = myViewEntry.getDocument();

		myDocNoticia = db.getDocumentByUNID(myDocPortada.getItemValueString("strIDNoticiaPrincipal"));

		//---[Noticia Principal]---

		out.println("<noticia_primer_orden>");

		out.println("<universal_id>"+myDocNoticia.getUniversalID()+"</universal_id>");

		//vctItemValuesAlias = myDocNoticia.getFirstItem("strCategoriasForDisplay").getValues();

		vctItemValuesAlias = s.evaluate("strCategoriasForDisplay",myDocNoticia);

		//vctItemValues = myDocNoticia.getFirstItem("strCategorias").getValues();

		vctItemValues = s.evaluate("strCategorias",myDocNoticia);

					values = myDocNoticia.getFirstItem("strCategorias").getValues().elements();

					valuesAlias = myDocNoticia.getFirstItem("strCategoriasForDisplay").getValues().elements();

					out.print("<categorias>");

					while (values.hasMoreElements()) {

						out.print("<categoria>");

						out.print("<alias>");

						strAlias = (String)values.nextElement();

						out.print(((strAlias.replace('[',' ')).replace(']',' ')).trim());

						out.println("</alias>");

						out.print("<name>");

						out.print((String)valuesAlias.nextElement());

						out.println("</name>");

						out.print("</categoria>");

					}

					out.println("</categorias>");

					

					while (values.hasMoreElements()) {

					}

		out.println("<titulo>"+myDocNoticia.getItemValueString("strTitulo")+"</titulo>");

		out.println("<copete>"+myDocNoticia.getItemValueString("strCopete")+"</copete>");

		strImageName = myDocNoticia.getItemValueString("strImageName");

		if(strImageName!=null){

			out.println("<image_name>"+strImageName+"</image_name>");

		}

		out.println("</noticia_primer_orden>");

		Integer intgrContador=null;

		//---[Noticias Secundarias]---

		for(int intContador=1; intContador<=6; intContador++){

			intgrContador=new Integer(intContador);

			if(myDocPortada.hasItem("strIDNoticiaSecundaria"+intgrContador)){

				if (myDocPortada.getItemValueString("strIDNoticiaSecundaria"+intgrContador).compareTo("")!=0){

					myDocNoticia = db.getDocumentByUNID(myDocPortada.getItemValueString("strIDNoticiaSecundaria"+intgrContador));

					out.println("<noticia_segundo_orden_"+intgrContador+">");

					out.println("<universal_id>"+myDocNoticia.getUniversalID()+"</universal_id>");

		vctItemValuesAlias = myDocNoticia.getFirstItem("strCategoriasForDisplay").getValues();

		vctItemValues = myDocNoticia.getFirstItem("strCategorias").getValues();

					values = myDocNoticia.getFirstItem("strCategorias").getValues().elements();

					valuesAlias = myDocNoticia.getFirstItem("strCategoriasForDisplay").getValues().elements();

					out.print("<categorias>");

					while (values.hasMoreElements()) {

						out.print("<categoria>");

						out.print("<alias>");

						strAlias = (String)values.nextElement();

						out.print(((strAlias.replace('[',' ')).replace(']',' ')).trim());

						out.println("</alias>");

						out.print("<name>");

						out.print((String)valuesAlias.nextElement());

						out.println("</name>");

						out.print("</categoria>");

					}

					out.println("</categorias>");

					out.println("<titulo>"+myDocNoticia.getItemValueString("strTitulo")+"</titulo>");

					out.println("<copete>"+myDocNoticia.getItemValueString("strCopete")+"</copete>");

					strImageName = myDocNoticia.getItemValueString("strImageName");

					if(strImageName!=null){

						out.println("<image_name>"+strImageName+"</image_name>");

					}

					out.println("</noticia_segundo_orden_"+intgrContador+">");

				}

			}

		}

		//}

	}catch(Exception e){

		e.printStackTrace();

	}finally{

		out.println("</portada>");

	}

	

}

}


The user wich creates the session has manager acces to de database and has all the roles, the document has reader fields and I can see it perfectly from notes or web after login.

My situation is desperate, please any sugestion will be apreciated.

I’m compiling the servlet with the j2sdk1.4.2_03 from sun under windowsXP.

Thanks in advance

Subject: Servlet rights problems

Use EffectiveUserName to determine which rights you are really running under, and then make sure the right are set to the proper level. You will find helpful information about programmability rights in the Agent FAQ even though you are not running an agent, the rules are the same. Agent FAQ is under resources, start with an article called “Troubleshooting agents in R5 and R6”