Can't fix a java.security.AccessControlException exception
Hi.
I have a webapp running under j2ee with a ContextListener that performs some initialization tasks.
One of these tasks consists in querying a database and putting the results in a xml file according to an existing xml file that acts as a map for it maps the rows and columns of the result set to elements and attributes in the xml doc (this task is really performed by an EJB that the ContextListener instantiates).
To do this, at some point the EJB tries to instantiate a new org.w3c.dom.Document object pointing to the xml map file witch, like I said, will be used to 'massaje' the data in the query into a xml format.
Here's the revelant portion of the code:
mapDoc = docbuilder.parse(mapfilepath);
When the EJB tries to do this, the following exception is thrown:
java.security.AccessControlException: access denied (java.io.FilePermission c:\j2sdkee1.3.1\public_html\iFAQs\xml\temas-map.xml read)
I've checked the server.policy file and it seems ok, it has a grant section that makes me believe I should have read and write access to all files under public_html:
grant codeBase "file:${com.sun.enterprise.home}/public_html/-" {
permission java.lang.RuntimePermission "loadLibrary.*";
permission java.lang.RuntimePermission "accessClassInPackage.*";
permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.lang.RuntimePermission "modifyThreadGroup";
permission java.io.FilePermission "<<ALL FILES>>", "read,write";
Any help will be much appreciated!
Thanks!
Best regards,
Piponline, Portugal
hi piponline,
thanx for the question details u have specified, part of ur details are used to solve my problem. i have just copied the permissions statements for servlets to j2ee server section in server.pliciy file
bye
kireet
Similar Messages
-
How can i deal with java.security.AccessControlException?
Hi all, I need to implement JavaMail using Servlet and deploy throught J2EE deployment tool. But when i test out the servlet i will always encounter this exception thrown. How can i solve this?
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
This is the servlet i am testing. Please advise. Thanks in advance!
* @(#)JavaMailServlet.java 1.3 99/12/06
* Copyright 1998, 1999 Sun Microsystems, Inc. All Rights Reserved.
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
import java.io.*;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
* This is a servlet that demonstrates the use of JavaMail APIs
* in a 3-tier application. It allows the user to login to an
* IMAP store, list all the messages in the INBOX folder, view
* selected messages, compose and send a message, and logout.
* <p>
* Please note: This is NOT an example of how to write servlets!
* This is simply to show that JavaMail can be used in a servlet.
* <p>
* For more information on this servlet, see the
* JavaMailServlet.README.txt file.
* <p>
* For more information on servlets, see
* * http://java.sun.com/products/java-server/servlets/index.html
* @author Max Spivak
public class JavaMailServlet extends HttpServlet implements SingleThreadModel {
String protocol = "POP3";
String mbox = "INBOX";
* This method handles the "POST" submission from two forms: the
* login form and the message compose form. The login form has the
* following parameters: <code>hostname</code>, <code>username</code>,
* and <code>password</code>. The <code>send</code> parameter denotes
* that the method is processing the compose form submission.
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
// get the session
HttpSession ssn = req.getSession(true);
String send = req.getParameter("send");
String host = req.getParameter("hostname");
String user = req.getParameter("username");
String passwd = req.getParameter("password");
URLName url = new URLName(protocol, host, -1, mbox, user, passwd);
ServletOutputStream out = res.getOutputStream();
res.setContentType("text/html");
out.println("<html><body bgcolor=\"#CCCCFF\">");
if (send != null) {
// process message sending
send(req, res, out, ssn);
} else {
// initial login
// create
MailUserData mud = new MailUserData(url);
ssn.putValue("javamailservlet", mud);
try {
Properties props = System.getProperties();
System.out.println("url");
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props, null);
session.setDebug(false);
Store store = session.getStore(url);
store.connect();
Folder folder = store.getDefaultFolder();
if (folder == null)
throw new MessagingException("No default folder");
folder = folder.getFolder(mbox);
if (folder == null)
throw new MessagingException("Invalid folder");
folder.open(Folder.READ_WRITE);
int totalMessages = folder.getMessageCount();
Message[] msgs = folder.getMessages();
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
folder.fetch(msgs, fp);
// track who logged in
System.out.println("Login from: " + store.getURLName());
// save stuff into MUD
mud.setSession(session);
mud.setStore(store);
mud.setFolder(folder);
// splash
out.print("<center>");
out.print("<font face=\"Arial,Helvetica\" font size=+3>");
out.println("<b>Welcome to JavaMail!</b></font></center><p>");
// folder table
out.println("<table width=\"50%\" border=0 align=center>");
// folder name column header
out.print("<tr><td width=\"75%\" bgcolor=\"#ffffcc\">");
out.print("<font face=\"Arial,Helvetica\" font size=-1>");
out.println("<b>FolderName</b></font></td><br>");
// msg count column header
out.print("<td width=\"25%\" bgcolor=\"#ffffcc\">");
out.print("<font face=\"Arial,Helvetica\" font size=-1>");
out.println("<b>Messages</b></font></td><br>");
out.println("</tr>");
// folder name
out.print("<tr><td width=\"75%\" bgcolor=\"#ffffff\">");
out.print("<a href=\"" + HttpUtils.getRequestURL(req) + "\">" +
"Inbox" + "</a></td><br>");
// msg count
out.println("<td width=\"25%\" bgcolor=\"#ffffff\">" +
totalMessages + "</td>");
out.println("</tr>");
out.println("</table");
} catch (Exception ex) {
out.println(ex.toString());
} finally {
out.println("</body></html>");
out.close();
* This method handles the GET requests for the client.
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
HttpSession ses = req.getSession(false); // before we write to out
ServletOutputStream out = res.getOutputStream();
MailUserData mud = getMUD(ses);
if (mud == null) {
res.setContentType("text/html");
out.println("<html><body>Please Login (no session)</body></html>");
out.close();
return;
if (!mud.getStore().isConnected()) {
res.setContentType("text/html");
out.println("<html><body>Not Connected To Store</body></html>");
out.close();
return;
// mux that takes a GET request, based on parameters figures
// out what it should do, and routes it to the
// appropriate method
// get url parameters
String msgStr = req.getParameter("message");
String logout = req.getParameter("logout");
String compose = req.getParameter("compose");
String part = req.getParameter("part");
int msgNum = -1;
int partNum = -1;
// process url params
if (msgStr != null) {
// operate on message "msgStr"
msgNum = Integer.parseInt(msgStr);
if (part == null) {
// display message "msgStr"
res.setContentType("text/html");
displayMessage(mud, req, out, msgNum);
} else if (part != null) {
// display part "part" in message "msgStr"
partNum = Integer.parseInt(part);
displayPart(mud, msgNum, partNum, out, res);
} else if (compose != null) {
// display compose form
compose(mud, res, out);
} else if (logout != null) {
// process logout
try {
mud.getFolder().close(false);
mud.getStore().close();
ses.invalidate();
out.println("<html><body>Logged out OK</body></html>");
} catch (MessagingException mex) {
out.println(mex.toString());
} else {
// display headers
displayHeaders(mud, req, out);
/* main method to display messages */
private void displayMessage(MailUserData mud, HttpServletRequest req,
ServletOutputStream out, int msgNum)
throws IOException {
out.println("<html>");
out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
out.println("<BODY bgcolor=\"#ccccff\">");
out.print("<center><font face=\"Arial,Helvetica\" ");
out.println("font size=\"+3\"><b>");
out.println("Message " + (msgNum+1) + " in folder " +
mud.getStore().getURLName() +
"/INBOX</b></font></center><p>");
try {
Message msg = mud.getFolder().getMessage(msgNum);
// first, display this message's headers
displayMessageHeaders(mud, msg, out);
// and now, handle the content
Object o = msg.getContent();
//if (o instanceof String) {
if (msg.isMimeType("text/plain")) {
out.println("<pre>");
out.println((String)o);
out.println("</pre>");
//} else if (o instanceof Multipart){
} else if (msg.isMimeType("multipart/*")) {
Multipart mp = (Multipart)o;
int cnt = mp.getCount();
for (int i = 0; i < cnt; i++) {
displayPart(mud, msgNum, mp.getBodyPart(i), i, req, out);
} else {
out.println(msg.getContentType());
} catch (MessagingException mex) {
out.println(mex.toString());
out.println("</BODY></html>");
out.close();
* This method displays a message part. <code>text/plain</code>
* content parts are displayed inline. For all other parts,
* a URL is generated and displayed; clicking on the URL
* brings up the part in a separate page.
private void displayPart(MailUserData mud, int msgNum, Part part,
int partNum, HttpServletRequest req,
ServletOutputStream out)
throws IOException {
if (partNum != 0)
out.println("<p><hr>");
try {
String sct = part.getContentType();
if (sct == null) {
out.println("invalid part");
return;
ContentType ct = new ContentType(sct);
if (partNum != 0)
out.println("<b>Attachment Type:</b> " +
ct.getBaseType() + "<br>");
if (ct.match("text/plain")) {
// display text/plain inline
out.println("<pre>");
out.println((String)part.getContent());
out.println("</pre>");
} else {
// generate a url for this part
String s;
if ((s = part.getFileName()) != null)
out.println("<b>Filename:</b> " + s + "<br>");
s = null;
if ((s = part.getDescription()) != null)
out.println("<b>Description:</b> " + s + "<br>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?message=" +
msgNum + "&part=" +
partNum + "\">Display Attachment</a>");
} catch (MessagingException mex) {
out.println(mex.toString());
* This method gets the stream from for a given msg part and
* pushes it out to the browser with the correct content type.
* Used to display attachments and relies on the browser's
* content handling capabilities.
private void displayPart(MailUserData mud, int msgNum,
int partNum, ServletOutputStream out,
HttpServletResponse res)
throws IOException {
Part part = null;
try {
Message msg = mud.getFolder().getMessage(msgNum);
Multipart mp = (Multipart)msg.getContent();
part = mp.getBodyPart(partNum);
String sct = part.getContentType();
if (sct == null) {
out.println("invalid part");
return;
ContentType ct = new ContentType(sct);
res.setContentType(ct.getBaseType());
InputStream is = part.getInputStream();
int i;
while ((i = is.read()) != -1)
out.write(i);
out.flush();
out.close();
} catch (MessagingException mex) {
out.println(mex.toString());
* This is a utility message that pretty-prints the message
* headers for message that is being displayed.
private void displayMessageHeaders(MailUserData mud, Message msg,
ServletOutputStream out)
throws IOException {
try {
out.println("<b>Date:</b> " + msg.getSentDate() + "<br>");
Address[] fr = msg.getFrom();
if (fr != null) {
boolean tf = true;
out.print("<b>From:</b> ");
for (int i = 0; i < fr.length; i++) {
out.print(((tf) ? " " : ", ") + getDisplayAddress(fr));
tf = false;
out.println("<br>");
Address[] to = msg.getRecipients(Message.RecipientType.TO);
if (to != null) {
boolean tf = true;
out.print("<b>To:</b> ");
for (int i = 0; i < to.length; i++) {
out.print(((tf) ? " " : ", ") + getDisplayAddress(to[i]));
tf = false;
out.println("<br>");
Address[] cc = msg.getRecipients(Message.RecipientType.CC);
if (cc != null) {
boolean cf = true;
out.print("<b>CC:</b> ");
for (int i = 0; i < cc.length; i++) {
out.print(((cf) ? " " : ", ") + getDisplayAddress(cc[i]));
cf = false;
out.println("<br>");
out.print("<b>Subject:</b> " +
((msg.getSubject() !=null) ? msg.getSubject() : "") +
"<br>");
} catch (MessagingException mex) {
out.println(msg.toString());
* This method displays the URL's for the available commands and the
* INBOX headerlist
private void displayHeaders(MailUserData mud,
HttpServletRequest req,
ServletOutputStream out)
throws IOException {
SimpleDateFormat df = new SimpleDateFormat("EE M/d/yy");
out.println("<html>");
out.println("<HEAD><TITLE>JavaMail Servlet</TITLE></HEAD>");
out.println("<BODY bgcolor=\"#ccccff\"><hr>");
out.print("<center><font face=\"Arial,Helvetica\" font size=\"+3\">");
out.println("<b>Folder " + mud.getStore().getURLName() +
"/INBOX</b></font></center><p>");
// URL's for the commands that are available
out.println("<font face=\"Arial,Helvetica\" font size=\"+3\"><b>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?logout=true\">Logout</a>");
out.println("<a href=\"" +
HttpUtils.getRequestURL(req) +
"?compose=true\" target=\"compose\">Compose</a>");
out.println("</b></font>");
out.println("<hr>");
// List headers in a table
out.print("<table cellpadding=1 cellspacing=1 "); // table
out.println("width=\"100%\" border=1>"); // settings
// sender column header
out.println("<tr><td width=\"25%\" bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Sender</b></font></td>");
// date column header
out.println("<td width=\"15%\" bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Date</b></font></td>");
// subject column header
out.println("<td bgcolor=\"ffffcc\">");
out.println("<font face=\"Arial,Helvetica\" font size=\"+1\">");
out.println("<b>Subject</b></font></td></tr>");
try {
Folder f = mud.getFolder();
int msgCount = f.getMessageCount();
Message m = null;
// for each message, show its headers
for (int i = 1; i <= msgCount; i++) {
m = f.getMessage(i);
// if message has the DELETED flag set, don't display it
if (m.isSet(Flags.Flag.DELETED))
continue;
// from
out.println("<tr valigh=middle>");
out.print("<td width=\"25%\" bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
((m.getFrom() != null) ?
m.getFrom()[0].toString() :
"" ) +
"</font></td>");
// date
out.print("<td nowrap width=\"15%\" bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
df.format((m.getSentDate()!=null) ?
m.getSentDate() : m.getReceivedDate()) +
"</font></td>");
// subject & link
out.print("<td bgcolor=\"ffffff\">");
out.println("<font face=\"Arial,Helvetica\">" +
"<a href=\"" +
HttpUtils.getRequestURL(req) +
"?message=" +
i + "\">" +
((m.getSubject() != null) ?
m.getSubject() :
"<i>No Subject</i>") +
"</a>" +
"</font></td>");
out.println("</tr>");
} catch (MessagingException mex) {
out.println("<tr><td>" + mex.toString() + "</td></tr>");
mex.printStackTrace();
out.println("</table>");
out.println("</BODY></html>");
out.flush();
out.close();
* This method handles the request when the user hits the
* <i>Compose</i> link. It send the compose form to the browser.
private void compose(MailUserData mud, HttpServletResponse res,
ServletOutputStream out)
throws IOException {
res.setContentType("text/html");
out.println(composeForm);
out.close();
* This method processes the send request from the compose form
private void send(HttpServletRequest req, HttpServletResponse res,
ServletOutputStream out, HttpSession ssn)
throws IOException {
String to = req.getParameter("to");
String cc = req.getParameter("cc");
String subj = req.getParameter("subject");
String text = req.getParameter("text");
try {
MailUserData mud = getMUD(ssn);
if (mud == null)
throw new Exception("trying to send, but not logged in");
Message msg = new MimeMessage(mud.getSession());
InternetAddress[] toAddrs = null, ccAddrs = null;
if (to != null) {
toAddrs = InternetAddress.parse(to, false);
msg.setRecipients(Message.RecipientType.TO, toAddrs);
} else
throw new MessagingException("No \"To\" address specified");
if (cc != null) {
ccAddrs = InternetAddress.parse(cc, false);
msg.setRecipients(Message.RecipientType.CC, ccAddrs);
if (subj != null)
msg.setSubject(subj);
URLName u = mud.getURLName();
msg.setFrom(new InternetAddress(u.getUsername() + "@" +
u.getHost()));
if (text != null)
msg.setText(text);
Transport.send(msg);
out.println("<h1>Message sent successfully</h1></body></html>");
out.close();
} catch (Exception mex) {
out.println("<h1>Error sending message.</h1>");
out.println(mex.toString());
out.println("<br></body></html>");
// utility method; returns a string suitable for msg header display
private String getDisplayAddress(Address a) {
String pers = null;
String addr = null;
if (a instanceof InternetAddress &&
((pers = ((InternetAddress)a).getPersonal()) != null)) {
addr = pers + " "+"<"+((InternetAddress)a).getAddress()+">";
} else
addr = a.toString();
return addr;
// utility method; retrieve the MailUserData
// from the HttpSession and return it
private MailUserData getMUD(HttpSession ses) throws IOException {
MailUserData mud = null;
if (ses == null) {
return null;
} else {
if ((mud = (MailUserData)ses.getValue("javamailservlet")) == null){
return null;
return mud;
public String getServletInfo() {
return "A mail reader servlet";
* This is the HTML code for the compose form. Another option would
* have been to use a separate html page.
private static String composeForm = "<HTML><HEAD><TITLE>JavaMail Compose</TITLE></HEAD><BODY BGCOLOR=\"#CCCCFF\"><FORM ACTION=\"/servlet/JavaMailServlet\" METHOD=\"POST\"><input type=\"hidden\" name=\"send\" value=\"send\"><P ALIGN=\"CENTER\"><B><FONT SIZE=\"4\" FACE=\"Verdana, Arial, Helvetica\">JavaMail Compose Message</FONT></B><P><TABLE BORDER=\"0\" WIDTH=\"100%\"><TR><TD WIDTH=\"16%\" HEIGHT=\"22\"> <P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">To:</FONT></B></TD><TD WIDTH=\"84%\" HEIGHT=\"22\"><INPUT TYPE=\"TEXT\" NAME=\"to\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">CC:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"cc\" SIZE=\"30\"> <FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica\"> (separate addresses with commas)</FONT></TD></TR><TR><TD WIDTH=\"16%\"><P ALIGN=\"RIGHT\"><B><FONT FACE=\"Verdana, Arial, Helvetica\">Subject:</FONT></B></TD><TD WIDTH=\"84%\"><INPUT TYPE=\"TEXT\" NAME=\"subject\" SIZE=\"55\"></TD></TR><TR><TD WIDTH=\"16%\"> </TD><TD WIDTH=\"84%\"><TEXTAREA NAME=\"text\" ROWS=\"15\" COLS=\"53\"></TEXTAREA></TD></TR><TR><TD WIDTH=\"16%\" HEIGHT=\"32\"> </TD><TD WIDTH=\"84%\" HEIGHT=\"32\"><INPUT TYPE=\"SUBMIT\" NAME=\"Send\" VALUE=\"Send\"><INPUT TYPE=\"RESET\" NAME=\"Reset\" VALUE=\"Reset\"></TD></TR></TABLE></FORM></BODY></HTML>";
* This class is used to store session data for each user's session. It
* is stored in the HttpSession.
class MailUserData {
URLName url;
Session session;
Store store;
Folder folder;
public MailUserData(URLName urlname) {
url = urlname;
public URLName getURLName() {
return url;
public Session getSession() {
return session;
public void setSession(Session s) {
session = s;
public Store getStore() {
return store;
public void setStore(Store s) {
store = s;
public Folder getFolder() {
return folder;
public void setFolder(Folder f) {
folder = f;You posted a thousand lines of badly-formatted code and didn't have the sense to say which one had the exception.
My guess is that it was this one:Session session = Session.getDefaultInstance(props, null);because that happened to me. I fixed it by calling getInstance instead of getDefaultInstance.
However if that isn't the problem, how about spending a few seconds to post a less useless question? -
Hi Everybody
I downloaded and installed weblogic as per the installation document
but I am getting the following exception and finally the server
is started. Can somebody help me to resolve this problem
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:24)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jts.internal.CoordinatorFactoryImpl.start(CoordinatorFactoryImpl.java:52)
at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:33)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<I> <WebLogicServer> Invoking main-style
startup weblogic.jdbc.common.internal.JdbcStartup weblogic.jdbc.common.internal.JdbcStartup
Wed Feb 28 12:55:35 EST 2001:<E> <JDBC Init> ERROR: Could not get
JNDI context: javax.naming.NoInitialContextException: Cannot instantiate
class: weblogic.jndi.WLInitialContextFactory [Root exception is
java.security.AccessControlException: access denied (java.lang.RuntimePermission
getClassLoader )]
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Beginning startup process
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Init JMS Security
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Initializing from weblogic.properties
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:835)
at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:483)
at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:488)
at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Startup process complete.
JMS is active
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.initSessionPoolManager(JMSManager.java:317)
at weblogic.jms.server.JMSManager.init(JMSManager.java:308)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound SessionPoolManager
as weblogic.jms.SessionPoolManager
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.initConnectionConsumerManager(JMSManager.java:333)
at weblogic.jms.server.JMSManager.init(JMSManager.java:310)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound ConnectionConsumerManager
as weblogic.jms.ConnectionConsumerManager
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1476)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1495)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <WebLogicServer> Invoking main-style
startup RMI Registry weblogic.rmi.internal.RegistryImpl
Wed Feb 28 12:55:36 EST 2001:<I> <RMI> Registry started
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.common.internal.T3BindableServices.initialize(T3BindableServices.java:114)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.ejb.internal.EJBManagerImpl.bindToJNDI(EJBManagerImpl.java:580)
at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:226)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <EJB> Cannot intialize Mail Session
resources because could not get JNDI context: javax.naming.NoInitialContextException:
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
[Root exception is java.security.AccessControlException: access
denied (java.lang.RuntimePermission getClassLoader )]
Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 EJB jar files loaded,
containing 0 EJBs
Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 deployed, 0 failed to
deploy.
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.io.common.internal.T3FileSystemProxyImpl.installFileSystems(Compiled
Code)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <ServletContext-General> cannot
make temp directory '/opt/weblogic/myserver/public_html/_tmp_war',
will not be able to compile JSPs
Wed Feb 28 12:55:36 EST 2001:<E> <HTTP> Cannot intialize httpd
URL resources because could not get JNDI context: javax.naming.NoInitialContextException:
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
[Root exception is java.security.AccessControlException: access
denied (java.lang.RuntimePermission getClassLoader )]
Lot of thanks for your help.Check the weblogic.policy file to make sure that it is giving permissions to the right directories. If you have
installed a Service Pack, make sure that both service pack jar files are at the front of their corresponding
classpaths...
vj wrote:
Hi Everybody
I downloaded and installed weblogic as per the installation document
but I am getting the following exception and finally the server
is started. Can somebody help me to resolve this problem
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:24)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jts.internal.CoordinatorFactoryImpl.start(CoordinatorFactoryImpl.java:52)
at weblogic.jts.internal.TransactionManagerImpl.<init>(TransactionManagerImpl.java:33)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<I> <WebLogicServer> Invoking main-style
startup weblogic.jdbc.common.internal.JdbcStartup weblogic.jdbc.common.internal.JdbcStartup
Wed Feb 28 12:55:35 EST 2001:<E> <JDBC Init> ERROR: Could not get
JNDI context: javax.naming.NoInitialContextException: Cannot instantiate
class: weblogic.jndi.WLInitialContextFactory [Root exception is
java.security.AccessControlException: access denied (java.lang.RuntimePermission
getClassLoader )]
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Beginning startup process
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Init JMS Security
Wed Feb 28 12:55:35 EST 2001:<I> <JMS> Initializing from weblogic.properties
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:835)
at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:483)
at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:35 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.doInitFromProperties(JMSManager.java:488)
at weblogic.jms.server.JMSManager.initFromProperties(JMSManager.java:472)
at weblogic.jms.server.JMSManager.init(JMSManager.java:299)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Startup process complete.
JMS is active
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.initSessionPoolManager(JMSManager.java:317)
at weblogic.jms.server.JMSManager.init(JMSManager.java:308)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound SessionPoolManager
as weblogic.jms.SessionPoolManager
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.jms.server.JMSManager.getContext(JMSManager.java:851)
at weblogic.jms.server.JMSManager.initConnectionConsumerManager(JMSManager.java:333)
at weblogic.jms.server.JMSManager.init(JMSManager.java:310)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <JMS> Bound ConnectionConsumerManager
as weblogic.jms.ConnectionConsumerManager
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:240)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1476)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.t3.srvr.T3Srvr.bindServer(T3Srvr.java:1495)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<I> <WebLogicServer> Invoking main-style
startup RMI Registry weblogic.rmi.internal.RegistryImpl
Wed Feb 28 12:55:36 EST 2001:<I> <RMI> Registry started
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.common.internal.T3BindableServices.initialize(T3BindableServices.java:114)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(WLInitialContextFactoryDelegate.java:279)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.ejb.internal.EJBManagerImpl.bindToJNDI(EJBManagerImpl.java:580)
at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:226)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <EJB> Cannot intialize Mail Session
resources because could not get JNDI context: javax.naming.NoInitialContextException:
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
[Root exception is java.security.AccessControlException: access
denied (java.lang.RuntimePermission getClassLoader )]
Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 EJB jar files loaded,
containing 0 EJBs
Wed Feb 28 12:55:36 EST 2001:<I> <EJB> 0 deployed, 0 failed to
deploy.
Wed Feb 28 12:55:36 EST 2001:<E> <Service>
java.lang.reflect.InvocationTargetException: java.security.AccessControlException:
access denied (java.lang.RuntimePermission setContextClassLoader
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at java.security.AccessControlException.<init>(Compiled Code)
at java.security.AccessControlContext.checkPermission(Compiled
Code)
at java.security.AccessController.checkPermission(Compiled Code)
at java.lang.SecurityManager.checkPermission(Compiled Code)
at java.lang.Thread.setContextClassLoader(Compiled Code)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.jndi.internal.Utils.setContextClassLoader(Utils.java:73)
at weblogic.jndi.WLInitialContextFactoryDelegate.newLocalContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(Compiled
Code)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(Compiled
Code)
at weblogic.jndi.Environment.getContext(Environment.java:122)
at weblogic.jndi.Environment.getInitialContext(Environment.java:105)
at weblogic.io.common.internal.T3FileSystemProxyImpl.installFileSystems(Compiled
Code)
at weblogic.t3.srvr.T3Srvr.start(Compiled Code)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:825)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:99)
at weblogic.Server.main(Server.java:65)
at weblogic.Server.main(Server.java:55)
Wed Feb 28 12:55:36 EST 2001:<E> <ServletContext-General> cannot
make temp directory '/opt/weblogic/myserver/public_html/_tmp_war',
will not be able to compile JSPs
Wed Feb 28 12:55:36 EST 2001:<E> <HTTP> Cannot intialize httpd
URL resources because could not get JNDI context: javax.naming.NoInitialContextException:
Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
[Root exception is java.security.AccessControlException: access
denied (java.lang.RuntimePermission getClassLoader )]
Lot of thanks for your help. -
Exception: java.security.AccessControlException
hi, im writing a swing applet that uses a gif in a toolbar. it works fine in the appletviewer but when i try and run it in IE i get the following message:
Exception: java.security.AccessControlException: access denied(java.io.FilePermission new.gif read). i dont think theres a problem with the gif, ive tried using one from a Swing applet from Sun and get the same message.
id be grateful for any help
thanks
shargilHi.. I had the same exception some time ago. This should fix the problem:
In you policy file, e.g. HelloPolicy you shuld add this to your grant permission:
permission java.io.FilePermission "C:${/}YourPages${/}HelloApplet${/}yourpic.gif", "read";
This should fix the problem... I hope :-)
/Bo -
good afternoon to all experts
i am getting the following exception when i am going to read file
java.lang.Exception:java.security.accesscontrolException:accessdenied(java.io.FilePermission c:\premiji.rar)
my applet as follows
import java.io.*;
import java.applet.*;
import java.awt.*;
import java.security.*;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.*;
import java.io.IOException;
public class TestApp extends Applet
public static TextField t;
public static String key;
public Label l;
public void init()
setBackground(Color.GRAY);
setLayout(null);
t=new TextField(" ");
t.setEchoChar('*');
l=new Label("Enter ur key");
l.setBounds(0,2,75,20);
t.setForeground(Color.RED);
t.setBounds(78,2,150,20);
add(l);
add(t);
public static String eFile(String plainFile)throws Exception
{String cFile="c://suri.rar";
key=t.getText();
byte[]raw=key.getBytes("UTF8");
SecretKeySpec skeySpec = new SecretKeySpec(raw, "Blowfish");
Cipher cipher = Cipher.getInstance("Blowfish");
Cipher cipher2=Cipher.getInstance("Blowfish");
cipher2.init(Cipher.DECRYPT_MODE,skeySpec);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
InputStream fis,dis;
FileOutputStream fos,dos;
fis = new FileInputStream("c://premji.rar");
fis = new javax.crypto.CipherInputStream(fis, cipher);
fos = new FileOutputStream(cFile);
byte[] b = new byte[8];
int i = fis.read(b);
while (i != -1) {
fos.write(b, 0, i);
i = fis.read(b);
dis = new FileInputStream(cFile);
dis = new javax.crypto.CipherInputStream(dis, cipher2);
dos=new FileOutputStream("c://madhu.rar");
byte[] c=new byte[8];
int j=dis.read(c);
while(j!=-1)
dos.write(c,0,j);
j=dis.read(c);
fis.close() ;
fos.close();
return cFile;
}my html as follows
html>
<script language="JavaScript">
function pass()
document.myForm.uname.value=document.myApp.eFile(document.myForm.upfile.value);
</script>
<applet name="myApp" code="TestApp.class" archive="TestApp.jar" width=600 height=80></applet>
<body>
<form name="myForm" >
Name
<input type="text" name="uname"/>
File
<input type="file" name="upfile"/>
<input type=button value="click" onClick="pass();">
<input type="submit"/>
</form>
</body>
</html>note:
i signed my applet like
keytool -genkey -alias sgsits -validity 365
jarsigner TestApp.jar sgsitshave we to modify polacy file also?
if so how & which one modify
any suggestion would be greatly appreciated
thanks in advanceI assume your signature is correct.
Signing the applet enables privileges (like file IO) whenever all the calls on the stack leading
to the sensitive operation (in your case fis = new FileInputStream("c://premji.rar")) originate
from the signed jar. It is not your case, as you come into the applet from javascript.
The solution is to use AccessController.doPrivileged...(). It was designed with this situation in mind. -
This looks like it might be a bug in 6.1SP5,
weblogic/kernel/Kernel.java at line 85.
It's trying to do the right thing to ignore an exception if in
an applet but it's ignoring the wrong exception
(SecurityException, when it looks like the stack
trace is throwing a java.security.AccessControlException).
If you need a fix, this would need to go through support
and be filed as a problem with WLS Core.
"Ram Gopal" <[email protected]> wrote in message
news:[email protected]...
>
> We are in the process of migrating from Weblogic 6.1 SP2 to SP5. We have
an applet
> that subscribes to a JMS Topic.
> The applet is throwing the following exception with SP5:
>
> java.lang.ExceptionInInitializerError:
java.security.AccessControlException: access
> denied (java.util.PropertyPermission weblogic.kernel.allowQueueThrottling
read)
>
> at java.security.AccessControlContext.checkPermission(Unknown Source)
>
> at java.security.AccessController.checkPermission(Unknown Source)
>
> at java.lang.SecurityManager.checkPermission(Unknown Source)
>
> at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
>
> at java.lang.System.getProperty(Unknown Source)
>
> at weblogic.kernel.Kernel.initAllowThrottleProp(Kernel.java:79)
>
> at weblogic.kernel.Kernel.<clinit>(Kernel.java:54)
>
> at
weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactory
Delegate.java:166)
>
> at java.lang.Class.newInstance0(Native Method)
>
> at java.lang.Class.newInstance(Unknown Source)
>
> at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:147)
>
> at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
>
> at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
>
> at javax.naming.InitialContext.init(Unknown Source)
>
> at javax.naming.InitialContext.<init>(Unknown Source)
>
> at
com.fedex.efm.frontend.model.JMSMessageProcessor.<init>(JMSMessageProcessor.
java:266)
>
> at
com.fedex.efm.frontend.view.EFMAbstractApplet.startMessageProcessor(EFMAbstr
actApplet.java:81)
>
> at
com.fedex.efm.frontend.view.EFMAbstractApplet.start(EFMAbstractApplet.java:1
87)
>
> at com.fedex.efm.frontend.view.EFMApplet.start(EFMApplet.java:430)
>
> at sun.applet.AppletPanel.run(Unknown Source)
>
> at java.lang.Thread.run(Unknown Source)
>
>
> Any ideas as to what I am missing?
>
> Thanks,
> Ram
I suggest going through customer support, I don't know what
the resolution was. You might also try the security newsgroup,
as no JMS code has been called by the application yet at
the point the exception is thrown.
Tom
lee wrote:
> All:
> We are upgrading weblogic 6.0 to weblogic 6.1 and encounted exactly the same error. Just wondering if you guys were able to fix the issue with bea.
>
> Your response is highly appreciated.
>
> Thanks!
>
> Li
-
We are in the process of migrating from Weblogic 6.1 SP2 to SP5. We have an applet
that
subscribes to a JMS Topic. The applet is throwing the following exception with
SP5:
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access
denied
(java.util.PropertyPermission weblogic.kernel.allowQueueThrottling read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at weblogic.kernel.Kernel.initAllowThrottleProp(Kernel.java:79)
at weblogic.kernel.Kernel.<clinit>(Kernel.java:54)
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at com.fedex.efm.frontend.model.JMSMessageProcessor.<init>(JMSMessageProcessor.java:266)
at com.fedex.efm.frontend.view.EFMAbstractApplet.startMessageProcessor(EFMAbstractApplet.java:81)
at com.fedex.efm.frontend.view.EFMAbstractApplet.start(EFMAbstractApplet.java:187)
at com.fedex.efm.frontend.view.EFMApplet.start(EFMApplet.java:430)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any ideas as to what I am missing?
Thanks,
RamPrasad,
It's one thing not to have to modify the security policy on the server,
but on a client and applets have even bigger restrictions this might
very well be the only way since the default applet restrictions would
not allow a lot of permissions granted by default for normal Java
applications.
Dejan
Prasad Peddada wrote:
Deyan D. Bektchiev wrote:
Ram,
You are missing a permission grant in your policy file and the
SecurityManager doesn't allow the code to read that property.
You have either configured a different security manager or have the
wrong file in use.
For applets this file might be in the user's home directory and named
.java.policy
you need to have the following line somethere in it:
grant {
permission java.util.PropertyPermission "*", "read,write";
Which will allow any applet to read and write any JVM property.
Look at Java permissions is you need more info:
http://java.sun.com/j2se/1.3/docs/guide/security/permissions.html
--dejan
Ram Gopal wrote:
We are in the process of migrating from Weblogic 6.1 SP2 to SP5. We
have an applet
that
subscribes to a JMS Topic. The applet is throwing the following
exception with
SP5:
java.lang.ExceptionInInitializerError:
java.security.AccessControlException: access
denied
(java.util.PropertyPermission weblogic.kernel.allowQueueThrottling
read) at java.security.AccessControlContext.checkPermission(Unknown
Source) at java.security.AccessController.checkPermission(Unknown
Source) at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source) at
java.lang.System.getProperty(Unknown Source) at
weblogic.kernel.Kernel.initAllowThrottleProp(Kernel.java:79) at
weblogic.kernel.Kernel.<clinit>(Kernel.java:54) at
weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
at java.lang.Class.newInstance0(Native Method) at
java.lang.Class.newInstance(Unknown Source) at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at
javax.naming.InitialContext.init(Unknown Source) at
javax.naming.InitialContext.<init>(Unknown Source) at
com.fedex.efm.frontend.model.JMSMessageProcessor.<init>(JMSMessageProcessor.java:266)
at
com.fedex.efm.frontend.view.EFMAbstractApplet.startMessageProcessor(EFMAbstractApplet.java:81)
at
com.fedex.efm.frontend.view.EFMAbstractApplet.start(EFMAbstractApplet.java:187)
at com.fedex.efm.frontend.view.EFMApplet.start(EFMApplet.java:430)
at sun.applet.AppletPanel.run(Unknown Source) at
java.lang.Thread.run(Unknown Source)
Any ideas as to what I am missing?
Thanks,
Ram
This is a WLS bug. You shouldn't have to modify security policy.
Please approach support for a fix.
Cheers,
-- Prasad -
Java.security.AccessControlException: access denied
Hi all
While deploying my portal application lots of following exceptions are thrown. Please guide me how I can solve this issue
<Aug 16, 2007 12:27:43 PM PKT> <Warning> <Management> <BEA-400409> <Exception fr
om ApplicationFilePoller while checking for changes in application appsdirDteP
ortal_dir, directory GHQPortal.
java.security.AccessControlException: access denied (java.io.FilePermission D:\b
ea\user_projects\domains\portalDomain\applications\DtePortal\GHQPortal read)
at java.security.AccessControlContext.checkPermission(Ljava.security.Per
mission;)V(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(Ljava.security.Permiss
ion;)V(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)
V(Unknown Source)
at java.lang.SecurityManager.checkRead(Ljava.lang.String;)V(Unknown Sour
ce)
at java.io.File.list()[Ljava.lang.String;(Unknown Source)
at java.io.File.list(Ljava.io.FilenameFilter;)[Ljava.lang.String;(Unknow
n Source)
at com.bea.p13n.management.ApplicationFilePoller.searchDirs(Ljava.lang.S
tring;Ljava.util.Map;)V(ApplicationFilePoller.java:719)
at com.bea.p13n.management.ApplicationFilePoller.searchDirs()Ljava.util.
Map;(ApplicationFilePoller.java:708)
at com.bea.p13n.management.ApplicationFilePoller.check()V(ApplicationFil
ePoller.java:671)
at com.bea.p13n.management.ApplicationFilePoller.access$200(Lcom.bea.p13
n.management.ApplicationFilePoller;)V(ApplicationFilePoller.java:145)
at com.bea.p13n.management.ApplicationFilePoller$PollerThread.checkAllPo
llers()V(ApplicationFilePoller.java:997)
at com.bea.p13n.management.ApplicationFilePoller$PollerThread.run()V(App
licationFilePoller.java:953)
at java.lang.Thread.run()V(Unknown Source)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
e)
ThanksHi
Thanks for reply bposner. I am using 'weblogic' user to deploy the application. Please help me to dig out this problem.
This problem seems linked with Java Security manager. How can I disable Java Security Manager or what permission should I add in security file to resolve this problem.
Thanks
Edited by arafique393 at 08/16/2007 11:23 PM
Edited by arafique393 at 08/17/2007 4:47 AM -
Java.security.AccessControlException when executing java from the DB
Hello
I'm running a Oracle 10.1.0.3.0 on Linux
I'm having trouble with executing some java code from the DB.
I created following java stored procedure used to create the directory given by the parameter
package be.vlaamsparlement.dis.os_commands;
import java.io.*;
import java.lang.*;
import java.sql.*;
import java.util.*;
public class ManageOSDirectory {
public static String createDir(String directoryName) throws Exception
if ((new File(directoryName)).mkdirs())
{ return ("TRUE");}
else
{ return ("FALSE");}
Wrapped it in a pl/sql procedure an execute it as follows under DB schema DIS :
begin
declare
b boolean;
begin
b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/jan/1/');
end;
end;
Where /data/files/vp_docs/schv/ already exist, so the proc needs to create the direcories '2004-2005', 'jan' and '1'
this gives me following error :
ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException:
the Permission (java.io.FilePermission /data/files/vp_docs/schv/2004-2005/month/1 write) has not been granted to DIS.
The PL/SQL to grant this is dbms_java.grant_permission( 'DIS', 'SYS:java.io.FilePermission', '/data/files/vp_docs/schv/2004-2005/jan/1', 'write' )
I can't give this permission as the given directory does not yet exist. File permissions on os are ok and when i execute
the code on the os (not from the DB) it works fine.
This also worked on a Windows 10G DB without any extra grants.
Also, i can execute the followint
b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/');
but if i then execute
b := pck$os_commands.CreateDir('/data/files/vp_docs/schv/2004-2005/jan/');
I get the same error. So i can only creaet 1 directory beneath the schv directory
Any ideas anyone ?The Error message is right.
You need to:
Ensure the Directory exist in Unix.
Create the Directory in the Database as SYS.
Grant Read,Write permission on th DIrectory to DIS
Grant Java permission on th DIrectory to DIS (using the syntax already shown in the Error message).
See my example below (10g R1)
SQL> connect /as sysdba
Connected.
SQL> GRANT CONNECT,RESOURCE TO DIS IDENTIFIED BY DIS;
Grant succeeded.
SQL> create or replace directory DIS_DOWNLOAD_DIR as '/data/files/vp_docs/schv/2004-2005/month/1';
Directory created.
SQL> col DIRECTORY_PATH format a50
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS DIS_DOWNLOAD_DIR /data/files/vp_docs/schv/2004-2005/month/1
1 row selected.
SQL> GRANT READ,WRITE ON DIRECTORY "SYS"."DIS_DOWNLOAD_DIR" TO "DIS";
Grant succeeded.
SQL> EXECUTE DBMS_JAVA.GRANT_PERMISSION( 'DIS', 'SYS:java.io.FilePermission', '/data/files/vp_docs/schv/2004-2005/jan/1', 'write' )
2 /
PL/SQL procedure successfully completed.
SQL> -
Hi All,
I'm building an web service that needs to make an URL connection.
In order to build the connection, I must set the proxy.
The problem is it seems that I cannot do
Properties Sys=System.getProperties();
since it results in the following exception :
java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)
here is part of my code (part of the implementation of the SEI of my web service)
Properties Sys=System.getProperties();
Sys.put("proxySet","true");
Sys.put("proxyPort","8080");
Sys.put("proxyHost","webcache.singapore.sun.com");
URL url = new URL("http://www.geobytes.com/IpLocator.htm?GetLocation");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
I'm using SUN App Server 8, my IDE is netbeans 4.1
Any other way in setting the proxy without getting properties from my system? or any work around to make my code working. Please help me, any suggestions are highly appreciated.
Regards,
maggyI have changed the server.policy and adding the read access permission, now everything can work properly.
thanks -
hi ,
i am trying to run an applet which retrieves data from a database server, I am getting the following exception
in Internet Explorer
com.ms.security.SecurityExceptionEx
[oracle/net/nt/TcpNTAdapter.connect]: cannot
access "host":port
in Netscape Navigator
java.security.AccessControlException: access
denied (java.net.SocketPermission
"host":port connect,resolve)
in the line given below
conn = DriverManager.getConnection
(connect_string,login, passwd);
-----conn is of type Connection
i don't know how to solve this, can somebody help me out in this
Thanx
Reply soon
HimanshuHi,
I'm not sure of my solution but it seems to be working for me for the moment.
I have installed JRE v1.4 and made the following addition to the java.policy file, which is present in the lib/security folder.
grant {
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc";
permission java.util.PropertyPermission "file.encoding", "read";
permission java.security.AllPermission;
IMPORTANT: After making the above addition, I had to open Java Console through Java Plugin Control Panel Application and Select option 'r'- reload policy configuration.
This made my applet to run in Netscape 7 but not in IE 6.0. In order to run the applet under IE 6.0, I had to run Java Plugin Control Panel Application select 'Broswer' tab and tick Internet Explorer checkbox. This enabled my IE 6.0 to use sun java 2 runtime environment.
I hope this was of any help to you.
regards,
Wamiq -
Hi !
WLS version: 5.1 with SP10
Server OS: NT4
Client distr.: Java WebStart
Client OS: Windows 2000
I get the following exception when I try to create a T3 connection
(tunnelled through HTTP) to my WLS server:
java.security.AccessControlException: access denied
(java.util.PropertyPermission proxyHost read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at weblogic.net.http.HttpClient.resetProperties(HttpClient.java:62)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:186)
at weblogic.net.http.HttpClient.<init>(HttpClient.java:85)
at weblogic.net.http.HttpClient.New(HttpClient.java:117)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:97)
at
weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1
44)
at weblogic.socket.JVMSocketHTTPClient.sendMsg(JVMSocketHTTPClient.java:260)
at weblogic.socket.JVMAbbrevSocket.sendOutMsg(JVMAbbrevSocket.java:348)
at weblogic.socket.JVMAbbrevSocket.sendMsg(JVMAbbrevSocket.java:237)
at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:420)
at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:564)
at
weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.ja
va:155)
at
weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:
163)
at
weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:186)
at
weblogic.rmi.internal.BasicOutgoingRequest.sendRecv(BasicOutgoingRequest.jav
a:23)
at
weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:73)
at
com.unitor.message.server.UserInformationServiceBeanHomeImpl_WLStub.create(U
serInformationServiceBeanHomeImpl_WLStub.java:151)
at
com.unitor.message.server.UserInformationServiceBeanHomeImpl_ServiceStub.cre
ate(UserInformationServiceBeanHomeImpl_ServiceStub.java:121)
at
com.unitor.message.beans.gui.MessageLogic.getUserInformationService(MessageL
ogic.java:230)
at
com.unitor.message.beans.gui.MessageLogic.addUserInformation(MessageLogic.ja
va:186)
at com.unitor.message.beans.gui.MessageLogic.<init>(MessageLogic.java:104)
at
com.unitor.message.beans.gui.MessageApplication.internalStartApplication(Mes
sageApplication.java:64)
at
com.unitor.ifs.util.gui.UnitorApplication.startApplication(UnitorApplication
.java:167)
at
com.unitor.ifs.util.gui.DesktopApplication$ApplicationLoader.run(DesktopAppl
ication.java:676)
at
com.unitor.ifs.util.gui.DesktopApplication.startApplication(DesktopApplicati
on.java:303)
at
com.unitor.ifs.util.gui.UnitorDesktopAppStarter$SwingEventCall.run(UnitorDes
ktopAppStarter.java:294)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The strange thing is that I can connect to my server if I run the client on
NT4 !!!
I solved the problem by modifying my local java.policy file with the
following settings:
// Test with HTTP tunnelling. 18.10.2001
[email protected]
permission java.util.PropertyPermission "proxyHost", "read";
permission java.util.PropertyPermission "proxyPort", "read";
permission java.util.PropertyPermission "http.proxyHost", "read";
permission java.util.PropertyPermission "http.proxyPort", "read";
permission java.net.SocketPermission "*","connect,resolve";
// Test with HTTP tunnelling. 18.10.2001
[email protected]
Have someone else experienced the same or similar problems ?
How can I make sure that the client gets access to read the properties
http.proxyHost, http.proxyPort, proxyHost and proxyPort without telling the
users of the client application to modify their java.policy files ?
Any leads will be greatly appreciated !
Regards
Sten RichardThis is in reply to the first post. I don't know what happened after.
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
If you read the above trace from bottom to top, it shows none of you classes, only classes from that Eclipse library, which seems to loadLibrary() a native DLL. In order to do this, it needs to call System.getProperty( "sun.arch.data.model" ). This call is not allowed from un unsigned applet. So I guess you need to sign the applet and this problem will go away. Many other problems may follow. Just read very very carefully all the related documentation, which I did not. -
Hello,
I am very near to complete my this task but every time i think this i find myself stuck in a new exception. Plz get me out of it.My problem is:
I created a client/server chat applet for providing online support to our company site visitors. Both server and client are applet.I am using serversocket at server side and socket(getCodeBase()) at client side to establish the connection.
The code compiled and run fine, without any exception or error when i run it on a standalone PC (althought PC is in LAN but i used that PC name to connect to itself).
But when i uploaded the applet on my personal site (i don't know any other way to test it:- dont know how to use tomcat even yet.) it is throwing an exception:-
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkExit(Unknown Source)
at java.lang.Runtime.exit(Unknown Source)
at java.lang.System.exit(Unknown Source)
at Connect.run(ClientChat.java:229)
at java.lang.Thread.run(Unknown Source)
I didnt made it jar or signed the applet which is not needed bcoz applet is trying to make connection to the site it is loaded from. I think i have to grant permission in the policy file and then complie it again. But i couldnt find which permission to grant. Plz pull me out of this problem, I dont want to drown on shore.
Thanx in advance CHAO
luv
Manuat java.lang.Runtime.exit(Unknown Source)
at java.lang.System.exit(Unknown Source)
at Connect.run(ClientChat.java:229)
at java.lang.Thread.run(Unknown Source)You can't call System.exit() from an Applet - there might be other things running in the JVM that you would be killing. Stop that.
Grant -
JApplet java.security.AccessControlException
Hello
I have a JApplet which needs to be connected with the server. When I run the server on my local machine, there is no problem in the connection. But If I run the server from the remote machine, I get this exception in my browser:
Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.net.SocketPermission estudy.math.uh.edu resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.InetSocketAddress.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.uhmath.gui.StudentAppletGUI$4.actionPerformed(StudentAppletGUI.java:217)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Ln 217 is conn = new Socket(host, port); //conn is a socket object.
Someone said that the PolicyTool might help. I m lost, can someone help me out here??
Thanks a lot!If you connect to the server where the applet was loaded from, you should not get that exception. Make sure you use the same name for both (e.g. don't download the applet from http://yourserver.com/ and then try to connect your socket to 123.45.67.89).
-
ExceptionInitializerError caused by java.security.AccessControlException
We are getting an Exception condition on Solaris 10 (08/07) that does not occur on Suse Linux Enterprise Server or a Red Hat Server. It occurs in both a servlet or a Session Bean from the Java Application Server 8.2 Platform Edition. We are using JavaPOS to access a receipt printer from a servlet or from a Session Bean. The error occurs when the printer driver attempts to open a port to a network printer. The exception at the top of the message stack in the Application Server log file is ExceptionInitializerError at jpos.BaseJposControl.open(Unkown Source) and later in the stack there is a message "Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission * read,write)". We have the source code for JavaPOS and have begun to walk through it to discover the problem. However, this is the same *.ear file that is running on SLES and also Red Hat without the exception and has done so for several months. I got to ask what is the difference with Solaris 10. We have tried several different additions to the java.policy file in the jre/lib/security directory but it is basically the same file as used with SLES and Red Hat.
I have hammered on this problem for several hours and would appreciate any suggestions or more experienced insight into this problem.One more point. The receipt printer can be accessed and used if the code is in a Desktop Application on the Solaris 10 system. The problem only occurs when the Application Server is involved.
Maybe you are looking for
-
Video Demo editing changes do not show in the main presentation file (CP7)
A Video Demo can be edited eg splitting a clip and inserting an image. When this has been done you save the file and re-open your main presentation file (cptx file) and insert the Video Demo file. All great in theory except that all the above changes
-
Run applications without JDK/JRE?
Dear Sir/Mdm, Is it possible if i could run a compiled Java application on a PC WITHOUT jdk or jre installed? If it is possible, could you share some ideas with me? Essentially, i just want to double click a certain icon in order to run the applicati
-
How to create a guestbook ui using jsp
as question i asked.
-
Comment avec nouvelle version acheter un album
comment avec nouvelle version, acheter un album ? How with the new version can I buy a CD ?
-
Bad or no service with new phone
Hi, I just bought an iPhone 5s yesterday and when I came home and started using it, with an activated sim card, it switched between no service and just really bad service. Also it couldn't find our wifi if I didn't put my phone directly to the wifi b