Java.lang.NullPointerException? only on firefox? HELP

ok, so while running any java applets, i get this error
java.lang.NullPointerException
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
i am not a java coder, i am just trying to use java applets created by people.
the strange thing is, this only happens on mozzila firefox, and only on my one desktop, someone else who has a desktop on my computer can run java perfectly! PLEASE HELP! how can i fix this so i can use java applets?

I had exactly this same problem appear from out of the blue a week ago.
The solution for me was to reset the general.useragent.override config parameter.
To be precise, I opened the about:config page, searched for and found the general.useragent.override parameter, right-clicked it and selected the "reset" option. The value was thereby replaced with an empty string, like "", and after I closed and re-opened firefox even the base entry for general.useragent.override was gone.
Considerable time was spent on this problem, and none of the following made any difference: un/reinstalling the JRE, un/reinstalling firefox, deleted various java directories from c:\ such as in program files, temp, windows, application data, etc.
Curiously, using the Java control panel config tool to change Network Settings did have some effect. Selecting Direct Connection for proxy settings would eliminate the nullpointerexception, but also disable the java plugin. the error could be recreated simply by opening the Java Console from within firefox, and typing the "P" command, which reloads the proxy configuration.
For those who may care to research this further, my exact useragent override string was, between the quotes: "Mozilla/4.0 (Macromedia Flash Player 8/8;compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.1.4322) " Now, that parameter was set months ago, and java applets had been working fine until just recently, so clearly there is some odd combination of problems at work. I can't help but suspect some automatic update, perhaps to firefox 2.0.0.7, was responsible?

