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();

Similar Messages

  • Problem with protected access

    I'm studying for the JCP exam. I've come across a question:
    True or false: If class Y extends class X, the two classes are in different packages, and class X has a protected method called abby(), then any instance of Y may call the abby() method of any other instance of Y.
    A. True
    B. False
    And the answer:
    B. An object that inherits a protected method from a superclass in a different package may call that method on itself but not on other instances of the same class.
    However, I wrote such piece of code:
    File Foo.java in foo package:
    package foo;
    public class Foo {
        protected void fun() {};
    }File Main.java in package test:
    package test;
    import foo.Foo;
    class Main extends Foo {
        void test() {
            fun();  //this is supposed to work
            Main m = new Main();
            m.fun();    //but this is not - but it works!
        public static void main(String args[]) {}
    }So, could anybody explain this to me? Is there a bug in the book I am using or is it me who doesn't understand everything?
    The book: Sybex, Complete Java� 2 Certification: Study Guide, Fifth Edition

    That Sybex book is full of errors. This is only one of them. For example, it tells me that the classpath I specify with -cp MERGES with the system classpath -- anyone who has basic experience with it knows that this is crap.
    Also, there are not just errors, but omissions. For example, it leaves out the whole section about the shift operators (<<, >>, >>>), but there are questions in the book about them. It explains <? extends A>, but not <? super A>.
    Or it tells that you can use the class lock in the body of static methods, but does not explains how! The simplest I could come up with is synchronized(Class.forName("myPackage.myClass")); yes, in a try-catch construct.
    The exam questions are also strange. For example, there is a question about void callMe(String? names). According to the book, the correct answer is "names is an array of Strings in the method". That COULD be true, if it compiled. But it does not...
    I would suggest to learn from another book. Unfortunately I don't know if there are other books for Java 5 yet.

  • ClassCastException: java.util.Vector

    I'm trying to get a list of records(products) from the dataBase and print them into a jsp page.
    Here is the code-
    Method in session bean to get the records-
    public List<Entity.Products> getProducts(int categoryId)
          Query query=manager.createNativeQuery("select * from products  where categoryId="+categoryId);
          return (List<Entity.Products>)query.getResultList();
        }I put the result in the request (in a servlet)-
       request.setAttribute("products",productsManagement.getProducts(categoryId));JSP page-
          <%
             java.util.List<Entity.Products> products=(java.util.List<Entity.Products>) request.getAttribute("products");
              for(Entity.Products product : products)
               %>
            <A href=""><%=product.getProductName()%></A>
               <%
               %>The problen is that i'm getting the error-
    java.lang.ClassCastException: java.util.Vector
    what is the problem?
    Thanks in advanced.

    ppl1,
    Your problem is with createNativeQuery. Native query returns a Vector of objects. Whereas createNamedQuery (based on JPQL) is smart enough to get the types right. It seems like you want to use createNamedQuery which will allow you to use generics with the Entity type.
    For example, with a client
    List<Products> products = prodMgr.findAllProducts();
    for(Product p : products) {
    System.out.println(p");
    }The following session bean will work.
    // ProdManager
    @PersistenceContext EntityManager em;
    public List<Product> findAllProducts() {
      // JPQL for findAllDepts: SELECT p FROM Product AS p
      return em.createNamedQuery("findAllDepts");
    }If you are committed to native query, use the following on the client and EJB respectively.
    List products = prodMgr.findAllProducts();
    for( Object obj : products ) {
      System.out.println( obj.toString());
      // use a case "(Product)obj" for field-level access
    List findAllProducts() {
    return em.createNativeQuery("SELECT * FROM products").getResultList();
    }

  • Problem with file access in other computer in jsp

    I have problem with file accessing in other computer in jsp.
    The follow code
    File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net share driver
    File[] files=folder.listFiles();
    System.out.println("test");
    System.out.println("length="+files.length);
    will throw exception at the second print.
    but it works well in main funtion.
    Is anybody know what is the problem.
    JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder on windows2000 server

    no error code for this.But when I start tomcat I get the follow error.
    java.lang.IllegalArgumentException: Document base Z:\ does not exist or is not a readable directory
         at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
         at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error in resourceStart()
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Exception during cleanup after start failed
    LifecycleException: Container StandardContext[msgstore] has not been started
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4466)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

  • 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

  • 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
              

  • Java.lang.NoSuchMethodError: java/util/Vector method revove...

    After using jexegen from microsoft to make EXE. I receive this error when i execute the my EXE :
    java.lang.NoSuchMethodError: java/util/Vector method revove...
    Any body know why?
    If i execute from JBuilder i have no problem!

    hi, i don't have much experience with M$ java products, but as far as i remember, M$ java stopped developping since jdk 1.1.4 (or 1.1.7).
    maybe that's the reason for throwing this exception. if you want to "exe" your class-file, try JToExe.
    greetzzz
    chris

  • Help needed to solve "java.io.NotSerializableException: java.util.Vector$1"

    hi to all,
    i am using a session less bean A to querry a Entity Bean B , which inturns calls another EntityBean C ,
    finally a ' find' method is invoked on the EntityBean C, In this a vector is created which holds 3 different vectors at different indexes, now the problem i am facing is that when Enity Bean B is returning the final vector to the A , it's firing out a errors that :-
    TRANSACTION COULD NOT BE COMPLETED: RemoteException occurred in server thread;
    ested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.io.NotSerializableException: java.util.Vector$1
    <<no stack trace available>>
    ur any help would be highly appricated to solve out this prob.
    If i try to iterate through this vector it's gives IOR:0232003x343242344asdsd................................................blabla....................
    thanxs in adavance
    Deepak

    Hi I think you are using the method elements() in a remote method.
    This method can't be Serializable!! Because it returns an Interface. Interfaces are never Serializable.
    Regards,
    Peter

  • 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
              

  • Service component:  java.lang.NoSuchMethodException: java.util.Vector.isX()

    Hi everybody:
    I created a Mobile service component and a Data Structure with 3 attributes. I created and instantiated the collection and showed all objects in a table but I´m getting the following error:java.lang.NoSuchMethodException: java.util.Vector.isX() where X is the name of the each attribute I defined. so I´m getting this error twice for each attribute.
    Complete stack:
    java.lang.NoSuchMethodException: java.util.Vector.isX()
         at java.lang.Class.getMethod(Class.java:1581)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.invokeMethod(JavaBeanCMIModel.java:366)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.invokeGetMethod(JavaBeanCMIModel.java:279)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.JavaBeanCMIModel.getAttributeValue(JavaBeanCMIModel.java:81)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElement.getAttributeValue(NodeElement.java:104)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElement.getAttributeValue(NodeElement.java:85)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.NodeElementWrapper.getAttributeValue(NodeElementWrapper.java:26)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.getAttributeValue(ContextNode.java:578)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.getAttributeValue(ContextNode.java:569)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNodeMapped.getAttributeValue(ContextNodeMapped.java:134)
         at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.listenContextNodeCursorChanged(Property.java:173)
         at com.sap.tc.mobile.wdlite.progmodel.core.context.ContextNode.addContextNodeElementListener(ContextNode.java:616)
         at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.setBinding(Property.java:73)
         at com.sap.tc.mobile.wdlite.progmodel.core.viewelement.Property.setBinding(Property.java:57)
         at com.xioma.demo.testeui0001.comp1.Comp1ViewView.(Comp1ViewView.java:615)
         at com.xioma.demo.testeui0001.comp1.Comp1ViewView.getInstance0(Comp1ViewView.java:31)
         at com.xioma.demo.testeui0001.comp1.Comp1ViewView.getInstance(Comp1ViewView.java:45)
         at com.xioma.demo.testeui0001.comp1.Comp1WindowWindow.getDefaultView(Comp1WindowWindow.java:38)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:477)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:243)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrent(Application.java:119)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:143)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:175)
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:387)
         at com.sap.tc.mobile.wdlite.container.ContainerApp.startApp(ContainerApp.java:155)
         at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:327)
         at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:370)
         at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:207)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:399)
         at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:148)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:442)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:485)
         at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:362)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
         at com.sap.tc.mobile.wdlite.renderer.swt.container.WorkingArea.refresh(WorkingArea.java:175)
         at com.sap.tc.mobile.wdlite.renderer.api.RenderingManager.refresh(RenderingManager.java:233)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.refresh(Application.java:250)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:503)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:243)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrent(Application.java:119)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:143)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.launch(Application.java:175)
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:387)
         at com.sap.tc.mobile.wdlite.framework.Start.runOnContext(Start.java:585)
         at com.sap.tc.mobile.wdlite.framework.Start.startApplication(Start.java:609)
         at com.sap.tc.mobile.wdlite.framework.Start.startContainer(Start.java:646)
         at com.sap.tc.mobile.cfs.framework.spi.FrameworkManager.startContainer(FrameworkManager.java:259)
         at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:230)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
    The errors are throw when the application starts, the custom code works ok.
    Any idea?
    Thanks a lot for your time on this thread.
    Rocío.

    Ho Rocio,
    The creme JVM is compatible with JDK 1.3.Please make sure that the API you are using is available in 1.3 API set.
    Best Regards,
    Amit

  • Java.io.NotSerializableException: java.util.Vector$1

    I am using Java 2 in the API it says that the Vector implements Serializable but I am getting an exception java.io.NotSerializableException: java.util.Vector$1 I don't know why please help.
    Thank you
    palanisr

    Although Vectors are Serializable that doesn't mean that the contents of a Vector are necessarily Serializable. What are the contents of your Vector? Are they objects of a Serializable class? If not that is your problem. The attached sample code demonstrates the problem of serializing a Vector that contains non-serializable data. If you make the Employee class Serializable the code works.
    import java.util.*;
    import java.io.*;
    public class Serialize
    public static void main(String args[])
      ObjectOutputStream oos = null;
      FileOutputStream fos = null;
      Vector v = new Vector();
      v.add(new Employee("Smith","John"));
      v.add(new Employee("Jones","Albert"));
      try
       fos = new FileOutputStream("vector.ser");
       oos = new ObjectOutputStream(fos);
       oos.writeObject(v);
      catch(FileNotFoundException fnfe)
       fnfe.printStackTrace();
      catch(IOException ioe)
       ioe.printStackTrace();
      finally
       try
        if (oos != null)
         oos.close();
       catch(IOException ioe)
       try
        if (fos != null)
         fos.close();
       catch(IOException ioe)
    class Employee //implements Serializable
    private String lastName;
    private String firstName;
    public Employee(String lastName, String firstName)
      this.lastName = lastName;
      this.firstName = firstName;
    }

  • Throw "java.util.Vector" exception?

    In my servlet, I got catch(Throwable t), t.getMessage() is java.util.Vector. Can anyone tell me where I should look into for this problem?

    probably a ClassCastException. Why don't you get the stack trace?

Maybe you are looking for