Integer and java.lang.Integer?

hi
I'm using DefaultTableModel method getValueAt which takes 2 integers as parameters
i have the vector colnumbers which has integers in it. Im trying to get these integers back out again to use in the getValue at method but the compilercomplains that i need int,int nad not int, java.lang.Integer.
Why are there 2 different integers? and how do i just get it back as int????
thanks
Vector unsorted = new Vector();
for(int j=0; j<colnumbers.size(); j++)
for(int i=0; i<=max_rows; i++)
     unsorted.add(tm.getValueAt(i,(Integer)colnumbers.elementAt(j)));     
}

unsorted.add(
  tm.getValueAt(
    i,
    ((Integer) colnumbers.elementAt( j )).intValue()
);you just needed to parenthesize to indicate that intValue() gets called on the result of casting colnumbers.elementAt( j ) to type Integer.

Similar Messages

  • I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Is Apple aware of this problem? No longer supported?

    My web page uses a Java Applet to allow my visitors to replay chess games; the Chess Viewer Deluxe applet was written by Nikolai Pilafov some time ago and has been working properly for some time (until recently). I don't monitor this part of my site regularly so I am not sure when it began to fail. On his web site [http://chesstuff.blogspot.com/2008/11/chess-viewer-deluxe.html] he has a link to check LiveConnect object functionality (which fails for OBJECT tags). His recommendation is to "seek platform specific support which might be available from the JRE developers for your platform".
    I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Until I checked the LiveConnect object functionality, I was unable to identify the source of the console error messages. This does seem to be the smoking gun.
    Is Apple aware of this problem? Are these classes no longer supported? Has anyone else had this problem? You can attempt to recreate the problem locally by going to my web page: http://donsmallidge.com/DonSmallidgeChess.html
    Thanks in advance for any help you can provide!
    Abbreviated Java Console output:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    load: class ZeroApplet.class not found.
    java.lang.ClassNotFoundException: ZeroApplet.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)
    load: class JavaToJS.class not found.
    java.lang.ClassNotFoundException: JavaToJS.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)

    I just went up to check the LiveConnect object functionality page AND IT WORKED THIS TIME! I must confess, this is very mysterious. I will do some more checking and reply here if I can determine why it is working now (and more importantly, why it didn't work before).

  • 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?

  • Urgent: automatic key generation and java.lang.Long

    Hi,
    I keep getting the following error:
    In RDBMS CMP bean 'UserEntity', when Automatic Key Generation is enabled, the
    Primary Key class must be java.lang.Integer.
    I need to have Long as primary key, how do I solve it?
    Thanks,
    A.

    Use WebLogic Server 8.1
    java.lang.Long is supported in WLS 8.1
    thanks,
    Deepak
    "iggy" <[email protected]> wrote:
    >
    Hi,
    I keep getting the following error:
    In RDBMS CMP bean 'UserEntity', when Automatic Key Generation is enabled,
    the
    Primary Key class must be java.lang.Integer.
    I need to have Long as primary key, how do I solve it?
    Thanks,
    A.

  • Return statement error and java.lang.noclassDefFoundError?

    public class Calculation
         public static void main (String[] args)
              int a[]=new int [12];
              int iNum=0;
              MainPrompt();
         static public int MyInput()
         return MyInput.readInt();
         public static boolean MainPrompt()
              System.out.println("\n This program will show you the times table [1-12] of any number between 1 & 100 inclusive.");
              int a[]=new int [12];
              int iNum = 0;
              do
                   do
                        System.out.print("\n Enter your number [1-100] or 999 to exit: ");
                        iNum = MyInput();
                        while ((iNum>=1)&&(iNum<=100));
                             if (iNum==999)
                                  System.out.println("\n Goodbye \n");
                        while (!(((iNum>=1)&&(iNum<=100))||(iNum==999)));
                             if ((iNum>=1)&&(iNum<=100))
                                  Calculation(a,iNum);
                                  TimesTable(a,iNum);
         public static void Calculation(int a[], int iNum)
              for(int j=0;j<a.length;j++)
              a[j]=iNum*(j+1);
         public static void TimesTable(int a[], int iNum)
              for(int i=0;i<a.length;i++)
              System.out.println((i+1)+"     *"+iNum+"     ="+a);
    In build output it says missing return statement line 42 "}"
    and also when I try to execute the program it gives me the Exception in thread "main" java.lang.NoClassDefFoundError: calculation
    In the folder I have placed the myinput.java and myinput.class file where my calculation.java is, but still no go.
    can anyone here help me out here?
    thanks in advance

    public class Calculation
         public static void main (String[] args)
              int a[]=new int [12];
              int iNum=0;
              MainPrompt();
         static public int MyInput()
         return MyInput.readInt();
         public static void MainPrompt()
              System.out.println("\n This program will show you the times table [1-12] of any number between 1 & 100 inclusive.");
              int a[]=new int [12];
              int iNum = 0;
              do
                   do
                        System.out.print("\n Enter your number [1-100] or 999 to exit: ");
                        iNum = MyInput();
                        while ((iNum>=1)&&(iNum<=100));
                             if (iNum==999)
                                  System.out.println("\n Goodbye \n");
                        while (!(((iNum>=1)&&(iNum<=100))||(iNum==999)));
                             if ((iNum>=1)&&(iNum<=100))
                                  Calculation(a,iNum);
                                  TimesTable(a,iNum);
         public static void Calculation(int a[], int iNum) //This part doesn't execute
              for(int j=0;j<a.length;j++)
              a[j]=iNum*(j+1);
         public static void TimesTable(int a[], int iNum)
              for(int i=0;i<a.length;i++)
              System.out.println((i+1)+"     *"+iNum+"     ="+a);

  • Failed to create Salience object and java.lang.NoClassDefFoundError

    We are getting the below error while trying to use the text enrichment component in Endeca integrator clover server.
    2015-01-26 10:11:59,880 INFO 1343495 [pool-7-thread-1] Creating new Salience object from data paths: '/app/oracle/ofm/TextEnrichment/salience-5.1.1.7349/data'.
    2015-01-26 10:11:59,881 ERROR 1343495 [pool-7-thread-1] Failed to get Salience object from factory
    java.lang.NoClassDefFoundError: com/lexalytics/salience/Salience
      at com.endeca.clover.adapters.salience.SalienceFactory.createSalience(SalienceFactory.java:101)
      at com.endeca.clover.adapters.salience.SalienceFactory.getSalienceInstance(SalienceFactory.java:41)
      at com.endeca.clover.adapters.salience.SalienceRunnable.run(SalienceRunnable.java:92)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:680)
    2015-01-26 10:11:59,891 ERROR 1343495 [WatchDog_1343495] Component [Customer Background:CUSTOMER_BACKGROUND] finished with status ERROR.
    Failed to create Salience object.
    2015-01-26 10:11:59,891 ERROR 1343495 [WatchDog_1343495] Error details:
    org.jetel.exception.JetelRuntimeException: Component [Customer Background:CUSTOMER_BACKGROUND] finished with status ERROR.
      at org.jetel.graph.Node.createNodeException(Node.java:535)
      at org.jetel.graph.Node.run(Node.java:514)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.RuntimeException: Failed to create Salience object.
      at com.endeca.clover.adapters.salience.SalienceComponent.execute(SalienceComponent.java:166)
      at org.jetel.graph.Node.run(Node.java:485)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
      ... 1 more
    2015-01-26 10:11:59,930 INFO 1343495 [WatchDog_1343495] Execution of phase [0] finished with error - elapsed time(sec): 0
    2015-01-26 10:11:59,930 ERROR 1343495 [WatchDog_1343495] !!! Phase finished with error - stopping graph run !!!
    2015-01-26 10:11:59,930 INFO 1343495 [WatchDog_1343495] Post-execute finalization of connection:
    2015-01-26 10:11:59,930 INFO 1343495 [WatchDog_1343495] DBConnection driver[org.jetel.connection.jdbc.driver.JdbcDriverImpl@103cdbdc]:jndi[null]:url[jdbc:oracle:thin:@gitvm000212.us.oracle.com:1521:upslstg]:user[upsell_winref] ... OK
    2015-01-26 10:11:59,930 INFO 1343495 [WatchDog_1343495] -----------------------** Summary of Phases execution **---------------------
    2015-01-26 10:11:59,931 INFO 1343495 [WatchDog_1343495] Phase# Finished Status RunTime(sec) MemoryAllocation(KB)
    2015-01-26 10:11:59,930 INFO 1343495 [JobFinalizer_1343495] Finalisation
    2015-01-26 10:11:59,931 INFO 1343495 [WatchDog_1343495] 0 ERROR 0 139976
    2015-01-26 10:11:59,931 INFO 1343495 [WatchDog_1343495] ------------------------------** End of Summary **---------------------------
    2015-01-26 10:11:59,931 INFO 1343495 [WatchDog_1343495] WatchDog thread finished - total execution time: 0 (sec)
    2015-01-26 10:11:59,935 INFO 1343495 [JobFinalizer_1343495] RunTime: 296 ms
    2015-01-26 10:11:59,935 ERROR 1343495 [JobFinalizer_1343495]
    --------------------------------- Error details ----------------------------------
      Component [Customer Background:CUSTOMER_BACKGROUND] finished with status ERROR.
      Failed to create Salience object.
    2015-01-26 10:11:59,935 INFO 1343495 [JobFinalizer_1343495] Finished Status: ERROR
    This happens only on our stage and production instances. On our dev instance it works without problems. All 3 instances are setup the same, although our dev instance was created long time before the stage and prod instances. However, we cannot detect any differences between the machines.
    I've tried the solutions mentioned in the other similar thread: Failed to create Salience object but this doesnt solve the issue since the directory and variables were already correct.
    Anyone can help?

    Given that you are running this in Clover Server, one thing I can recommend is to shut that server down, move/truncate the logs, restart and retest, then look at the first error message you get when attempting to run the graph.  Java classloaders sometimes cache failed class clinit and report future attempts to load that class as a simple NoClassDefFoundError, masking the original/actual root cause.  With any luck you might find another, clearer error - maybe the native binary libraries are not being located.

  • Unable to read big files into string object  and java.lang.OutOfMemory Prob

    Hi All,
    I have an application that uses applet and servlet communication. On the client side I am reading an large xml file of 12MB size (using JFileChooser) and converting the file to an string object using below code. But I am getting java.lang.OutOfMemory on the client side . But the same below code works fine for small xml files which are less than 4MB sizes:
    BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF8"), 1024*12);
    String s, s2 = new String();
    while((s = in.readLine())!= null)
         s2 += s + "\n";
    I even tried below code but still java.lang.OutOfMemory is coming:
    while (true)
         int i = in.read();
         if (i == -1)
              break;
         sb.append(i);
    Please let me know what am I doing wrong here ...
    Thanks & Regards,
    Sony.

    Using a String is bad for the following reason:
    When you initially create the String, it has a certain memory size (allocated length if you will). As you keep appending to this String, then memory reallocation will occur over and over, slowing your program down dramatically (ive seen with a 16k x 8 Char file taking 30 secs to read into memory using Strings in this way)
    A Better way would be if you knew the number of characters in the XML file (Using some File size method for example) Then you can use a StringBuffer, which will pre allocate enough space (or try to, it may just be that you cannot create a string as large as you need). You can use toString() method to get the resultant in a String Object (the extra allocated space at the end of the Buffer will be removed)
    StringBuffer strBuf = new StringBuffer(xxxx);
    Where xx is the length (int). Assuming that you are only allowed to enter an int to the constructor then (platform depedant) an int is 2^31 at maximum (or whatever) which allows 2.14e9 characters, therefore an xml file being totally filed would allow a size of ~2048 MB to be read in.
    Try it and see.

  • Large insert and java.lang.OutOfMemoryError

    Hello.
    I have an application that is trying to insert a large amount of data into the database (could be 200,000 rows). We are getting a java.lang.OutOfMemoryError in the process of doing the insert. The inserts are currently being done by looping over a Vector where each element in the Vector contains an id that is needed to do each insert. Actually, the Vector contains instances of DatabaseRow from a previous query done using "executingSelectingCall()". For each DatabaseRow in the Vector, a row is added to another table in the database:
    for(int i=0; i<trackingSelectRes.size(); i++)
    DatabaseRow dbRow = (DatabaseRow)trackingSelectRes.get(i);
                                  BigDecimal recordId = (BigDecimal)dbRow.get(PREMIUM_PK_IN_TMP_TABLE);
                                  trackingUpdateSql.setSQLString("INSERT INTO " + trackingTableName + " (" + PK_IN_TRACKING + ", " + PREMIUM_PK_IN_TRACKING + ", " + BMTID + ", " + RULEID + ", " + TIMESTAMP + ") " + "VALUES" +
                                                                          " ("+ TRACKING_PK_SEQ + ".nextval, " + recordId.longValue() + ", '" + rule.getBmtId().getBmtId() + "', '" + rule.getRuleId() + "', sysdate)");
                                  //System.out.println("TRACKING PREMIUM INSERT STATEMENT: " + trackingUpdateSql.getSQLString());
                                  session.executeNonSelectingCall(trackingUpdateSql);
    My first thought is to do a ReportQuery to get the ids that are needed to do the insert instead of loading all of the rows that contain the ids into memory. But, I'm also thinking that we are taking the incorrect approach to the problem. I looked at TopLink's batch writing, but I don't want to create objects for this data. Does TopLink have another way of doing a mass insert or would it be better to use a stored procedure?
    Thanks,
    Katie

    Thanks for your reply. I have another quick question? Could I get a UnitOfWork and call executeNonSelectingCall() with calls to commitAndResume() at a predetermined interval? Would that allow me to not have to commit every row?
    Thanks,
    Katie

  • JSR179:LocationProvider: Shutting down! and java.lang.SecurityException

    Hello,
    I am a newbie both at Java ME and JSR-179 (Location based services). I am trying to create location based services but gets the following error:
    JSR179:LocationProvider: Shutting down!
    null - 6
    java.lang.SecurityException
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at unknown
    at java.lang.Thread.run
    at unknown
    at unknownThe problem occures when trying to execute following line below: Location l = lp.getLocation(60);Additional information:
    1. The output "null - 6" above is from my Catch-block. That's how I know at which row the error occurs
    2. The application works in WTK.
    3. The problem occures when I am using the SEM Device Explorer and doing on device debugging. Not sure if that is related to that.
    4. If I am running the directly on the phone it works. Well, not neccessarily if I have tried running it from the Device Explorer, guess it wont work because something happened while using the Device Explorer. And when I am trying to use the application on the phone and it hangs, the only thing I can do is to restart the phone. The phone hangs when the "phone" asks if the application should have access to the resources on the phone.
    5. Have I missed something, but could it be some place where I can read about all these things how it works?
    Please let me know if I should provide more information. I have noted down everything I can think of. I really need to get this going asap.
    My code looks as follows:
    package hello;
    import java.util.Calendar;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.location.Coordinates;
    import javax.microedition.location.Criteria;
    import javax.microedition.location.Location;
    import javax.microedition.location.LocationProvider;
    public class HelloMIDlet extends MIDlet implements CommandListener {
    private int err = 0;
    private Command exitCommand;
    private Display display;
    StringItem errTest;
    public HelloMIDlet() {
    display = Display.getDisplay(this);
    exitCommand = new Command("Exit", Command.EXIT, 0);
    public void startApp() {
    try{
    StringItem t = new StringItem("First: ", "Baseline");
    StringItem t2 = new StringItem("After Criteria cr: ", "0");
    StringItem t3 = new StringItem("After cr.setHoriz: ", "0");
    StringItem t4 = new StringItem("After LocationProvider: ", "0");
    StringItem t5 = new StringItem("After Location l: ", "0");
    StringItem t6 = new StringItem("After Coordinates c: ", "0");
    StringItem t7 = new StringItem("After double lat: ", "0");
    StringItem t8 = new StringItem("After double lon", "0");
    errTest = new StringItem("Error", "0");
        err = 1;
    Form form = new Form("TestLocation");
    form.append(t);
    form.append(t2);
    form.append(t3);
    form.append(t4);
    form.append(t5);
    form.append(t6);
    form.append(t7);
    form.append(t8);
    form.append(errTest);
        err = 2;
    form.addCommand(exitCommand);
    form.setCommandListener(this);
    display.setCurrent(form);
    long time = Calendar.getInstance().getTime().getTime();
    t.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
        err = 3;
        Criteria cr= new Criteria();
    t2.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    err = 4;
    cr.setHorizontalAccuracy(500);
    err = 5;
    t3.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    // Get an instance of the provider
    LocationProvider lp= LocationProvider.getInstance(cr);
    err = 6;
    t4.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    Location l = lp.getLocation(60);
    err = 7;
    t5.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    Coordinates c = l.getQualifiedCoordinates();
    err = 8;
    t6.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    if(c != null ) {
    // Use coordinate information
    double lat = c.getLatitude();
    err = 9;
    t7.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    double lon = c.getLongitude();
    err = 10;
    t8.setText(Long.toString((Calendar.getInstance().getTime().getTime())-time));
    }catch (Exception e){
    System.out.println(e.getMessage() + " - " + err);
    errTest.setText(e.getMessage() + " - " + err);
    e.printStackTrace();
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    public void commandAction(Command c, Displayable s) {
    if (c == exitCommand) {
    destroyApp(false);
    notifyDestroyed();
    }Would be most greateful if anyone could help ou, it's a bit stressful to dump into problems like this without any clue how to solve it.
    Thank you in advance!
    /Niklas

    ...Is there any other way to do on-device debuging not using Sony Ericsson Device Explorer?Well I think it depends on whether device supports debug wire protocol like KDWP or JDWP. If it does then you might try debugging with Netbeans Mobility or with Wireless Toolkit ...

  • Windows XP and java.lang.NoClassDefFoundError: Console

    Our company is currently using a web page to launch a java applet that redirect the user to an application server to demo our product. This has been and still is working fine for all Windows version until XP. And depending on which version of XP, sometimes it will work and sometime it won't. The link to the web site to launch the applet is http://www.aasys.com/gs_java/iejava.htm if you wish to test it.
    It should take you to a screen asking for a security code which we would provide to our customers. If you get this far it is working.
    Any suggestion would be helpful.
    Thanks.
    DP Grose
    Below is the error message we get on some of the Windows XP versions :
    Java(TM) Plug-in: Version 1.4.2
    Using JRE version 1.4.2 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Don
    Proxy Configuration: No proxy
    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 properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.NoClassDefFoundError: Console
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Your first option we are currently looking at but have not tested it yet. We would prefer the end user not to have to do this, but they may have to in the end.
    Your second option seems the best route to go and we may be able to get the source code from our vendor. Once this is compiled under 1.4.2 will it still be compatable with the older version of MS JVM or will our users need to download the current Java plugin? Since this the way that Java is proceeding this will most likely work for everyone.
    Thanks.

  • CSSTokenNotAcceptedException and java.lang.OutOfMemoryError

    Hi
    Our 11.1.1.1 Planning service crashed this morning and I would like to know if anyone can suggest what might have caused it? Here are the details:
    The Planning service hung at approximately 9.15am on 6.9.2011.
    Steps to restore service:
    1) Standard services restart script failed to resolve. Planning service did not stop.
    2) Terminated the Planning.exe process.
    3) Restarted the Planning service in Services.msc.
    Analysis:
    HYS9Planning.exe during outage:
    CPU: 50
    Mem Usage: 1,357,648K
    HYS9Planning.exe after service was restored:
    CPU: 00
    Mem Usage: 221,736K
    The first error in the HYS9Planning-sysout.log occurred sometime after 8.50am:
    Reaquired task list lease: Tue Sep 06 08:50:20 GMT10:00 2011: 1315263020136+
    +[HspCSS:GetTokenFromIdentity] CSSTokenNotAcceptedException+
    Error Code: 11
    com.hyperion.css.CSSTokenNotAcceptedException: 25:1014:Token is not valid.     Error Code: 11
    The above repeated about a dozen times before the below error presented in the log :
    Exception in thread "Thread-86" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "Timer-0" Exception in thread "Thread-6" java.lang.OutOfMemoryError: Java heap space
    Query Failed: SQL_DELETE_EXPIRED_EXTERNAL_ACTIONS:[100]
    java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    Error encountered with Database connection, recreating connections.Exception in thread "Thread-76" java.lang.OutOfMemoryError: Java heap space
    +Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "Thread-51" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "RMI TCP Connection(6062)-10.192.64.46" java.lang.OutOfMemoryError: Java heap space+
    +Java heap space+
    +Exception in thread "TP-Processor3" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "TP-Processor2" java.lang.OutOfMemoryError: Java heap space+
    +deleteing a HBRServer connection+
    At the time, a Smartview user was experiencing a timeout issue. Could this be a possible cause?
    Your assistance is appreciated.
    Cheers

    It does sound like your web application has fallover because it has hit the maximum java size allowed.
    By default I thought it was set to something like 512mb
    As you are on windows and no doube you are running planning as a service you can increase the max JVM by going into the registry and to
    HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\HyperionPlanning\HyS9Planning
    You will see an option with -Xmx which is possibily set to -Xmx512m
    You can increase that to say -Xmx1024m
    Though on your version and OS planning is probably 32bit so I wouldn't increase it much more than that.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Marshaloutputstream replaceobject and java.lang.ClassCastException

    I'm getting a classcastexceptio when I try and replace a stub with a dynamically wrapped stub. I read in the serialization spec
    "When objects are being replaced, the subclass must ensure that the substituted object is compatible with every field where the reference will be stored, or that a complementary substitution will be made during deserialization. Objects, whose type is not a subclass of the type of the field or array element, will later abort the deserialization by raising a ClassCastException and the reference will not be stored. "
    So basically I want to replace the stub with a proxy for the stub and I have no idea why it's not working. Can anyone explain to me what sun means by the above paragraph and how if it is indeed possible to replace a stub with a proxy for that stub to do so?? please please help.

    i know this is meaningless but here is my stack trace
    java.lang.ClassCastException: cannot assign instance of $Proxy0 to field Dynamic
    StubHandler.stub of type java.rmi.server.RemoteStub in instance of DynamicStubHa
    ndler
    at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStre
    amClass.java:1840)
    at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:10
    62)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:18
    51)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:18
    45)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:84)
    at Client.run(Client.java:19)
    at Client.main(Client.java:14)
    I know what I need to do but have no idea how to do it :(

  • Netbeans profiler and "java.lang.OutOfMemoryError: Java heap space"

    I have a swing application. When I run this program, I get java.lang.OutOfMemoryError: Java heap space periodically.
    I am using the netbeans profiler to figure out how my heap size is increasing and whether or not I have any memory leaks. What I see is that I have lots of int[] getting generated. When I take the snapshot and look at the allocation stack traces, I cannot find the packages in my code at all. I see classes in java.awt.image.*, sun.awt.image.*, javax.swing.*, etc., but nothing referring to the classes I have developed. What could be wrong and how come I do not see anything referring to my code so that I can fix it?

    Take a look here.
    It seems that you may have a similar situation. If you read through, you'll see that the number of surviving generations gives an indication of where to look.

  • ClassLoader and java.lang.RessourceBundle

    Hi all,
    I develloped a classloader and it works well for the normal class.
    But when the java programm need to get a ressourceBundle (RessourceBundle.getBundle(...../MessageBundle)) , my class loader fail because the system looks for MessageBundle_fr_FR and it does not exist.
    But when I add the jar in wich the MessageBundle is normally located it's works well with the SystemClassLoader.
    So is the MessageBundle_fr_FR important?
    Thank you,
    Cheers,
    Adrien

    When I try to load the class without the MessageBundle_fr_FR I get :
    Exception in thread "main" java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at App.main(App.java:34)
    Caused by: java.util.MissingResourceException: Can't find bundle for base name com/sun/javacard/converter/MessagesBundle, locale fr_FR
         at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
         at java.util.ResourceBundle.getBundleImpl(Unknown Source)
         at java.util.ResourceBundle.getBundle(Unknown Source)
         at com.sun.javacard.converter.util.Notifier.<clinit>(Notifier.java:24)
         ... 7 more
    Caused by: java.lang.ClassFormatError: Incompatible magic value 587866912 in class file com/sun/javacard/converter/MessagesBundle
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at MyClassLoader.loadClass(MyClassLoader.java:104)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.util.ResourceBundle$Control.newBundle(Unknown Source)
         at java.util.ResourceBundle.loadBundle(Unknown Source)
         at java.util.ResourceBundle.findBundle(Unknown Source)
         at java.util.ResourceBundle.findBundle(Unknown Source)
         at java.util.ResourceBundle.findBundle(Unknown Source)
         ... 10 more

  • Blob and java.lang.AbstractMethodError

    I can't make this code (below) to work. I get an java.lang.AbstractMethodError trying. Does anyone have a clue about what might cause this error?
    My setup:
    jsdk 1.4
    Oracle 8.1.7
    Forte4J 4.0
    Thanks in advance
    Roland
    ---------- the code --------------
    conn = cp.getConnection(_database, user, password);
    conn.setAutoCommit(true);
    PreparedStatement stat = conn.prepareStatement(sql.toString());
    stat = conn.prepareStatement(sql.toString());
    stat.setLong(1, id);
    ResultSet res = stat.executeQuery();
    if(res.next()){
    setId(res.getLong("id"));
    Blob b = res.getBlob("data");
    stat.close();

    PreparedStatement stat =
    conn.prepareStatement(sql.toString());
    stat = conn.prepareStatement(sql.toString());yes there is something wrong there but if your problem is
    occurring with
    Blob b = res.getBlob("data");then the problem is that the ResultSet you are using does not implement this method. getBlob is a method that was introduced in JDBC 2.0. in fact the Blob interface itself was introduced in JDBC 2.0.
    you can try on of the following...
    get a new driver that implements getBlob. for oracle i think you will be fine. you can get a new driver here http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
    the other option if you cannot get a new driver is to use the getBinaryStream() method of ResultSet to retrieve your data

Maybe you are looking for