EntrySet has private access in java.util.Hashtable

Hi friends,
While i try to retrieve the data from the hashtable through a JSP page, i'm getting the error saying "E:\Tomcat 5.0\work\Catalina\localhost\dd\org\apache\jsp\disp_jsp.java:55: entrySet has private access in java.util.Hashtable
Iterator i = h.entrySet.iterator();
For your reference the code goes like this,
<% Hashtable h = (Hashtable) session.getAttribute("hash");
Iterator i = h.entrySet.iterator();
while(i.hasNext())
%>
<tr><td>
<% String st = i.next().toString();
String k[] = st.split("=");     
out.println(k[0]); %>
</td><td><%
out.println(k[1]); %></td></tr><% } %>
can anyone tell me how to get rid of this error quickly please.. Thanks in advance...
Regards,
Prakash.

Iterator i = h.entrySet.iterator();Iterator i = h.entrySet().iterator();

Similar Messages

  • Problems with protected access in java.util.vector

    Hi,
    basically i'm trying to use the method removeRange(int,int) of class Vector from the java API.
    I keep getting the following compiler message:
    removeRange(int,int) has protected access in java.util.vector.
    This seems rather vague, and i don't know quite what to do?
    Thanks in advance

    removeRange(int,int) has protected access in java.util.vector.
    This seems rather vague, and i don't know quite what to do?As error messages go, that's pretty clear: method removeRange is a protected method and you can only call public ones of Vector, right? You can always combine subList and clear:
    vec.subList(fromIndex, toIndex).claer();

  • NullpointerException in java.util.Hashtable.access$100 ???

    Hi folks.
    I am trying to reconstruct a Hashtable using my own way of serialization/deserialization via Java Reflection. It works fine with most classes, but a reconstructed hashtable is seriously screwed up. After reconstruction, it is passed as an argument to a class that uses the putAll-Method, which causes a NullpointerException.
    The root in the stack trace is java.util.Hashtable.access$100 at line 90 in java.util.Hashtable. Unfortunately, if you check the source of hashtable, you will only find the class header on this line.
    Is it correct, that javac creates access-methods for inner classes? What are they used for?
    Any idea what could cause this?

    The exception happens whenever I try methods like toString, putAll or hashCode on the hashtable. The code of the deserialization is just a bit to complex to post here.
    I have been able to track the problem down to the internal creation of creation of an iterator by the hashtable.
    Here is the stack trace:
    Exception in thread "main" java.lang.NullPointerException
    at java.util.Hashtable.access$100(Hashtable.java:90)
    at java.util.Hashtable$EntrySet.iterator(Hashtable.java:592)
    at java.util.Collections$SynchronizedCollection.iterator(Collections.java:1096)
    at java.util.Hashtable.hashCode(Hashtable.java:728)
    at java.util.Hashtable.get(Hashtable.java:315)
    at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:205)
    at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:178)
    at mypackage.serializer.XMLSerializer.main(XMLSerializer.java:66)

  • Trying to access an object's field but it has private access ! !

    Dear People,
    I am trying to access the highestBid, a data member of the Bid class
    in an Auction program.
    If I try to set the highestBid:
    bicycle.setHighestBid(steveBicycleBid);
    The error message says:
    "TryAuction.java": Error #: 306 : method setHighestBid(stan_bluej_ch4p90.Bid) has private access in class stan_bluej_ch4p90.Lot at line 58, column 15
    IF I try to get the highest bid by saying:
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    I get an object hex address as seen below instead of an integer value:
    The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    ^^^
    Below are the classes
    Thank you in advance
    stan
    package stan_bluej_ch4p90;
    //Purpose of project: To demonstrate collections of objects
    //Version: 2001.05.31
    //How to start this project:
    // Create an Auction object.
    // Enter a few lots via its enterLot method. Only String
    // descriptions of the lots are required.
    // Create one or more Person objects to represent bidders.
    // Show the lots and select one to bid for.
    // Get the required Lot onto the object bench.
    // Enter a bid for the lot, passing the Person who is
    // bidding to the bidFor method.
    public class TryAuction
    public static void main(String[] args)
    //create the auction
    Auction cityAuction = new Auction();
    //create the lots for sale
    Lot bicycle = new Lot(1,"bicycle");
    Lot lamp = new Lot(2, "lamp");
    Lot trailer = new Lot(3, "trailer");
    //enter the lots into the city Auction
    cityAuction.enterLot("A bicycle in so so condition");
    cityAuction.enterLot("A brand new lamp");
    cityAuction.enterLot("A trailer built in 2001");
    //show the lots
    System.out.println();
    System.out.println("The first lot for sale: " + bicycle.getDescription());
    System.out.println("The second lot for sale: " + lamp.getDescription());
    System.out.println("The third lot for sale: " + trailer.getDescription());
    //create the people who will bid for the lots
    Person Steve = new Person("Steve");
    Person Maria = new Person("Maria");
    //create the people's bids
    Bid mariaLampBid = new Bid(Maria, 460);
    Bid steveLampBid = new Bid(Steve, 510);
    //create the people's bids
    Bid mariaBicycleBid = new Bid(Maria, 1460);
    Bid steveBicycleBid = new Bid(Steve, 1510);
    //create the people's bids
    Bid steveTrailerBid = new Bid(Steve, 700510);
    Bid mariaTrailerBid = new Bid(Maria, 900460);
    //give the bids
    bicycle.bidFor(Maria,1460);
    bicycle.bidFor(Steve, 1510);
    //bicycle.setHighestBid(steveBicycleBid);
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    lamp.bidFor(Maria,460);
    lamp.bidFor(Steve,510);
    trailer.bidFor(Steve, 700510);
    trailer.bidFor(Maria,900460);
    System.out.println(" \nMaria's bicycle bid is : " + mariaBicycleBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveBicycleBid.getValue() );
    System.out.println(" \nMaria's lamp bid is : " + mariaLampBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveLampBid.getValue() );
    System.out.println("\nSteve's trailer bid is : " + steveTrailerBid.getValue() );
    System.out.println(" Maria's trailer bid is : " + mariaTrailerBid.getValue() );
    System.out.println();
    cityAuction.showLots();
    //cityAuction.close();
    //The output I get is:
    //The first lot for sale: bicycle
    //The second lot for sale: lamp
    //The third lot for sale: trailer
    //The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    //Maria's bicycle bid is : 1460
    //Steve's lamp bid is : 1510
    //Maria's lamp bid is : 460
    //Steve's lamp bid is : 510
    //Steve's trailer bid is : 700510
    // Maria's trailer bid is : 900460
    //1: A bicycle in so so condition
    // (No bid)
    //2: A brand new lamp
    // (No bid)
    //3: A trailer built in 2001
    // (No bid)
    package stan_bluej_ch4p90;
    import java.util.*;
    //Ex4.14
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Auction
    // The list of Lots in this auction.
    private ArrayList lots;
    // The number that will be given to the next lot entered
    // into this auction.
    private int nextLotNumber;
    * Create a new auction.
    public Auction()
         lots = new ArrayList();
         nextLotNumber = 1;
    * Enter a new lot into the auction.
    * Lots can only by entered into the auction by an
    * Auction object.
    * @param description A description of the lot.
    public void enterLot(String description)
         lots.add(new Lot(nextLotNumber, description));
         nextLotNumber++;
    * Show the full list of lot numbers and lot descriptions in
    * this auction. Include any details of the highest bids.
    public void showLots()
         Iterator it = lots.iterator();
         while(it.hasNext()) {
         Lot lot = (Lot) it.next();
         System.out.println(lot.getNumber() + ": " +
                   lot.getDescription());
         // Include any details of a highest bid.
         Bid highestBid = lot.getHighestBid();
         if(highestBid != null) {
              System.out.println(" Bid: " +
                        highestBid.getValue());
         else {
              System.out.println(" (No bid)");
    * Return the lot with the given number. Return null
    * if a lot with this number does not exist.
    * @param number The number of the lot to return.
    public Lot getLot(int number)
         if((number >= 1) && (number < nextLotNumber)) {
         // The number seems to be reasonable.
         Lot selectedLot = (Lot) lots.get(number-1);
         // Include a confidence check to be sure we have the
         // right lot.
         if(selectedLot.getNumber() != number) {
              System.out.println("Internal error: " +
                        "Wrong lot returned. " +
                        "Number: " + number);
         return selectedLot;
         else {
         System.out.println("Lot number: " + number + " does not exist.");
         return null;
    // public void close()
    // Iterator i = lots.iterator();
    // while(i.hasNext())
    //     System.out.println("The winning amount for the " + bicycle.getDescription()
    //     + " is " + bicycle.getHighestBid());
    //     System.out.println("The winning amount for the " + lamp.getDescription()
    //     + " is " + lamp.getHighestBid());
    //     System.out.println("The winning amount for the " + trailer.getDescription()
    //     + " is " + trailer.getHighestBid());
    package stan_bluej_ch4p90;
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Lot
    // A unique identifying number.
    private final int number;
    // A description of the lot.
    private String description;
    // The current highest bid for this lot.
    private Bid highestBid;
    * Construct a Lot, setting its number and description.
    * @param number The lot number.
    * @param description A description of this lot.
    public Lot(int number, String description)
         this.number = number;
         this.description = description;
    * Attempt to bid for this lot. A successful bid
    * must have a value higher than any existing bid.
    * @param bidder Who is bidding.
    * @param value The value of the bid.
    public void bidFor(Person bidder, long value)
         // We trust that lot is genuine. There is nothing to
         // prevent a spurious lot from being bid for, but it
         // would not appear in the auction list.
         if((highestBid == null) ||
         (highestBid.getValue() < value)) {
         // This bid is the best so far.
         setHighestBid(new Bid(bidder, value));
         else {
         System.out.println("\nLot number: " + getNumber() +
                   " (" + getDescription() + ")" +
                   " has a bid of: " +
                   highestBid.getValue());
    * @return The lot's number.
    public int getNumber()
         return number;
    * @return The lot's description.
    public String getDescription()
         return description;
    * @return The highest bid for this lot. This could be null if
    * there are no current bids.
    public Bid getHighestBid()
         return highestBid;
    * @param highestBid The new highest bid.
    private void setHighestBid(Bid highestBid)
         this.highestBid = highestBid;
    package stan_bluej_ch4p90;
    * A class that models an auction bid. The bid contains a reference
    * to the Lot bid for and the user making the bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Bid
    // The user making the bid.
    private final Person bidder;
    // The value of the bid. This could be a large number so
    // the long type has been used.
    private final long value;
    * Create a bid.
    * @param bidder Who is bidding for the lot.
    * @param value The value of the bid.
    public Bid(Person bidder, long value)
         this.bidder = bidder;
         this.value = value;
    * @return The bidder.
    public Person getBidder()
         return bidder;
    * @return The value of the bid.
    public long getValue()
         return value;
    package stan_bluej_ch4p90;
    * Maintain details of someone who participates in an auction.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Person
    // The name of this user.
    private final String name;
    * Create a new user with the given name.
    * @param name The user's name.
    public Person(String name)
         this.name = name;
    * @return The user's name.
    public String getName()
         return name;
    if I try to say
    LotObjectName.getHighestBid, I get a

    Dear EsoralTrebor,
    Thank you very much for an enlightening explanation.
    I had never tried to chain methods together before but it works !
    anObject.methodOfTheObjectClassThatReturnsAnObjectOfAnotherClass.
    methodOfTheObjectClassThatWasReturned();
    my output correctly states:
    The highest bid for the bicycle is 1510
    The highest bid for the lamp is 510
    The highest bid for the trailer is 900460
    Thank you !
    Stan
    ps tomorrow I need to study the showLots() method in the Auction class
    to figure out why that method is saying "No Bid" to everything
    Have a Good Thanksgiving !

  • HOW TO SET  VARIABLE WHEN METHOD HAS PRIVATE ACCESS ? ?

    Dear People,
    When I try to use an if then else statement the if part is not executed
    only the else
    if(highestBid != null)
    System.out.println( Bid is: + highestBid.getValue());
    else
    System.out.println(" (no bid) )";
    which can only mean that "highestBid is not being set
    but since "Class Lot" has a private method
    private void setHighestBid(Bid highestBid)
    this.highestBid = highestBid;
    the error message says:
    "TryAuction.java": Error method setHighestBid()
    has private access in class
    so how do I get a value to "highestBid" so the "if" statement
    will have a vaule for "highestBid ?
    the showLots() method in the Class "Auction" doesn't print out the bids !
    below are the classes
    thank you in advance
    Stan
    package stan_bluej_ch4p90;
    //Purpose of project: To demonstrate collections of objects
    //Version: 2001.05.31
    //How to start this project:
    // Create an Auction object.
    // Enter a few lots via its enterLot method. Only String
    // descriptions of the lots are required.
    // Create one or more Person objects to represent bidders.
    // Show the lots and select one to bid for.
    // Get the required Lot onto the object bench.
    // Enter a bid for the lot, passing the Person who is
    // bidding to the bidFor method.
    public class TryAuction
    public static void main(String[] args)
    //create the auction
    Auction cityAuction = new Auction();
    //create the lots for sale
    Lot bicycle = new Lot(1,"bicycle");
    Lot lamp = new Lot(2, "lamp");
    Lot trailer = new Lot(3, "trailer");
    //enter the lots into the city Auction
    cityAuction.enterLot("A bicycle in so so condition");
    cityAuction.enterLot("A brand new lamp");
    cityAuction.enterLot("A trailer built in 2001");
    //show the lots
    System.out.println();
    System.out.println("The first lot for sale: " + bicycle.getDescription());
    System.out.println("The second lot for sale: " + lamp.getDescription());
    System.out.println("The third lot for sale: " + trailer.getDescription());
    //create the people who will bid for the lots
    Person Steve = new Person("Steve");
    Person Maria = new Person("Maria");
    //create the people's bids
    Bid mariaLampBid = new Bid(Maria, 460);
    lamp.setHighestBid(mariaLampBid);
    Bid steveLampBid = new Bid(Steve, 510);
    //create the people's bids
    Bid mariaBicycleBid = new Bid(Maria, 1460);
    //bicycle.setHighestBid(mariaBicycleBid);
    Bid steveBicycleBid = new Bid(Steve, 1510);
    //create the people's bids
    Bid steveTrailerBid = new Bid(Steve, 700510);
    //trailer.setHighestBid(steveTrailerBid);
    Bid mariaTrailerBid = new Bid(Maria, 900460);
    //give the bids
    bicycle.bidFor(Maria,1460);
    bicycle.bidFor(Steve, 1510);
    System.out.println("The highest bid for the bicycle is " + bicycle.getHighestBid().getValue() );
    lamp.bidFor(Maria,460);
    lamp.bidFor(Steve,510);
    System.out.println("The highest bid for the lamp is " + lamp.getHighestBid().getValue() );
    trailer.bidFor(Steve, 700510);
    trailer.bidFor(Maria,900460);
    System.out.println("The highest bid for the trailer is " + trailer.getHighestBid().getValue() );
    System.out.println(" \nMaria's bicycle bid is : " + mariaBicycleBid.getValue() );
    System.out.println("Steve's bicycle bid is : " + steveBicycleBid.getValue() );
    System.out.println(" \nMaria's lamp bid is : " + mariaLampBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveLampBid.getValue() );
    System.out.println("\nSteve's trailer bid is : " + steveTrailerBid.getValue() );
    System.out.println(" Maria's trailer bid is : " + mariaTrailerBid.getValue() );
    System.out.println();
    cityAuction.showLots();
    //cityAuction.close();
    //The output I get is:
    //The first lot for sale: bicycle
    //The second lot for sale: lamp
    //The third lot for sale: trailer
    //The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    //Maria's bicycle bid is : 1460
    //Steve's lamp bid is : 1510
    //Maria's lamp bid is : 460
    //Steve's lamp bid is : 510
    //Steve's trailer bid is : 700510
    // Maria's trailer bid is : 900460
    //1: A bicycle in so so condition
    // (No bid)
    //2: A brand new lamp
    // (No bid)
    //3: A trailer built in 2001
    // (No bid)
    package stan_bluej_ch4p90;
    import java.util.*;
    //Ex4.14
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Auction
    // The list of Lots in this auction.
    private ArrayList lots;
    // The number that will be given to the next lot entered
    // into this auction.
    private int nextLotNumber;
    * Create a new auction.
    public Auction()
         lots = new ArrayList();
         nextLotNumber = 1;
    * Enter a new lot into the auction.
    * Lots can only by entered into the auction by an
    * Auction object.
    * @param description A description of the lot.
    public void enterLot(String description)
         lots.add(new Lot(nextLotNumber, description));
         nextLotNumber++;
    * Show the full list of lot numbers and lot descriptions in
    * this auction. Include any details of the highest bids.
    public void showLots()
         Iterator it = lots.iterator();
         while(it.hasNext()) {
         Lot lot = (Lot) it.next();
         System.out.println(lot.getNumber() + ": " +
                   lot.getDescription());
         // Include any details of a highest bid.
         Bid highestBid = lot.getHighestBid();
         if(highestBid != null) {
              System.out.println(" Highest Bid: " +
                        highestBid.getValue());
         else {
              System.out.println(" (No bid)");
    * Return the lot with the given number. Return null
    * if a lot with this number does not exist.
    * @param number The number of the lot to return.
    public Lot getLot(int number)
         if((number >= 1) && (number < nextLotNumber)) {
         // The number seems to be reasonable.
         Lot selectedLot = (Lot) lots.get(number-1);
         // Include a confidence check to be sure we have the
         // right lot.
         if(selectedLot.getNumber() != number) {
              System.out.println("Internal error: " +
                        "Wrong lot returned. " +
                        "Number: " + number);
         return selectedLot;
         else {
         System.out.println("Lot number: " + number + " does not exist.");
         return null;
    // public void close()
    // Iterator i = lots.iterator();
    // while(i.hasNext())
    //     System.out.println("The winning amount for the " + bicycle.getDescription()
    //     + " is " + bicycle.getHighestBid());
    //     System.out.println("The winning amount for the " + lamp.getDescription()
    //     + " is " + lamp.getHighestBid());
    //     System.out.println("The winning amount for the " + trailer.getDescription()
    //     + " is " + trailer.getHighestBid());
    package stan_bluej_ch4p90;
    * A class that models an auction bid. The bid contains a reference
    * to the Lot bid for and the user making the bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Bid
    // The user making the bid.
    private final Person bidder;
    // The value of the bid. This could be a large number so
    // the long type has been used.
    private final long value;
    * Create a bid.
    * @param bidder Who is bidding for the lot.
    * @param value The value of the bid.
    public Bid(Person bidder, long value)
         this.bidder = bidder;
         this.value = value;
    * @return The bidder.
    public Person getBidder()
         return bidder;
    * @return The value of the bid.
    public long getValue()
         return value;
    package stan_bluej_ch4p90;
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Lot
    // A unique identifying number.
    private final int number;
    // A description of the lot.
    private String description;
    // The current highest bid for this lot.
    private Bid highestBid;
    * Construct a Lot, setting its number and description.
    * @param number The lot number.
    * @param description A description of this lot.
    public Lot(int number, String description)
         this.number = number;
         this.description = description;
    * Attempt to bid for this lot. A successful bid
    * must have a value higher than any existing bid.
    * @param bidder Who is bidding.
    * @param value The value of the bid.
    public void bidFor(Person bidder, long value)
         // We trust that lot is genuine. There is nothing to
         // prevent a spurious lot from being bid for, but it
         // would not appear in the auction list.
         if((highestBid == null) ||
         (highestBid.getValue() < value)) {
         // This bid is the best so far.
         setHighestBid(new Bid(bidder, value));
         else {
         System.out.println("\nLot number: " + getNumber() +
                   " (" + getDescription() + ")" +
                   " has a bid of: " +
                   highestBid.getValue());
    * @return The lot's number.
    public int getNumber()
         return number;
    * @return The lot's description.
    public String getDescription()
         return description;
    * @return The highest bid for this lot. This could be null if
    * there are no current bids.
    public Bid getHighestBid()
         return highestBid;
    * @param highestBid The new highest bid.
    private void setHighestBid(Bid highestBid)
         this.highestBid = highestBid;
    package stan_bluej_ch4p90;
    * Maintain details of someone who participates in an auction.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Person
    // The name of this user.
    private final String name;
    * Create a new user with the given name.
    * @param name The user's name.
    public Person(String name)
         this.name = name;
    * @return The user's name.
    public String getName()
         return name;

    Are you ready to kick yourself? The problem lies in the class Auction. You are using showLots() to print the lots, which you are trying to show the lot number, the description and the highest bid. But no there is no where in the class where you set the highest bid. In enterLot() you pass the description of the lot and it creates a new lot with the lot number and the description, but you don't give a bid. Then after the bids are done you do not update Auction to reflect the bids. Let the kicking commence. :-)

  • Mapping java.util.hashtable

    Hello all
    I have a requirement of mapping java.util.hashtable to Oracle9i database. I read on the application developers guide that this type can not be mapped through the Workbench GUI and you need to write code for it.
    I followed the example code as below
    DirectMapMapping directMapMapping = new DirectMapMapping();
    directMapMapping.setAttributeName("..");
    directMapMapping.setReferenceTableName("..");
    directMapMapping.setReferenceKeyFieldName("..");
    directMapMapping.setDirectKeyFieldName("..");
    directMapMapping.setDirectFieldName("..");
    directMapMapping.setKeyClass(String.class);
    directMapMapping.setValueClass(Integer.class);
    descriptor.addMapping(directMapMapping);
    The insertion to the database went very well but while retriving the data from the database i am getting the following error.
    Exception Description: Trying to set value [[DatabaseRow(
         DUMMYTABLE.KEYVALUE => 100
         KEYNAME => 1), DatabaseRow(
         DUMMYTABLE.KEYVALUE => 200
         KEYNAME => 2)]] for instance variable [dummyTable] of type [java.util.Hashtable] in the object. The specified object is not an instance of the class or interface declaring the underlying field, or an unwrapping conversion has failed.
    If any one has any idea, please let me know.
    Thanks in Advance

    Which version/patch is this running? I don't know of any specific bugs to this, but there have been a couple of minor seemingly-unrelated fixes to DirectMapMapping, but sometimes they're more related than you think.
    The exception is saying the types aren't matching up. You are 100% sure the attribute you're mapping to is a java.util.Hashtable? It shouldn't be necessary, but you might want to call directMapMapping.useMapClass(java.util.Hashtable.class);
    - Don

  • Re: java.security.AccessControlException: access denied (java.util.PropertyPermission weblogic.kernel.allowQueueThrottling read)

    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
              

  • Error: Unsupported Object java.util.Hashtable

    Hi,
    I am getting Uncategorized SQL exception for my code:
    The error is:
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select distinct table_desc from TABLE order by table_desc where   month = ?  and year = ? ]; SQL state [HY000]; error code [857]; [NCR][Teradata JDBC Driver]:PreparedStatement.setObject: Unsupported Object java.util.Hashtable ; nested exception is java.sql.SQLException: [NCR][Teradata JDBC Driver]:PreparedStatement.setObject: Unsupported Object java.util.Hashtable
    Here is the code
    public class ABC {  
    private static final String MYDATE = "  month = ?  and year = ? ";
    public List<String> getTables(Report report) {
              List<String> tables =  new ArrayList<String>();
              JdbcTemplate template = new JdbcTemplate( dataSource );          
              Object sqlParameters[] = null;
              sqlParameters = new Object[]{ getMonthAndYear( report ) };
              String sql = "select distinct table_description from TABLE " +
              " order by table_description where ";
              tables= template.queryForList(sql + MYDATE,sqlParameters);          //the error is throwing on this line     
              return( tables);
    private Map<Integer, Integer> getMonthAndYear( Report report ) {
          Calendar today = Calendar.getInstance();
          Map<Integer, Integer> monthYear = new Hashtable<Integer, Integer>();     
          monthYear.put( Calendar.MONTH, today.get( Calendar.MONTH ) );
          monthYear.put( Calendar.YEAR, today.get( Calendar.YEAR ) );        
            System.out.println("monthYear :"+monthYear);//this prints monthYear :{2=10, 1=2008}
            return( monthYear );
    }Can anybody help me solve it? It's something to do with the parameters I am getting back...
    I will appreciate your help,
    Thanks in advance...

    evnafets wrote:
    What do you expect it to do with your "parameters"?
    You are using a [Spring JdbcTemplate|http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/jdbc/core/JdbcTemplate.html#queryForList(java.lang.String,%20java.lang.Object[])]
    What should the where clause of your sql query be?
    Why do you think this would accept parameters in a Map<Integer, Integer> ?The parameters would restrict the result I will get with my query, i have to bound with month and year constraint as part of requirements.
    The Where clause would be : where month = ? and year = ? ( which could be month = 10 and year = 2008)
    I am using Map<Integer, Integer> because in database these month and year values are numeric...
    But I don't know what it doesn't like it?
    Any idea?
    Edited by: ASH_2007 on Nov 11, 2008 1:36 PM

  • Has private access in mudclient

    Alright, i've been getting on this error on every int I try to pull from the mudclient:
    .\Script.java:19: dgf has private access in mudclient
                    rs.dfm[0] = rs.dgf[idx].gmi;
                                  ^
    .\Script.java:20: djk has private access in mudclient
                    rs.djk[0] = rs.dgf[idx].gmf;
                      ^
    .\Script.java:20: dgf has private access in mudclient
                    rs.djk[0] = rs.dgf[idx].gmf;
                                  ^
    .\Script.java:21: emg(int) has private access in mudclient
                    rs.emg(0);
    etc.here is what I have in script.java
    public void AN(int idx) {
    public abstract class Script
        protected mudclient rs;
        public Script(mudclient rs)
            this.rs = rs;
        public void start(String command, String parameters[])
        public String[] getCommands()
            return new String[0];
         public void AN(int idx) {
                      rs.dga[0] = 715;
                     rs.dfl[0] = rs.dgf[idx].gmh;
                     rs.dfm[0] = rs.dgf[idx].gmi;
                     rs.djk[0] = rs.dgf[idx].gmf;
                rs.emg(0);
    }Not quite sure wich wich java version I have, but I've tryed to compile with an online compilier that uses 1.5.0, and i still got the same errors... any help is appreciated :)

    This means the arrays inside mudclient are private and cannot be access inside Script.
    rs can be accessed but not the variables inside it.
    You should not be trying to do this in any case. Try to write your code so that variables are only accessed by methods in the same class.

  • Java.security.AccessControlException: access denied (java.util.PropertyPerm

    Hi All,
    I try to run an applet from Solaris 8 server on some client machine using IE5 and NetScape 6.2 ( I installed JRE 1.4, I also try other JRE versions) but I get the following errors again and agian,
    I even try to use appletviewer on the Solaris Box itself to open the applet but it makes no difference same errors
    could somebody please help or give me a hint how should I start tracing what the problem might be ?
    this applet comes with Solaris Bandwidth Manager as a gui administration tool ( webbased ) it supposed to change the configurations remotly over the web. I asure there is no solaris permission problem exist.
    I use Tomcat on the server side.Installed JDK 1.3 on Solaris 8 with all the default settings.
    i suppose something should be done with java.policy or java.security files i know nothing about java security please at least give me some URL's to find out more about this matter i searched a lot but couldn't find good documents about java default security restrictions
    java.lang.ExceptionInInitializerError
    at com.sun.ba.common.QConfiguration.loadPredefServices(QConfiguration.java:617)
    at com.sun.ba.common.QConfiguration.getPredefServices(QConfiguration.java:630)
    at com.sun.ba.tool.MainPanel.<init>(MainPanel.java:95)
    at com.sun.ba.tool.QoSFrame.<init>(QoSFrame.java:48)
    at com.sun.ba.tool.baApplet.init(baApplet.java:46)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission console 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 com.sun.ba.common.QDebug.<clinit>(QDebug.java:39)
    ... 7 more
    any help would be appriciated so much.
    thanks
    mehmad

    I dont know, but It may be that an Applet can only access the local machine. ie. If you run the applet on computer A and you want to edit the config on computer B, I do not believe you can. The applet can only talk to Computer A. You would have to:
    1) Run an application on computer A and the applet would tell the application what to change.
    2)Maybe sign the applet in a JAR File
    You will probably have to do #1.
    US101

  • Java.security.AccessControlException: access denied (java.util.PropertyPer

    Hi All,
    I try to run an applet from Solaris 8 server on some client machine using IE5 and NetScape 6.2 ( I installed JRE 1.4, I also try other JRE versions) but I get the following errors again and agian,
    I even try to use appletviewer on the Solaris Box itself to open the applet but it makes no difference same errors
    could somebody please help or give me a hint how should I start tracing what the problem might be ?
    this applet comes with Solaris Bandwidth Manager as a gui administration tool ( webbased ) it supposed to change the configurations remotly over the web. I asure there is no solaris permission problem exist.
    I use Tomcat on the server side.Installed JDK 1.3 on Solaris 8 with all the default settings.
    i suppose something should be done with java.policy or java.security files i know nothing about java security please at least give me some URL's to find out more about this matter i searched a lot but couldn't find good documents about java default security restrictions
    java.lang.ExceptionInInitializerError
         at com.sun.ba.common.QConfiguration.loadPredefServices(QConfiguration.java:617)
         at com.sun.ba.common.QConfiguration.getPredefServices(QConfiguration.java:630)
         at com.sun.ba.tool.MainPanel.<init>(MainPanel.java:95)
         at com.sun.ba.tool.QoSFrame.<init>(QoSFrame.java:48)
         at com.sun.ba.tool.baApplet.init(baApplet.java:46)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission console 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 com.sun.ba.common.QDebug.<clinit>(QDebug.java:39)
         ... 7 more
    any help would be appriciated so much.
    thanks
    mehmad

    Hi,
    Please make changes in the java.security files present in the jdk1.3/lib/jre/security/java.security.There you make the changes in the property which gives you the error.See if this helps..
    regards vickyk

  • Java.security..AccesscontrolException: access denied (java.util.PropertyP..

    I am trying to access the Cisco PIX device manager to get access to my firewall, but get the error message above when trying to start the applet: Is this a bug? Thankful for any input! See the Java concole output below:
    Java Plug-in 1.5.0_06
    Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Kari
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Requesting URL: https://10.1.1.1/jploader.jar
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.version 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 com.cisco.pdm.e.c.q(Unknown Source)
         at com.cisco.pdm.e.c.h(Unknown Source)
         at com.cisco.pdm.a.byte(Unknown Source)
         at com.cisco.pdm.PDMApplet.start(Unknown Source)
         at com.cisco.nm.util.sgz.Env.start(Env.java:37)
         at com.cisco.nm.util.sgz.Loader.start(Loader.java:109)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    I had the same problem trying to open a Pix 506e through Internet Explorer.
    After downloading and installing and uninstalling again differt versions; the working solution for me was version JRE 1.4.2_07
    Be sure to download the 07, other versions of the 1.4.2 were not working!

  • Java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission weblogic.kernel.allowQueueThrottling read)

    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

    Prasad,
    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 (java.util.PropertyPermission weblogic.kernel.allowQueueThrottling read)

              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
              

    I don't know what is happening. JMS hasn't been called yet -
              the applet is still setting up its initial context. You might want
              to try posting to the jndi (and perhaps rmi) newsgroup.
              Tom
              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
              

  • Access denied ("java.util.PropertyPermission" "user.timezone" "write") [WINDOWS 7 64bit]

    Hello,
    we got on several computers the error message
    access denied (java.util.PropertyPermission" "user.timezone" "write")
    when we try to open an internal website. Until today everything worked fine.
    An update on Java for windows 7 64, Version 7 Update 45 didnt solve the problem.
    I tried to set the Java security permissions in the control panel to middle but it also didnt work after this change.
    We also got this problem on another computer when we try to open an external site which also use Java.
    Did anyone have an idea how to fix this problem?

    Hi Guys.
    I solved the problem adding a rule in the following file
    $JAVA_HOME\lib\security\java.policy
    grant {
        permission java.util.PropertyPermission "user.timezone", "write";
    After I killed the java process and restarted. The problem dissapeared

Maybe you are looking for