Similar Messages

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

  • Java.lang.NullPointerException in Integration Directory

    Hi,
    when i am trying to create Configuaration Scenario in ID
    it is giving error as  " java.lang.NullPointerException"
    Could any one help on this..
    Thanks in Advance.
    Regards,
    Vijay

    uncheck proxy settings of ur brwoser
    (Tools>Internet options>connections-->lan settings)
    Also after the restart...check if ur j2ee engine isreally up.
    cos u might not have closed the XI home page and
    j2ee engine may not have been up. So refresh XI homepage
    to check if engine is up.
    https://weblogs.sdn.sap.com/pub/wlg/1688 [original link is broken] [original link is broken] [original link is broken]

  • Java.lang.NullPointerException with non admin account in firefox

    Hi everybody. I'm new to java and after trying installing JDK 6 and Netbeans I got this exception everytime I visit a site that use java technology :
    java.lang.NullPointerException
    at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
    at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
    at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
    This happens only with firefox (IE and Opera works well) and only if I log in a Windows non administrative account.
    One month ago everything worked well with firefox. I tried to uninstall JDK anr JRE 6 and reinstall 1.5.11 as well as reinstall firefox. I tried even Gran Paradiso Alpha2, but I got the same exception.
    I'm using winxp SP2
    What can I do ? Please help me !
    Thanks by advance
    Maury

    hi,
    name of the class file is HTTPTransfer.java only,but i am mistaken
    NPE getting at 329 , that is in the if condition at
    if ((t != null) && (pi != null) && (pi.length > 0))
    proxyhost = pi[0].getHost();
    proxyport = pi[0].getPort();
    i tried with pi[] , then also i am getting NPE , i am really sorry for that ....
    i did'nt noticed
    stacktrac:
    Jun 29, 2007 5:41:28 PM com.atonesoftware.web.applet.upload.client.MApplet <init>
    INFO: BatchUpload 1.7c Build Alpha
    java.lang.NullPointerException
         at com.atonesoftware.web.applet.transfer.client.http.HTTPTransfer.autoDetectProxy(HTTPTransfer.java:329)
         at com.atonesoftware.web.applet.transfer.client.http.HTTPTransfer.init(HTTPTransfer.java:117)
         at com.atonesoftware.web.applet.transfer.client.http.HTTPUploadTransfer.init(HTTPUploadTransfer.java:90)
         at com.atonesoftware.web.applet.transfer.client.util.Conf.getTransferController(Conf.java:644)
         at com.atonesoftware.web.applet.upload.client.MApplet.init(MApplet.java:86)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • Java.Lang.nullpointerexception issue only isolated to a repository on the job server

    I am having the
    "Java.Lang.nullpointerexception" error message issue only isolated to a repository on the job server.
    This error message appearing when i try to execute or create a new schedule for a job on mgmt console.
    I have few other repositories in the same server, with those repositories i am not having any issues, in terms of executing a job or creating a new schedule.
    Does any one had the similar issue, and know how to resolve it.
    Thanks a lot for the helpful info.

    Hello George / Viacheslav, thks to both for responding.
    BODS is based on 4.0 never was migrated from 3.2
    Under this repository almost 30 jobs currently running with no issues, which were created and scheduled before this error started.
    THis error message started just two months ago, since then it is not allowing any new jobs to be executed or creating any new schedules.
    But all prior jobs are running fine no issues.
    FRom designer i am able to execute with no problem, This issue is only happening on Mgmt console and only in this repository.
    Repository name has no apostrophe, all repsositories have the same style naming convention.
    "BODS_THENAME"
    Here i am pasting the block from viewsoure, where the error is:
     <span nowrap class="viewContext">Repository: BODS_JBROOK</span><table class="viewcontrollerarea" style="height:1"><COLGROUP><COL width="100%"/></COLGROUP><tr><td class="viewcontrollerheaderspacer"></td></tr><tr><td class="viewcontrollerheadertabarea"><table class="viewcontrollertabs"><tr class="viewcontrollertabs"><td class="viewcontrollertabs"><img border=0  src="../images/tab_sel_left.gif"></td><td class="selectedTab" nowrap background="../images/tab_sel_center.gif" ><a class="selectedTab"  href="/DataServices/servlet/AwBatchJobExecute?REPOSITORY_NAME=BODS_JBROOK&GUID=7cb34824-6d1f-42cc-9968-6c69d006ee87&NAME=Job_TestRaghuRepo&HISTORY=%2FDataServices%2Fservlet%2FAwBatchJobHistory%3FREPOSITORY_NAME%3DBODS_JBROOK%26SHOWREPO%3D2%26ACTIVE_VIEW%3DBatch%2BJob%2BConfiguration&ACTIVE_VIEW=Execute+Batch+Job">Execute Batch Job</a></td><td class="viewcontrollertabs"><img border=0  src="../images/tab_sel_right.gif"></td></tr></table></td></tr><tr bgcolor="#7997CD" ><td height="2px" class="viewfont" VALIGN=CENTER width="100%"></td></tr><tr><td class="viewcontrollermain"><div id="tipDiv" class="tipdiv"></div><span class="viewMessage">java.lang.NullPointerException</span><br><span class="viewMessage"> <!-- </span><br><span class="viewMessage">java.lang.NullPointerException at com.acta.repo.AwJobCommandOptions.getDBServerName(AwJobCommandOptions.java:322) at com.acta.repo.AwJobCommandOptions.getConnectionCmd(AwJobCommandOptions.java:388) at com.acta.repo.AwJobCommandOptions.getConnectionCmd(AwJobCommandOptions.java:379) at com.acta.repo.AwJobCommandOptions.validateConnectionInformation(AwJobCommandOptions.java:296) at com.acta.repo.AwJobCommandOptions.init(AwJobCommandOptions.java:168) at com.acta.repo.AwJobCommandOptions.<init>(AwJobCommandOptions.java:91) at com.acta.webapp.admin.report.AwExecuteBatchJobPage.submitAction(AwExecuteBatchJobPage.java:586) at com.acta.webapp.mdreport.common.DIView.doAction(DIView.java:564) at com.acta.webapp.mdreport.common.DIView.PrintReport(DIView.java:406) at com.acta.webapp.mdreport.common.DIViewController.PrintReport(DIViewController.java:84) at com.acta.webapp.mdreport.reportframework.JCActaGenericSection.PrintReport(JCActaGenericSection.java:112) at com.acta.webapp.mdreport.common.DIFrame.PrintReport(DIFrame.java:67) at com.acta.webapp.mdreport.common.DIMainFrame.PrintReport(DIMainFrame.java:98) at com.acta.webapp.mdreport.common.DIBaseReport.PrintMainFrame(DIBaseReport.java:233) at com.acta.webapp.mdreport.common.DIBaseReport.PrintReportImpl(DIBaseReport.java:158) at com.acta.webapp.mdreport.common.DIBaseReport.PrintReport(DIBaseReport.java:269) at com.acta.webapp.admin.servlet.AwBatchJobExecuteServlet.doPostSafe(AwBatchJobExecuteServlet.java:30) at com.acta.webapp.mdreport.reportframework.JSActaHttpServlet.doPost(JSActaHttpServlet.java:359) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.acta.webapp.mdreport.servlet.JSFilter.doFilter(JSFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.acta.webapp.mdreport.servlet.EscapeFilter.doFilter(EscapeFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)</span><br><span class="viewMessage"> --></span><br>

  • Help with "Exception in thread "Thread-4" java.lang.NullPointerException"

    I am new to Java and I am trying a simple bouncing ball example from Stanford. Here is their simple example that works.
    import acm.program.*;
    import acm.graphics.*;
    import java.awt.*;
    public class BouncingBallWorking extends GraphicsProgram {
    /** sets diameter */
    private static final int DIAM_BALL = 30;
    /** amount y velocity is increased each cycle */
    private static final double GRAVITY = 3;
    /** Animation delay or pause time between ball moves */
    private static final int DELAY = 50;
    /** Initial X and Y location ball*/
    private static final double X_START = DIAM_BALL / 2;
    private static final double Y_START = 100;
    private static final double X_VEL = 3;
    private static final double BOUNCE_REDUCE = 0.9;
    private double xVel = X_VEL;
    private double yVel = 0.0;
    private GOval BallA;
    public void run() {
    setup(X_START,Y_START);
    //         Simulation ends when ball goes off right hand
    //         end of screen
    while (BallA.getX() < getWidth()) {
    moveBall(BallA);
    checkForCollision(BallA);
    pause(DELAY);
    private void setup(double X_coor, double Y_coor) {
    BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
    add(BallA);
    private void moveBall(GOval BallObject) {
    yVel += GRAVITY;
    BallObject.move(xVel,yVel);
    private void checkForCollision(GOval BallObject) {
    if(BallObject.getY() > getHeight() - DIAM_BALL){
    yVel = - yVel * BOUNCE_REDUCE;
    double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
    BallObject.move(0, -2 * diff);
    } Now I am trying to modify "setup" so it I can create several balls. I made a simple modification to "setup" and now I am getting an error.
    "Exception in thread "Thread-4" java.lang.NullPointerException
    at BouncingBallNotWorking.run(BouncingBallNotWorking.java:36)
    at acm.program.Program.runHook(Program.java:1592)
    at acm.program.Program.startRun(Program.java:1581)
    at acm.program.AppletStarter.run(Program.java:1939)
    at java.lang.Thread.run(Unknown Source)"
    Can you describe why I am getting an error? Thanks.
    Here is what I changed.
    Before:
         private void setup(double X_coor, double Y_coor) {
              BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
              add(BallA);
         }After:
         private void setup(double X_coor, double Y_coor, GOval BallObject) {
              BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
              add(BallObject);
         }Here is the complete code.
    * File:BouncingBall.java
    * This program graphically simulates a bouncing ball
    import acm.program.*;
    import acm.graphics.*;
    import java.awt.*;
    public class BouncingBallNotWorking extends GraphicsProgram {
    /** sets diameter */
    private static final int DIAM_BALL = 30;
    /** amount y velocity is increased each cycle */
    private static final double GRAVITY = 3;
    /** Animation delay or pause time between ball moves */
    private static final int DELAY = 50;
    /** Initial X and Y location ball*/
    private static final double X_START = DIAM_BALL / 2;
    private static final double Y_START = 100;
    private static final double X_VEL = 3;
    private static final double BOUNCE_REDUCE = 0.9;
    private double xVel = X_VEL;
    private double yVel = 0.0;
    private GOval BallA;
    public void run() {
    setup(X_START,Y_START, BallA);
    //         Simulation ends when ball goes off right hand
    //         end of screen
    while (BallA.getX() < getWidth()) {
    moveBall(BallA);
    checkForCollision(BallA);
    pause(DELAY);
    private void setup(double X_coor, double Y_coor, GOval BallObject) {
    BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
    add(BallObject);
    private void moveBall(GOval BallObject) {
    yVel += GRAVITY;
    BallObject.move(xVel,yVel);
    private void checkForCollision(GOval BallObject) {
    if(BallObject.getY() > getHeight() - DIAM_BALL){
    yVel = - yVel * BOUNCE_REDUCE;
    double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
    BallObject.move(0, -2 * diff);
    } Edited by: TiredRyan on Mar 19, 2010 1:47 AM

    TiredRyan wrote:
    That is great! Thanks. I've got two question though.
    1.) Now I want to have 100 bouncing balls. Is the best way to achieve this is through an array of GOvals? I haven't gotten to the lecture on arrays on Stanford's ITunesU site yet so I am not sure what is possible with what I know now.An array would work, or a List. But it doesn't matter much in this case.
    2.) Are references being passed by value only applicable to Java or is that common to object-oriented programming? Also is there a way to force Java to pass in "BallA" instead of the value "null"?I can't say about all OO languages as a whole, but at least C++ can pass by reference.
    And no, there's no way to pass a reference to the BallA variable, so the method would initialize it and it wouldn't be null anymore.
    When you call the method with your BallA variable, the value of the variable is examined and it's passed to the method. So you can't pass the name of a variable where you'd want to store some object you created in the method.
    But you don't need to either, so there's no harm done.

  • Java.lang.NullPointerException when writing to a textfield..help please?

    Hi guys,
    I'm getting a java.lang.NullPointerException (with no other details of error) when i try to write to a textfield on my GUI. the line: TF1.setText("F"); is where the problem is occurring. that line is within a loop ->                
                   if(freq >87 && freq < 100)
                                       System.out.println("Note =F" +freq);
                                       TF1.setText("F");
    the textfield has been constructed and initialised and given an initial value. what i need to happen is the string in the textfield to be constantly updated (overwritten) with the new string.
    the initial value from      TextField TF1= new TextField("", 10);
    TF1.setText("blank");
    works fine, but one the loop above is entered, the current frequency is printed to the command line and then "java.lang.NullPointerException" is thrown.
    I'm struggling with this, and have a deadline to meet so I would much appreciate some help.

    The Gui class is this:
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.Panel;
    import java.awt.TextField;
    import javax.swing.JFrame;
    import javax.swing.*;
    public class Gui extends JFrame{
    public static void main(String args[])
    Project project = new Project();
    project.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         project.setSize( 250, 200 ); // set frame size
    project.setVisible( true ); // display frame
    // new Project(){//constructor
         Panel p, p1;
    p = new Panel();
              p.setLayout (new FlowLayout(FlowLayout.LEFT,5,5));
              project.add(p, BorderLayout.NORTH);
         p1 = new Panel();
         p1.setLayout (new FlowLayout(FlowLayout.LEFT,5,5));
    p1.setLayout (new GridLayout(4,1));
    project.setTitle("Guitar Tuner Prototype");
         TextField TF1= new TextField("", 10);
    TF1.setText("blank");
         p1.add(TF1);
         TF1.setVisible(true);
         p1.setVisible(true);
         p.add(p1);
    //Capture input data from the microphone
    project.captureAudio();
    project.captureThread();
    }//end constructor
    //end main
    The project.java class has the "private TextField TF1; at the top. the project.java class also contains the loop thats writing to the texfield as specified in th original post..

  • HELP!!!!  java.lang.NullPointerException

    HELP!!!!
    java.lang.NullPointerException
    at csc.util.SQLstatement.prepStatement(SQLstatement.java:24)
    at csc.util.dbutil.DBprcslogEnd(dbutil.java:713)
    at tr_fets_ck.processMain(tr_fets_ck.java:266)
    at tr_fets_ck.main(tr_fets_ck.java:175)
    java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at tr_fets_ck.processMain(tr_fets_ck.java:183)
    at tr_fets_ck.main(tr_fets_ck.java:175)
    I can run my code using jdeveloper 10g using a default file and everything works fine but when I run my code in the production environment I get the error listed above.
    Here's portions of the code.
    public void processMain(csc.util.SQLstatement sq, String filename) {
    try {
    // Connect to the database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn = DriverManager.getConnection("jdbc:odbc:TEST","test","test4xml");
    // Open specified file
    if (xu.Check_File_Processed(conn, filename)){
    xu.WriteXMLProblem("FAILURE", err, "N/A", "FILE " filename " HAS ALREADY BEEN RUN SUCCESSFULLY","https://msis.k12.ms.us/SAP/MSIS_err.html#87");
    UpdateFETSDistrict(conn, "N", filename, district, year, sq);
    xu.Process_Results_Report(conn,err,filename);
    conn.commit();
    conn.close();
    System.exit(0);
    The code that I think is generating the error is:
    if (CheckYearInd(conn,district, year, sq)) {
    xu.WriteXMLProblem("FAILURE", err, "N/A", "FILE " filename " PREVIOUS YEAR DATA HAS ALREADY BEEN COMPLETED","https://msis.k12.ms.us/SAP/MSIS_err.html#87");
    UpdateFETSDistrict(conn, "N", filename, district, year, sq);
    xu.Process_Results_Report(conn,err,filename);
    conn.commit();
    conn.close();
    System.exit(0);
    public static boolean CheckYearInd (Connection conn,
    String district,
    String year,
    csc.util.SQLstatement sqs)
    // check the FETS_DISTRICT_APPROVAL table for a record.
    // Return FALSE if previous year data exists = Y.
    // Return TRUE if no record exists
    throws SQLException
    PreparedStatement pstmt1 = null;
    String SQLString = "select count(rowid) from FETS_DISTRICT_APPROVAL" +
    " where DISTRICT_NUMBER = ? and "+
    " YEAR = ? and " +
    " BOND_DATA_IND = 'Y' and "+
    " STATE_APPROVAL_STATUS = 'COMPLETED' and "+
    " REQ_RESUBMISSION = 'N' ";
    // System.out.println(SQLString);
    pstmt1 = sqs.prepStatement(conn,SQLString);
    pstmt1.setString(1,district);
    pstmt1.setString(2,year);
    ResultSet rset = pstmt1.executeQuery();
    rset.next ();
    if (rset.getInt(1) > 0) {
    rset.close();
    return false;
    } else {
    rset.close();
    return true;
    } // end CheckYearProcessed 

    package csc.util;
    import java.io.*;
    import java.math.*;
    import java.sql.*;
    import java.util.Vector;
    public class SQLstatement {
    Vector vSQL_string = new Vector();
    Vector vSQL_stmt = new Vector();
    public PreparedStatement prepStatement(Connection conDB, String strSQL)
    throws SQLException {
    PreparedStatement pstmt = null;
    try{
    int intSQLIndex = vSQL_string.indexOf(strSQL);
    if (intSQLIndex != -1) {
    line 24==> pstmt = (PreparedStatement)vSQL_stmt.elementAt(intSQLIndex);
    } else {
    pstmt = conDB.prepareStatement(strSQL);
         vSQL_string.addElement(strSQL);
         vSQL_stmt.addElement(pstmt);
    return pstmt;
    } catch (SQLException e) {
    System.err.println (e.getMessage()); // detail message
    System.err.println ("* SQL ERROR * strSQL="+strSQL);
    throw e;
    } // end prepStatement()
    } // end class SQLstatement

  • Java.lang.NullPointerException with Ant build, only in 4.7

    Hi,
    I hope some one out there can help.
    I have a large project that uses Ant for release builds, that must be "Run in the same JRE as workspace"
    This has always been fine in fb4.5 and 4.6 but in 4.7 fb.exportReleaseBuild gives us a java.lang.NullPointerException.
    I can just load the project up in 4.6 and build it for now, but as you can't get 4.6 any more this isn't a long term solution.
    I can reproduce the issue in 4.7 on two boxes in either by doing the following:
    Create a new flex project called "buildTest",
    Add a build folder,
    Create a new file named build.xml (in the build folder)
    Put the following in the build file:
         <?xml version="1.0" encoding="utf-8"?>
         <project default="default" basedir="../">
                        <!-- target: default -->
                        <target name="default">
                                       <fb.exportReleaseBuild project="BuildTest"/>
                        </target>
         </project>
    Right click on the build file,
         Run as -> Ant Build... -> JRE (tab) -> select "Run in the same JRE as the workspace" -> Click "Run"
    If you do this in 4.6 (on either of my boxes) it works fine. if you do it in 4.7 (again on either box) you get the following error:
    BUILD FAILED
    C:\Users\germanD1\Documents\Projects\test Projects\Ant Test\BuildTest\build\build.xml:6: java.lang.NullPointerException
    You can even create it and watch it fail in 4.7 then open the same proj in 4.6 and watch it work!!!
    I hope someone can help, this is driving me mad.
    Many thanks
    Dan

    Hi,
    I hope some one out there can help.
    I have a large project that uses Ant for release builds, that must be "Run in the same JRE as workspace"
    This has always been fine in fb4.5 and 4.6 but in 4.7 fb.exportReleaseBuild gives us a java.lang.NullPointerException.
    I can just load the project up in 4.6 and build it for now, but as you can't get 4.6 any more this isn't a long term solution.
    I can reproduce the issue in 4.7 on two boxes in either by doing the following:
    Create a new flex project called "buildTest",
    Add a build folder,
    Create a new file named build.xml (in the build folder)
    Put the following in the build file:
         <?xml version="1.0" encoding="utf-8"?>
         <project default="default" basedir="../">
                        <!-- target: default -->
                        <target name="default">
                                       <fb.exportReleaseBuild project="BuildTest"/>
                        </target>
         </project>
    Right click on the build file,
         Run as -> Ant Build... -> JRE (tab) -> select "Run in the same JRE as the workspace" -> Click "Run"
    If you do this in 4.6 (on either of my boxes) it works fine. if you do it in 4.7 (again on either box) you get the following error:
    BUILD FAILED
    C:\Users\germanD1\Documents\Projects\test Projects\Ant Test\BuildTest\build\build.xml:6: java.lang.NullPointerException
    You can even create it and watch it fail in 4.7 then open the same proj in 4.6 and watch it work!!!
    I hope someone can help, this is driving me mad.
    Many thanks
    Dan

  • Urgent,pls help! java.lang.NullPointerException

    Dear all,
      I'm doing a web dynpro app for creating the physical inventory doc for WM ( warehse mgmt ).. I haf a input field,storage type which is the be key in by the user.
    When i testing my application,if i type in any 3 digits number tat doesn't belongs to a storage type in R/3,the application seems working fine,it will return me a error msg saying tat the stoage type that i typed in doenst exists in the R/3 system. but if i enter an excat storage type,( for example,002 ) into the intput field,i will get an error msg saying java.lang.NullPointerException . Any gurus haf any idea what is happening? pls help,many thanks.

    Hi Joan,
                   Can u send the stack trace & code line , where u r getting NPE??
    regards
    Sumit

  • Urgent :-Need Help in DOtnet Dll integration with CFM 8. for error "java.lang.NullPointerException"

    Hi Everyone,
    I am trying to intergrate Dotnet DLL with coldfusion. The basic perpose of this DLL is putting value in cache.
    My code is working fine on my local machine but it giving me problem on live server.
    It is throwing "java.lang.NullPointerException" error.
    Description of task:-
    DLL:-
    made in : Dotnet 3.0
    Functions:-
    setCache:- setting a string into cache.
    getCache:- getting value from cache.
    ClearCache:- Clearing all value from Cache.
    Local Machine:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Developer
    Result:-Task is working fine.No error what so ever.
    Live server:-
    OS: window server 2003
    Coldfusion version :MX8
    coldfusion Product level:-Standred
    Result:-Task is throwing error "java.lang.NullPointerException"

    Thanks for your response, but surely if the .NET Services was not running how can CF instantiate and dump the object with all the correct methods?
    Anyway for some strange reason there is no Coldfusion .NET service in my services control panel even though I am running CF8. I have since downloaded the .NET service installer, run it and done a restart but I can still see no such service and the error continues?
    I am running CF8 Dev on IIS 6 – Window XP pro and here is debug
    java.lang.NullPointerException
                   at com.jnbridge.jnbcore.clientTransports.d$b.close(Unknown Source)
                   at java.net.Socket.<init>(Socket.java:368)
                   at java.net.Socket.<init>(Socket.java:209)
                   at com.jnbridge.jnbcore.clientTransports.d$b.<init>(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.d.if(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.c.a(Unknown Source)
                   at com.jnbridge.jnbcore.clientTransports.f.a(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.int(Unknown Source)
                   at com.jnbridge.jnbcore.DotNetSideProxy.getObjectStaticProperty(Unknown Source)
                   at System.Environment.Get_CurrentDirectory()
                   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:597)
                   at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:87)
                   at coldfusion.runtime.dotnet.DotNetProxy.invoke(DotNetProxy.java:38)
                   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272)
                   at cftestDotNet2ecfm215937280.runPage(C:\Inetpub\wwwroot\his_clothing\testDotNet.cfm:20)
                   at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
                   at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
                   at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
                   at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273)
                   at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
                   at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
                   at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
                   at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
                   at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
                   at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
                   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
                   at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
                   at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
                   at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
                   at coldfusion.CfmServlet.service(CfmServlet.java:175)
                   at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
                   at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
                   at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
                   at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
                   at jrun.servlet.FilterChain.service(FilterChain.java:101)
                   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
                   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
                   at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
                   at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
                   at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
                   at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
                   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
                   at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
                   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Help with Exception in thread "main" java.lang.NullPointerException

    I got this exception while running the code in Netbeans IDE 6.1. The code is compiling fine...Please tell me what the problem is
    Exception in thread "main" java.lang.NullPointerException
    at Softwareguide.chooseanswer(Softwareguide.java:32)
    at Driver.main(Driver.java:7)
    public class Driver
        public static void main(String[] args)
            Softwareguide swguide = new Softwareguide();
            swguide.chooseanswer();
    public class Softwareguide
        State test1;
        State test2;
        State test3;
        State test4;
        State test5;
        State subtest1;
        State subtest2;
        State subtest3;
        State subtest4;
        State subtest5;
        State state = test1;
        public Softwareguide()
            test1 = new Test1(this);
            test2 = new Test2(this);
            test3 = new Test3(this);
            test4 = new Test4(this);
            test5 = new Test5(this);
            subtest1 = new SubTest1(this);
            subtest2 = new SubTest2(this);
            subtest3 = new SubTest3(this);
            subtest4 = new SubTest4(this);
            subtest5 = new SubTest5(this);
        public void chooseanswer()
            state.chooseanswer();
       /* public void chooseyes()
            state.chooseyes();
        public void chooseno()
            state.chooseno();
        public State getState()
            return state;
        void setState(State state)
         this.state = state;
        public State getTest1State()
            return test1;
        public State getTest2State()
            return test2;
        public State getTest3State()
            return test3;
        public State getTest4State()
            return test4;
        public State getTest5State()
            return test5;
        public State getsubTest1State()
            return subtest1;
        public State getsubTest2State()
            return subtest2;
        public State getsubTest3State()
            return subtest3;
        public State getsubTest4State()
            return subtest4;
        public State getsubTest5State()
            return subtest5;
        public String toString()
            StringBuffer result = new StringBuffer();
            result.append("\n Starting Diagnostic Test...");
            return result.toString();
    }

    spiderjava wrote:
    the variable state is assigned to test1. This variable(test1) is not initialized anywhere.It is initialized in the c'tor. Which is invoked after the "global" object and attribute initialization. So it is there, but comes too late.
    You should definitly not write a technical Java blog and post it all over the place.

  • Java.lang.NullPointerException, msg=null - Help

    500 Internal Server Error
    JBO-30003: The application pool (oracle.srtutorial.datamodel.SRPublicServiceLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)     at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)     at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1543)     at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1404)     at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:99)     at oracle.adf.model.BindingContext.get(BindingContext.java:457)     at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:280)     at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:248)     at oracle.adf.model.binding.DCUtil.findContextObject(DCUtil.java:383)     at oracle.adf.model.binding.DCIteratorBinding.<init>(DCIteratorBinding.java:127)     at oracle.jbo.uicli.binding.JUIteratorBinding.<init>(JUIteratorBinding.java:60)     at oracle.jbo.uicli.binding.JUIteratorDef.createIterBinding(JUIteratorDef.java:87)     at oracle.jbo.uicli.binding.JUIteratorDef.createIterBinding(JUIteratorDef.java:51)     at oracle.adf.model.binding.DCIteratorBindingDef.createExecutableBinding(DCIteratorBindingDef.java:277)     at oracle.adf.model.binding.DCBindingContainerDef.createExecutables(DCBindingContainerDef.java:296)     at oracle.adf.model.binding.DCBindingContainerDef.createBindingContainer(DCBindingContainerDef.java:425)     at oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(DCBindingContainerReference.java:54)     at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:44)     at oracle.adf.model.BindingContext.get(BindingContext.java:483)     at oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:313)     at oracle.adf.model.BindingContext.findBindingContainerByPath(BindingContext.java:633)     at oracle.adf.model.BindingRequestHandler.isPageViewable(BindingRequestHandler.java:265)     at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:169)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Unknown Source)## Detail 0 ##java.lang.NullPointerException     at oracle.srtutorial.datamodel.SRPublicServiceImpl.prepareSession(SRPublicServiceImpl.java:51)     at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6061)     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:135)     at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7769)     at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074)     at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2161)     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)     at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)     at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1543)     at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1404)     at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:99)     at oracle.adf.model.BindingContext.get(BindingContext.java:457)     at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:280)     at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:248)     at oracle.adf.model.binding.DCUtil.findContextObject(DCUtil.java:383)     at oracle.adf.model.binding.DCIteratorBinding.<init>(DCIteratorBinding.java:127)     at oracle.jbo.uicli.binding.JUIteratorBinding.<init>(JUIteratorBinding.java:60)     at oracle.jbo.uicli.binding.JUIteratorDef.createIterBinding(JUIteratorDef.java:87)     at oracle.jbo.uicli.binding.JUIteratorDef.createIterBinding(JUIteratorDef.java:51)     at oracle.adf.model.binding.DCIteratorBindingDef.createExecutableBinding(DCIteratorBindingDef.java:277)     at oracle.adf.model.binding.DCBindingContainerDef.createExecutables(DCBindingContainerDef.java:296)     at oracle.adf.model.binding.DCBindingContainerDef.createBindingContainer(DCBindingContainerDef.java:425)     at oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(DCBindingContainerReference.java:54)     at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:44)     at oracle.adf.model.BindingContext.get(BindingContext.java:483)     at oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:313)     at oracle.adf.model.BindingContext.findBindingContainerByPath(BindingContext.java:633)     at oracle.adf.model.BindingRequestHandler.isPageViewable(BindingRequestHandler.java:265)     at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:169)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Unknown Source)

    Hi,
    the AM cannot connect to the database. Check the database connect information and if the DB is up
    Frank

  • Need help with Exception in thread "main" java.lang.NullPointerException

    here is the error
    Exception in thread "main" java.lang.NullPointerException
    at stream.createFrame(stream.java:153)
    at chat.createMessage(chat.java:14)
    this is where the error is in stream
    public void createFrame(int id) {
              *buffer[currentOffset++] = (byte)(id + packetEncryption.getNextKey());*
    and this is where it comes from in chat
    outStream.createFrame(85);                    
    i just cant see whats causeing the exception

    spiderjava wrote:
    the variable state is assigned to test1. This variable(test1) is not initialized anywhere.It is initialized in the c'tor. Which is invoked after the "global" object and attribute initialization. So it is there, but comes too late.
    You should definitly not write a technical Java blog and post it all over the place.

  • "AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame

    I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
    Exception in thread "main" java.lang.NullPointerException
    at pkg1.GUI.createFrame(GUI.java:123)
    at pkg1.GUI.startFrame2(GUI.java:66)
    at pkg1.Top.cos(Top.java:25)
    at pkg1.Top.main(Top.java:20) My code:
    GUI class
    package pkg1;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Toolkit;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    import oracle.jdeveloper.layout.XYLayout;
    public class GUI
        public JDesktopPane desktop;
        private XYLayout xYLayout1 = new XYLayout();
        public int openFrameCount = 0;
        JFrame f = new JFrame();
        public void GUII()  // Prepare JFrame
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(500, 600);
            f.setVisible(true);
        public void startFrame()
            desktop = new JDesktopPane();
            createFrame(); //create first "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void startFrame2()
            createFrame(); //create second "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void createFrame()
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true); //necessary as of 1.3
            desktop.add(frame);
            frame.add(new GUI2());
        } Top class
    public class Top
        public static void main(String[] args)
            GUI g = new GUI();
            g.GUII(); //Create JFrame
            g.startFrame(); //Create JInternalFrame
            Top t = new Top();
            t.sth();
        public void sth()
            GUI gui = new GUI();
            gui.startFrame2();
    } MyIntternalFrame class
    import javax.swing.JInternalFrame;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import oracle.jdeveloper.layout.XYConstraints;
    import oracle.jdeveloper.layout.XYLayout;
    /* Used by InternalFrameDemo.java. */
    public class MyInternalFrame extends JInternalFrame {
        static int openFrameCount =  0;      
        static final int xOffset = 30, yOffset = 30;
        private XYLayout xYLayout1 = new XYLayout();
        private JButton jButton1 = new JButton();
        private JLabel jLabel1 = new JLabel();
        private JFrame c = new JFrame();
        private JPanel d = new JPanel();
        private XYLayout xYLayout2 = new XYLayout();
        public MyInternalFrame() {         
            super("Document #"  + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            int width = new GUI2().width + 10;
            int height = new GUI2().height + 40;
            setSize(width,height);
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
    } Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another class

    Some possibly helpful suggestions:
    1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
    2) Get rid of GUII. The GUI constructor will do all this and more.
    3) Get rid of startFrame and startFrame2.
    4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
    5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
    6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
    Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane).

Maybe you are looking for

  • Error while printing (while saving?)

    Whenever I try to save my book I always get the error: Print Error while printing. However, I'm not trying to print, I'm trying to SAVE.  From what I can tell the file is saving just fine, however I hope that there is nothing actually wrong with the

  • How to set up Mail as POP

    I am using a WordPress Plug-in that requires a POP mail account that uses a relay. Yahoo has been recommended but when I one it in MacMail it opens as a an iMap. How do I fix that or work around it

  • OpsMgr Connector 20066 event on Gateway server

    Hi, We have one of our Gateway servers in Grey state. When i had checked the eventviewer of the server could find lots of 20066 events and 21042 OpsMgr connector errors. Log Name:      Operations Manager Source:        OpsMgr Connector Date:        

  • Can i configure the appearance/elements of mac os x windows?

    Allright. I'm using 10.4.11 (Tiger) on an iBook G4. In all my windows that open, the vertical scrollbar that appears on the right-side has the 'up' and 'down' buttons situated at the bottom, together, on top of one another. Can I configure it to have

  • Identifier based credentials- linking multi identifiers to one course?

    We have instructors teaching serveral sections of the same course and each course has an unique identifier linked to that course.In our itunes U we have multi classes named the same (taught by the same instructor)and use unique identifiers. How can I