How to have java.lang

Hi guys
when I download the package javacard development kit 2.2.1 from SUN, there's a file "api.jar" in it which can be used as Javacard API. Hence, it's quite easy for the applet developer to import this file into their applet and run this normally
For my own sake, I now just want to have the package java.lang.* (it can be either a jar file or a folder of class files) --> How can I have it??
P/S: I've tried to extract "api.jar" then wrapped the folder of java.lang + java.lang (export file) into a jar file (temporarily called lang.jar). However, this way didn't work out

When I finish creating the javacard.framework, it's necessary to wrap it into a jar file (library file) and import it into normal applets, hence the applet can run normally and invoke methods from javacard.framework.
However, when I do so, there's always a problem of missing java.lang. * (a java.lang package for javacard only).
P/S: I've tried to extract "api.jar" then wrapped the folder of java.lang + java.lang (export file) into a jar file (temporarily called lang.jar). However, this way didn't work outWell, honestly, by this way, I made it. Finally, I built a jar file of java.lang and can put it into java card applet project
I did it as below:
(IDE - Netbean 6.9.1)
1. Create a java card classic library project named com.sun.java.impl (this package is used in the future; it contains some classes which will be called by methods in javacard.framework)
2. Fulfill the code for those classes in this class
3. Build this class --> we have expt file and class file of all classes of this package -->wrap them into a jar file (let's call it impl.jar)
4. Extract api.jar from Java Card Development Kit 2.2.1 (provided by SUN) --> retrieve the package java.lang (including class files such as Object.class, NullPointerException.class,... and export file of this package) --> wrap them into a jar file (let's call it javalang.jar)
5. Create a javacard extension library project named javacard.framework
6. Fulfill the code for those classes in this class (import impl.jar and javalang.rar as library for this package)
7. Build this package (javacard.framework) ~~> we have a jar file (let's call it api.jar) and class files, but export file ~~> when importing this jar to an applet project, an error (missing of expt file) is sprung
========> I do not know why there is no expt file being created during the build of javacard.framework. Is it because the difference of Classic and Extension Project
Remember I tried to build javacard.framework within Classic project, but failed

Similar Messages

  • How to solve 'java/lang/OutOfMemoryError' when apply weblogic patch 10.3.6.0.10?

    Hi All:  Our platform is IBM AIX power system 64 bit, os level 6.  Oracle Fusion Middleware version is 10.3.6.0.8.  We tried to patch 10.3.6.0.10 on it, but encounter ‘out of memory error’ when  applied WebLogic patch 10.3.6.0.10 on UAT report server.  Currently UAT has 3GB memory (currently is 3G) .
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utilhd' in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152727.6422620.0001.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152727.6422620.0002.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc'
    in response to an event
    JVMDUMP006I Processing dump event "systhrow",
    detail "java/lang/OutOfMemoryError" - please wait.
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152727.6422620.0003.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    JVMDUMP032I JVM requested Heap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd'
    in response to an event
    JVMDUMP010I Heap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/heapdump.20150224.152735.6422620.0004.phd
    JVMDUMP032I JVM requested Java dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt'
    in response to an event
    JVMDUMP010I Java dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/javacore.20150224.152735.6422620.0005.txt
    JVMDUMP032I JVM requested Snap dump using
    '/ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc'
    in response to an event
    Exception in thread "main"
    java.lang.OutOfMemoryError at
    java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:335)
    at
    java.lang.StringBuffer.append(StringBuffer.java:201)
    at
    java.lang.Class.throwNoSuchMethodException(Class.java:278)
    at
    java.lang.Class.getMethod(Class.java:845)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.isValueSet(XBeanDataHandler.java:958)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getValueFromObject(XBeanDataHandler.java:589)
    at
    com.bea.cie.common.dao.xbean.XBeanDataHandler.getSimpleValue(XBeanDataHandler.java:431)
    at
    com.bea.plateng.patch.dao.cat.PatchDependency.getRule(PatchDependency.java:48)
    at
    com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1625)
    at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
    at
    com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
    at
    com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
    at
    com.bea.plateng.patch.Patch.main(Patch.java:281)
    JVMDUMP010I Snap dump written to
    /ora_bin01/u01/oracle/Middleware/utils/bsu/Snap.20150224.152735.6422620.0006.trc
    JVMDUMP013I Processed dump event "systhrow",
    detail "java/lang/OutOfMemoryError".
    Exception in thread "Attach API wait loop"
    java.lang.OutOfMemoryError
       at
    com.ibm.tools.attach.javaSE.CommonDirectory.waitSemaphore(CommonDirectory.java:222)
    at
    com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.waitForNotification(AttachHandler.java:329)
    at com.ibm.tools.attach.javaSE.AttachHandler$WaitLoop.run(AttachHandler.java:396)
    bsu.sh -install -patch_download_dir=/ora_bin01/u01/oracle/Middleware/utils/bsu/cache_dir -patchlist=12UV -prod_dir=/ora_bin01/u01/oracle/Middleware/wlserver_10.3
    we followed the README.txt instructions, and stop/start weblogic service before/after apply patch. Can anyone suggest a solution or Doc ID for helping us?
    thank you very much!

    Solutions: Bounce the applications and check the arguments if you can increase it.  It is due to memory issue
    You can set these values in CommEnv.sh (.cmd for windows) file located in the weblogic_home/common/bin directory.
    This gets applied to all the domains under that wls home.
    If you want to make the changes to specific domain then edit the SetDomainEnv.sh file located under the domain/bin directory.
    How to solve java.lang.OutOfMemoryError: Java heap space
    solutions:  export JVM_ARGS="-Xms1024m -Xmx1024m"
    How to solve java.lang.OutOfMemoryError: PermGen space
    solution : export JVM_ARGS="-XX:PermSize=64M -XX:MaxPermSize=256m"

  • How is the java.lang.StringBuffer class different from the java.lang.String

    How is the java.lang.StringBuffer class different from the java.lang.String class?....

    Read the API.
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
    "Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings."
    Although when possible you should use StringBuilder instead of StringBuffer.
    Always read the API at the very least before asking questions in the forums. Ideally you should do some google searching and poke around for an answer too. Otherwise you will get people barking at you.
    Drake

  • How to solve :  java.lang.OutOfMemoryError: Java heap space

    Dear all,
    Am using Jdeveloper 11.1.1.3 with weblogic10...
    I keep getting out of memory error while working on the application , here is the exact error message that i copied from the server log :
    ####<28/11/2010 GMT 09:17:58 ص> <Critical> <Health> <javaserver> <AdminServer> <weblogic.GCMonitor> <<anonymous>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000012> <1290935878582> <BEA-310003> <Free memory in the server is 4,541,416 bytes. There is danger of OutOfMemoryError>
    ####<28/11/2010 GMT 09:24:51 ص> <Error> <Kernel> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029> <1290936291218> <BEA-000802> <ExecuteRequest failed
    java.lang.OutOfMemoryError: Java heap space.
    java.lang.OutOfMemoryError: Java heap space
    >
    ####<28/11/2010 GMT 09:25:04 ص> <Notice> <Diagnostics> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936304406> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'AdminServer' has triggered at 28/11/2010 GMT 09:24:56 ص. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = 28/11/2010 GMT 09:24:51 ص SERVER = AdminServer MESSAGE = ExecuteRequest failed
    java.lang.OutOfMemoryError: Java heap space.
    java.lang.OutOfMemoryError: Java heap space
    SUBSYSTEM = Kernel USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000802 MACHINE = javaserver TXID = CONTEXTID = 3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029 TIMESTAMP = 1290936291218
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    ####<28/11/2010 GMT 09:25:36 ص> <Warning> <oracle.dfw.framework> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936336549> <DFW-40121> <failure creating incident from WLDF notification
    java.lang.OutOfMemoryError: Java heap space
    >
    ####<28/11/2010 GMT 09:26:32 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936392224> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
    ####<28/11/2010 GMT 09:26:35 ص> <Alert> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
    ####<28/11/2010 GMT 09:26:35 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000365> <Server state changed to FORCE_SUSPENDING>
    ####<28/11/2010 GMT 09:26:53 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936413632> <BEA-000365> <Server state changed to ADMIN>
    ####<28/11/2010 GMT 09:26:56 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936416757> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    ####<28/11/2010 GMT 09:26:59 ص> <Notice> <Server> <javaserver> <AdminServer> <DynamicListenThread[Default[1]]> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000035> <1290936419289> <BEA-002607> <Channel "Default[1]" listening on 127.0.0.1:7001 was shutdown.>
    ####<28/11/2010 GMT 09:27:07 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-41> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936427508> <BEA-000378> <Server failed to shutdown within the configured timeout of 30 seconds. The server process will exit now.>
    i searched the net and it seems that i should increase the java heap size , how can i do that... I have a server with 4G Ram ..
    Regards,
    Lama
    Edited by: Delta on Nov 28, 2010 1:36 AM

    My frien google tells me that you use
    >
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    This can have two reasons:
    * Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
    * Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:
    java -Xms<initial heap size> -Xmx<maximum heap size>
    >
    Timo

  • How to use Java.lang.Math to calculate; Advice programming

    Hi, all!
    I am trying to teach myself Java, and am using the MindQ CDs to do it. I'm dreadfully stuck on this one exercise, and I could use some help figuring out how to properly call a Math method, store the variables, and print the results. I've programmed other methods successfully before; for some reason I just can't figure this one out. I've tried about fifty different configurations; maybe I can get some good advice here? Thanks!
    import java.io.*;
    import java.util.Random;
    import java.lang.Math;
    public class JavaCalcs {
        public static void main(String args[]) {
            System.out.println("Starting JavaComputations...");
            //main method variable declarations
            int z, y, x, w;
            int A = -12;
            int B = 2;
            z = A & B;
            y = A | B;
            x = A >> B;
            w = A >>> B;
            System.out.println(z + ";" + y + ";" + x + ";" + w + ";");
            Random kickassRNG = new Random();
            double rDOne = kickassRNG.nextDouble() * 90.0;
            double rDTwo = kickassRNG.nextDouble() * 90.0;
            System.out.println("rDOne= " + rDOne);
            System.out.println("rDTwo= " + rDTwo);
    //NOTE-EVERYTHING WORKS FINE UNTIL THIS POINT...
            if (rDOne > rDTwo)
            System.out.println("The larger of the 2 degs. is rDOne");
            //compute ceiling.
            double a=rDOne; //Store the value of rDOne.
            public static double ceil(double a);
            return a;
            System.out.println( "the ceiling of rDOne is " + a );
            //convert degree measurement to radians.     
            public static double toRadians(double b);
            double b = a;
            System.out.println("rDOne in radians is " + b );
            //compute tangent of that result.
            public static double tan(double c);
            double c = b;
            System.out.println("The tangent of rDOne is " + c );
            else
            System.out.println("The larger of the 2 degs. is rDTwo");
            //compute ceiling.
            double a=rDTwo; //Store the value of rDOne.
            public static double ceil(double a);
            return a;
            System.out.println( "the ceiling of rDTwo is " + a );
            //convert degree measurement to radians.     
            public static double toRadians(double b);
            double b = a;
            System.out.println("rDTwo in radians is " + b );
            //compute tangent of that result.
            public static double tan(double c);
            double c = b;
            System.out.println("The tangent of rDTwo is " + c );
        } //end main method.
    }

    VERY useful link..thxYou're welcome. Here are some more:
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoratative than this.

  • How to avaoid java.lang.IllegalArgumentException: No enum const class

    HI ,
    Iam getting java.lang.IllegalArgumentException when iam using switch case through Enum contants.
    //Enum Constants declaration
    public enum USEOFPROCEEDSVALUES { U1,U2,U3, U4}
    //Using Enum in Java class
    Test.java
    USEOFPROCEEDSVALUES useOfProceedsVar =USEOFPROCEEDSVALUES.valueOf(useOfproceeds);
    switch (useOfProceedsVar) {   
                   case U1:
                   revenueSourceCode="REVENUE_SOURCE_CODE.POWER";
                        break;
                   case U2:
                        revenueSourceCode="REVENUE _SOURCE_CODE.WATER";
                   break;
                   case U3:
                        revenueSourceCode="REVENUE_SOURCE_CODE.POWER";
                        break;
                   case U4:
                             revenueSourceCode=REVENUE_SOURCE_CODE.POWER";
                        break;
    default:
                        revenueSourceCode=null;
    Exception raising if there is either of these not U1,U2,U3,U4 ara not avalabele. i.e is if useOfProceedsVar is A6 then exception raising
    How to avoid this exception
    Thanks for early reply

    user818909 wrote:
    HI ,
    Iam getting java.lang.IllegalArgumentException when iam using switch case through Enum contants.
    //Enum Constants declaration
    public enum USEOFPROCEEDSVALUES { U1,U2,U3, U4}
    //Using Enum in Java class
    Exception raising if there is either of these not U1,U2,U3,U4 ara not avalabele. i.e is if useOfProceedsVar is A6 then exception raisingActually useOfProceedsVar can never be A6, it can only take a value from the enum.
    The exception will be raised by valueOf, which (quite correctly) throws it if the String you pass to it doesn't match any of the enum constants.
    >
    How to avoid this exception
    Don't avoid it, process it. What do you want your code to do if the string doesn't match any of your enum constants? Whatever it is, stick it in a catch clause.

  • How to use java.lang.Class.getMethod() and java.lang.reflect.Method.invoke(

    I want to call a specified method of one class dynamically. I use the method
    "getMethod()" in package "java.lang.Class" to get method and "invoke()" in
    " java.lang.reflect.Method " to invoke method.
    The problem is as following :
    1. There are two argument in this method "getMethod(String MethodName , Class[] paremterTypes)" in package "Class". I have no idea about the second parameter " Class[] parameterTypes ".what does the argument exactly mean ?
    2. There are two argument in the method "invoke(object obj, object[] obj)" in package "Method".
    I have no idea about the second parameter "object[] obj ".what is mean ?
    I pass " null " value to it and it works.But i pass anothers ,jvm will throw exception.

    I have a generic Method Executer that has a method like
    public Object execute(String className, String methodName, Object args)
        String fullClassName = packageName + className ;
        Class delegateClass = Class.forName(fullClassName);
        BaseDelegate delegate = (BaseDelegate)delegateClass.newInstance();
        Method method = null;
        if (args == null)
            method = delegateClass.getMethod(methodName, new Class[] {});
            obj = method.invoke(delegate,new Object[] {});
        else
            method = delegateClass.getMethod(methodName, new Class[] {args.getClass()});
            obj = method.invoke(delegate, new Object[]{args});
       }This seems to have problems when I call the method from a class like:
    execute("CategoryDelegate", "getCategoryById", new Integer(4144));(I get a NoSuchMethodException)
    The method I am trying to execute in CategoryDelegate looks like:
    public Category getCategoryById(int categoryId) throws DelegateExceptionI think it has to deal with the difference in the way we handle Primitive Wrappers and Objects. Wrapper we have to use Interger.TYPE and with the rest of the Objects we have to use obj.class.
    Am I doing something wrong here? Any suggestions to make it work for primitive wrappers as well as Objects?

  • Would any one tell me how to use java.lang.ref.*

    Hello!
    I am a recruit. I need to write something with java.lang.ref.
    I can't understand the description in API of J2SE very well. Would any one tell me where could I get some more detail or tutorial or example?
    Thanks!
    wooing

    check it out
    http://developer.java.sun.com/developer/technicalArticles/ALT/RefObj/

  • HOW TO FIX java.lang.NullPointerException ERROR FOR FIREFOX 18.0.2

    I AM CONTINUOUSLY GETTING THE FOLLOWING ERROR WHEN USING EXEL.COM SC3 PROGRAM V5.5 WHEN I CLICK ON THE CALENDAR FIELD: java.lang.NullPointerException.
    PLEASE ASSIST ME IN FIXING THIS ISSUE STEP BY STEP IF POSSIBLE

    hi cbloom23,
    try updating Java and see if it will fix your problem. There is a detailed guide in this article: [[Use the Java plugin to view interactive content on websites]]
    could you report back if this fixed your problem?

  • Forums - How to use java.lang.Class.getMethod() and java.lang.reflect.Metho

    I have similar question. I am trying to invoke a method with no parameters. I don't know how to do that. Can someone please help.
    for example.
    I have 2 methods.
    public void setMethod(String strPut){
    this.strPut = strPut;
    public String getMethod(){
    return strPut;
    Method method = objRef.class.getMethod("setMethod", new Class[]{String.class});
    Object objReturn = method.invoke(sqlWhere, new Object[] {"any String"});
    I can invoke setMethod but I don't know how to invoke getMethod().

    Hi
    Try using something like this...
    CustomClass objCustomClass = new CustomClass ();
    Class customClass = objCustomClass.getClass ();
    Method m = customClass.getMethod ("getMethodName", (Class[])null);
    String strContent = (String) m.invoke (objCustomClass, null);
    Thanks and regards,
    Pazhanikanthan. P

  • How to handle java.lang.IndexOutOfBoundsException in eclipse environment?

    while runnig my java application, iam getting the above exception. But i am unable to find the root location, from where exactly the error is coming (when clicking on that exception in console,a popup window appearing and showing some options).. plz help me how to proceed !!
    otherwise tell me where to post this!

    avula wrote:
    i didn't write LogWorker .java. iam running my application in debug mode. but when it comes to the exception, the control simply goes into the "ArrayList.class" and stopping at the
    private void RangeCheck(int index) {
         if (index >= size)
             throw new IndexOutOfBoundsException(
              "Index: "+index+", Size: "+size);
    Ok, so that's where the problem occurs. Now you should see the call stack (similar to a stack trace) of the method (usually in the upper left corner). There you can see which method called this method, which called that one ... and so on.
    Follow that stack to find out why the problem occured (usually it's the first line that is in code that you wrote).

  • How to declare java.lang.Class variable that can be used in Enum.valueOf(.)

    As per subject -- we have a need to declare variable in class that will hold enum's Class object. At some point we want to use this variable as a Class argument for Enum.valueOf(.) which has the following signature:
    public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) {..}So far we cannot come up with a workable solution.
    private final Class<? extends Enum<?>> propertyClass;doesn't work (apparently because second ? should in fact be the same as first ? -- which works with T for class/method templates, but cannot be used for variables). Error message (in Eclipse) is:
    Bound mismatch: The generic method valueOf(Class<T>, String) of type Enum<E> is not applicable for the arguments (Class<capture#13-of ? extends Enum<?>>, String). The inferred type capture#13-of ? extends Enum<?> is not a valid substitute for the bounded parameter <T extends Enum<T>>
    So what would be the proper way to declare the variable?
    Thanks in advance!

    the enum.valueof method is a little weird. they implemented it so it is nice and "safe". if you don't care about that safety, you can probably work with raw types for that bit of code and get the call to go through. you just won't have any type safety on the result.

  • Java.lang.StackOverflowError in SAP xMII 11.5

    Hi All,
    I am using SAP xMII 11.5 and Java 1.4. I am trying to display a large iGrid using irpt file. But it is not displaying the grid. I checked log in servletExec folder,it have java.lang.StackOverflowError. How can i solve this issued? Can it be resolved by setting -Xms parameter in Java Run-time environment in server(I am using Windows 2003 Server)? Or should I need to set it in any conf file or pref file inside servletExec folder? Please advice. Thanks in advance.
    Regards,
    Subin

    Hi Thomas,
    MII display applets are nothing else than standard applets. They are executed in the client VM mostly provided by the JavaPlugin in the browser. To give the applets more RAM use the -Xmx parameter and set it in the command line for the JavaPlugin VM. In Windows this can be found in systemcontrol->Java. 64M ist standard. Give it 250M for testing.
    Oh, sorry. Just saw that you found the exception in the server log. Same holds for the server. So try to increase RAM for server VM with -Xmx. Server VM can easily be set to 1GB (but not more than about 1.5G in a 32 bit system).
    Do you have the stack trace for this StackOverflow? Normally this points to endless recursion.
    Good luck,
    Matthias
    Edited by: Matthias Wald on Jan 21, 2011 11:11 PM
    Edited by: Matthias Wald on Jan 24, 2011 3:46 PM

  • Java.lang.IllegalStateException: ADF_FACES-60003

    i am using fileDownloadListener in my project. after using this i am getting following error
    java.lang.IllegalStateException: ADF_FACES-60003:Component with ID: r1:0:pt1:r1:1:ctb1 not registered for Active Data.
         at oracle.adfinternal.view.faces.activedata.PageDataUpdateManager.unregisterComponent(PageDataUpdateManager.java:494)
         at oracle.adfinternal.view.faces.context.RichPhaseListener._startAndStopActiveData(RichPhaseListener.java:733)
         at oracle.adfinternal.view.faces.context.RichPhaseListener.afterPhase(RichPhaseListener.java:298)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:364)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Hi,
    I have the same issue, but I can't set the ChangeEventPolicy of my iterator to "none".
    If I do it, When I click ton "next" button, the iterator's currentRow changes, but the inputs are not refreshed and keep previous values.
    And if I keep 'ppr' in ChangeEventPolicy, when I click on the fileDownloadListener, then click "next" button, I have "java.lang.IllegalStateException: ADF_FACES-60003" and the iterator's behavior is same as if its ChangeEventPolicy was "none".
    Is it a bug? How can I do to have a fileDownloadListener and a form with next, previous, last... buttons in the same page?
    (jdevelopper 11.1.2.1.0)

  • Can "java.lang.UnsupportedClassVersionError" be caught?

    While testing my App, I found an old JRE that was incompatible, and threw an java.lang.UnsupportedClassVersionError into the command line at runtime.
    I tried wrapping my main with try {} and used UnsupportedClassVersionError for the catch. It didn't catch it.
    What I'd like is to be able to popup a window that tells a user that they must visit java.com and update their JRE. Can it be done? If so, how?

    import java.lang.reflect.*;
    //ex:
    //java Launcher TestIt Hello world
    public class Launcher {
        public static void main(String[] args) {
            if (args.length == 0) {
                System.out.println("Usage: java Launcher com.acme.MainClass MainClass-args...");
                System.exit(1);
            try {
                Class cls = Class.forName(args[0]);
                String[] mainArgs = new String[args.length-1];
                System.arraycopy(args, 1, mainArgs, 0, mainArgs.length);
                Method m = cls.getMethod("main", new Class[]{String[].class});
                m.invoke(null, new Object[]{mainArgs});
            } catch (UnsupportedClassVersionError e) {
                System.out.println("UnsupportedClassVersionError");
            } catch (Exception e) {
                System.out.println(e.getClass().getName() + ": " + e.getMessage());
    class TestIt {
        public static void main(String[] args) {
            for(int i=0; i<args.length; ++i) {
                System.out.println("args[" + i + "]=" + args);
    Now Laucher will have to be compiled to the earliest version you anticipate,
    but the class you name on the command line need not be...

Maybe you are looking for