this problem is occuring in a time period, the application is functioning correcty, some times it occurs. It seems to me like a time out, but I have already seached in JRun documentation but I found nothing.
I'm sending attached to this the SelecionarRelatorioServlet code.
Regard's
Marcelo Bellezo
"Peacock, Michael" wrote:
Marcelo -The java.lang.SecurityException is thrown by the java.lang.SecurityManager
class when it catches an access violation. Methods in the SecurityManager
class will return quietly if an action is allowed, but will throw a
SecurityException if the operation is not.What are you trying to do at line 93 of SelecionarRelatorioServlet.java?
I'll bet it looks something like:securityManager.checkXXX(arg);
This is the line that's causing the exception to be thrown. The thing
you're asking the security manager to check is not allowed.Cheers, Michael
> -----Original Message-----
> From: Marcelo Bellezo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 15, 2000 8:11 AM
> To: Scott Stirling; '[EMAIL PROTECTED] '
> Subject: Access disallowed
>
>
> Hi Scott,
>
> I'm sending this e-mail direct to you because I'm tired to
> post it into
> the jrun-talk list and no one answered it. I already post it in JRun
> Support Forum and no one from Allaire answered it too.
>
> The problem is, when I'm filling a form or doing some query
> I'm got the
> message:
>
> 500 Internal Server Error
> /webpersonnel/SelecionarRelatorio:
>
> javax.servlet.ServletException: System exception/error caught by
> container; nested exception is:
> java.lang.SecurityException: Access disallowed
> javax.servlet.ServletException: System exception/error caught by
> container; nested exception is:
> java.lang.SecurityException: Access disallowed
> at
> SelecionarRelatorioServlet.doGet(SelecionarRelatorioServlet.java:93)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at
> SelecionarRelatorioServlet.service(SelecionarRelatorioServlet.java:48)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
> at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
> at
> allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequest
> Dispatcher.java:88)
>
> at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
> at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
> at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
> at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
> at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
>
> default-err.log content:
>
> Operating System: Linux Version 2.2.13-9cl
> Java Virtual Machine: build 1.2.2-L, green threads, nojit from Sun
> Microsystems Inc.
> JRun 3.0 3.00.3694 Starting default...
> Current Locale: pt_BR
> Loading scheduler
> Loading logging
> Forcing shutdown.
> Exception: [08:56:22] java.lang.SecurityException: Access disallowed
>
>
> Can you tell me what is happening ?
>
> Regard's
>
> Marcelo Bellezo
>
> --------------------------------------------------------------
> ----------------
> Archives: http://www.egroups.com/group/jrun-interest/
> Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
/*
** Copyright (c) 2000 ASM Futura. All Rights Reserved.
*/
import java.io.*;
import java.rmi.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import allaire.ejipt.*;
import ejbeans.*;
public
class SelecionarRelatorioServlet
extends HttpServlet {
/**
* Overloaded to set up the context of the request to be associated with the user.
*/
protected void service(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException{
final Context context = (Context)request.getSession().getAttribute("context");
if (context == null) {
//this user has not logged in, so send them to the login page.
response.sendRedirect("login");
}
try {
//setup this thread to be associated with this user.
//Since servlets can process multiple user's concurrently, the
//user must be logged-in at the beginning of the request and
//logged-out at the end of the request.
//Create user object so that this user can be bound to all method
invocations
//from this thread.
final UserSession user =
(UserSession)context.lookup("allaire.ejipt.UserSession");
try {
//log the user into the current thread.
user.begin();
//create a request variable which can be used to identify this user.
final Hashtable environment = context.getEnvironment();
request.setAttribute("User",
(String)environment.get(Context.SECURITY_PRINCIPAL));
//let the HttpServlet class send control to either the doGet() or
doPost() method.
super.service(request, response);
}
finally {
//Note: the finally clause here will force the user to be logged
//out of the thread even if an Exception is thrown while processing
//the request.
user.end();
}
}
catch (Exception e) {
throw new ServletException(e);
}
}
public void doGet(final HttpServletRequest request, final HttpServletResponse
response)
throws IOException, ServletException{
final HttpSession session = request.getSession(true);
final Context context = (Context)session.getAttribute("context");
Enumeration enumeration = null;
StringBuffer sb = new StringBuffer();
try {
//lookup the bean and sets its pessoa as a request variable which can be
//displayed by the JSP.
final RelatorioHome relatorioHome =
(RelatorioHome)context.lookup("webpersonnel.RelatorioHome");
//final PessoaHome home =
(PessoaHome)context.lookup("java:comp/env/ejb/webpersonnel.PessoaHome");
enumeration = relatorioHome.findAll();
sb.append("<table border=1 cellpadding=0 cellspacing=0 width='100%'>\n");
sb.append("<tr bgcolor='#006633'><td><font
color='white'>Nome</font></td>");
sb.append("<td><font color='white'>Descrição</font></td>");
sb.append("<td><font color='white'>Arquivo</font></td></tr>");
while (enumeration.hasMoreElements()){
Relatorio relatorio = (Relatorio)enumeration.nextElement();
sb.append("<tr bgcolor='#bbcc99'>");
sb.append("<td><font size='-3'><a
href='SelecionarRelatorio?btnConsultar=1&relatorio=" + relatorio.getPk() +"'>");
sb.append(relatorio.getPk() + "</a></font></td>");
sb.append("<td><font size='-3'><a
href='SelecionarRelatorio?btnConsultar=1&relatorio=" + relatorio.getPk() +"'>");
sb.append(relatorio.getDescricao() + "</a></font></td>");
sb.append("<td><font size='-3'><a
href='SelecionarRelatorio?btnConsultar=1&relatorio=" + relatorio.getPk() +"'>");
sb.append(relatorio.getNomeArquivo() + "</a></font></td>");
sb.append("</tr>\n");
}
sb.append("</table>");
}
catch (final Exception server) {
throw new ServletException(server);
}
request.setAttribute( "relatoriosSelecionados", sb.toString() );
//use a JSP page to display the pessoa form to the user.
request.getRequestDispatcher("SelecionarRelatorioForm.jsp").forward(request,
response);
}
public void doPost(final HttpServletRequest request, final HttpServletResponse
response)
throws IOException, ServletException{
this.doGet(request, response);
}
}
