Popups throwing a NullPointerException

I know that I will get jives because I am using awt, and I bet this problem is about Swing being more developed than awt, but anyway:
I am trying to get a popup to appear when I click on a label. (right-click because I am using Windows). I am using the following code. When I right-click on the labl I get a NullPointerException, because the popup doesn't have a parent. From what I understood, a parent I the Menu from which the popup should appear, but I don't want it that way; I want it to popup from "anywhere" (well, actually, the label).
May I note that I downloaded the source code from Sun's tutorials and they worked, I added a simple command to check for the popup's parent and discovered it is null, but that was in Swing.
Can you please advise? Many thanks.
here's the code:
import java.awt.*;
import java.awt.event.*;
public class MyFrame extends Frame implements ActionListener
     //properties
     private Label lbl;
     private MenuItem miClick;
     private PopupMenu pum;
     //constructor
     public MyFrame()
          setSize(200, 200);
          lbl = new Label("before menu item");
          lbl.addMouseListener(new MyMouseEvent(pum));
          add(lbl);
          pum = new PopupMenu();
          miClick = new MenuItem("Click me");
          miClick.addActionListener(this);
          pum.add(miClick);
          setVisible(true);
     //methods
     public void actionPerformed(ActionEvent ae)
          lbl.setText("After Click");
     //nested class
     public class MyMouseEvent extends MouseAdapter
          //properties
          PopupMenu pum;
          //constructor
          public MyMouseEvent(PopupMenu pop)
               pum = pop;
          //methods
          public void mousePressed(MouseEvent me)
               doPopup(me);
          public void mouseReleased(MouseEvent me)
               doPopup(me);
          public void doPopup(MouseEvent me)
               if(me.isPopupTrigger())
                    pum.show(me.getComponent(), me.getX(), me.getY());
}Run it from any where like this:
MyFrame f = new MyFrame();Right-click on the label named click me, and a NullPointerException should be throw.
Thanks

Oh my gosh, I am sooo sorry about that.
I amended the code, and the constructor now read:
public MyFrame()
     setSize(200, 200);
     lbl = new Label("before menu item");
     pum = new PopupMenu();
     miClick = new MenuItem("Click me");
     miClick.addActionListener(this);
     pum.add(miClick);
     lbl.addMouseListener(new MyMouseEvent(pum));
     add(lbl);
     setVisible(true);
}Unfortunately, it's still throwing the same exception: NullPointerException: parent is null
DarrylBurke wrote:
And MyMouseEvent is a terrible name for a class that is in fact a MouseListener and not in any way a MouseEvent.
dbI know, but I wrote that in 2 minutes, and didn't really take notice of naming. =D It's just a SSCCE.
Thanks for the time,
Two-eyes %
PS: the TraceStack shows that the exception is being thrown here:
public void doPopup(MouseEvent me)
     if(me.isPopupTrigger())
          pum.show(me.getComponent(), me.getX(), me.getY()); //<--here
}Edited by: two-eyes on Jan 11, 2010 7:09 AM

Similar Messages

  • Mac OS X - Printing - PrinterGraphicsConfig.getDefaultTransform() throws a NullPointerException

    Hello guys, I currently try to get our Swing application working on Mac OS X and I found one problem which blocks me. Our application usese the java.awt.print package to generate print-outs.
    One very important information for us is the printers used DPI/PPI setting. We've found a long time ago a tutorial which uses the given Graphics object of the java.awt.Printable.print(Graphics, PageFormat, int) method to get this neseccary information.
    The implementation of our looks like the following:
    * @see java.awt.print.Printable#print(java.awt.Graphics, java.awt.print.PageFormat, int)
    @Override
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
      if (pageIndex != 0)
      return Printable.NO_SUCH_PAGE;
      Graphics2D graphics2D = (Graphics2D) graphics;
      // get the current scale
      AffineTransform defaultDeviceTransform = graphics2D.getDeviceConfiguration().getDefaultTransform();
      double deviceScaleX = defaultDeviceTransform.getScaleX();
      double deviceScaleY = defaultDeviceTransform.getScaleY();
      * this method gets an graphics from the printer which is already scaled to the desired resolution and therefore
      * the dpi can be calculated by the scale of the transformation.
      * -> no other way to determine the dpi were found
      double dpi = deviceScaleX * 72;
      System.out.println("The Printer uses the following DPI setting: " + dpi);
      myPrintingMethod(graphics2D, dpi);
      return Printable.PAGE_EXISTS;
    This way to get the DPI/PPI setting of the printer works perfect if the operating system is Microsoft Windows. But in case of the Mac OS X throws the Line 13. the following NullPointerException:
    java.lang.NullPointerException
    at java.awt.geom.AffineTransform.<init>(AffineTransform.java:488)
    at sun.print.PrinterGraphicsConfig.getDefaultTransform(PrinterGraphicsConfig.java:101)
    at com.intergraph.web.plugin.printing.PrintableDocument.print(PrintableDocument.java:122)
    at sun.lwawt.macosx.CPrinterJob$6.run(CPrinterJob.java:697)
    at sun.lwawt.macosx.CPrinterJob.printAndGetPageFormatArea(CPrinterJob.java:707)
    at sun.lwawt.macosx.CPrinterJob.printLoop(Native Method)
    at sun.lwawt.macosx.CPrinterJob.print(CPrinterJob.java:299)
    at com.intergraph.web.plugin.printing.PrintEngine.print(PrintEngine.java:177)
    at com.intergraph.web.plugin.printing.controller.PrintDocumentJob.run(PrintDocumentJob.java:41)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    I tried to find a workaround but I wasn't sucessful and I only found the following thread from 2008 Simple Printing example that raises many questions .... the result of this thread is not the same but it describes the same problem...
    Does anybody of you know a way to figure out the DPI/PPI setting of a printer?
    I'm tested it with:
    JDK 8u5
    OS X 10.9.4
    Thanks in advance!
    Best Regards,
    Steve

    I tested it with the following printer
    Konica Minolta bizhub C353

  • Why does this select binding throw a NullPointerException?

    This should be pretty simple.  The javadoc for Bindings#selectString says:
    Creates a binding used to get a member, such as a.b.c. The value of the binding will be c, or "" if c could not be reached (due to b not having a c property, b being null, or c not being a String etc.).
    Running this example:
    import javafx.beans.binding.Bindings;
    import javafx.beans.binding.StringBinding;
    import javafx.beans.property.*;
    public class SelectBindingExample {
        public static void main(String[] args) {
            ParentModel parentModel = new ParentModel();
            StringBinding bindingA = createBinding(parentModel);
            String nameA = bindingA.get(); // NPE while evaluating
            System.out.println("Bound value is " + (nameA != null ? nameA : "null") + ".");
            parentModel.setChildModel(new ChildModel());
            StringBinding bindingB = createBinding(parentModel);
            String nameB = bindingB.get();
            System.out.println("Bound value is " + (nameB != null ? nameB : "null") + ".");
        private static StringBinding createBinding(ParentModel parentModel) {
            return Bindings.selectString(parentModel.childModelProperty(), "name");
        public static class ParentModel {
            private final ObjectProperty<ChildModel> childModel = new SimpleObjectProperty<>();
            public final ReadOnlyObjectProperty<ChildModel> childModelProperty() {return childModel;}
            public final ChildModel getChildModel() {return childModel.get();}
            public final void setChildModel(ChildModel childModel) {this.childModel.set(childModel);}
        public static class ChildModel {
            private final StringProperty name = new SimpleStringProperty("Child Model Name");
            public final ReadOnlyStringProperty nameProperty() {return name;}
            public final String getName() {return name.get();}
            protected final void setName(String name) {this.name.set(name);}
    ..causes a NPE while evaluating the binding:
    WARNING: Exception while evaluating select-binding [name]
    Jan 24, 2014 7:10:57 AM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
    INFO: Property 'name' in ReadOnlyObjectProperty [bean: SelectBindingExample$ParentModel@4437c4, name: childModel, value: null] is null
    java.lang.NullPointerException
      at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481)
      at com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394)
      at javafx.beans.binding.StringBinding.get(StringBinding.java:152)
      at SelectBindingExample.main(SelectBindingExample.java:9)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    What's going wrong here?  I've updated the example to work with the Bindings#selectString method from Java 7 and things work as expected.  Is this a bug?
    Slight modification to the example so it works with Java 7.

    An additional thought, though.
    This suggests (implies, I think) that Bindings.selectString(...) is using try-catch structures to process the logic of stepping through the properties and evaluating the result. In pseudocode, something like
    public static StringBinding selectString(ObservableValue<?> root, String... steps) {
       try {
        ObservableValue<?> ov = root ;
        for (String step : steps) {
           ov = findObservableValue(ov, step);
        return (String) ov.getValue();
      } catch (NullPointerException | ClassCastException exc) {
       // display horrible warning
       return "" ;
    Apart from the unnecessary warning (because the state that's being warned about is supported, according to the spec), this is a very inefficient implementation, and it wouldn't be too hard, for example, to come up with scenarios where this made table sorting of the order of 100 times slower than it should be. (See this for a similar example, which is now fixed.) It is probably worth verifying this, and filing a JIRA if true.

  • JDBC operation throws a NullPointerException

    Hi all...
    It seems that any attempt to perform a jdbc access from a deployed LCA (my process at this point only contains the JDBC 'query multiple to xml' operation) results in the following exception on the LC server (see below). The query and xml generation all seem to work ok from the Workbench. I can mail the lca upon request. Thanks.
    [4/28/08 17:10:15:557 EDT] 00000059 SystemOut O [Flex] [ERROR] Root cause: java.lang.NullPointerException
    at com.adobe.idp.dsc.jdbc.helper.SqlHelper.executeQuery(SqlHelper.java:85)
    at com.adobe.idp.dsc.jdbc.JDBCService.queryMultipleToXml(JDBCService.java:391)
    at sun.reflect.GeneratedMethodAccessor1517.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:336)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionCMTAdapter_ caf58c4f.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:88)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:88)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 0)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.idp.taskmanager.dsc.service.TaskManagerServiceImpl.renderForm(TaskManagerServic eImpl.java:3404)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:181)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
    at com.adobe.idp.dsc.trans

    I don't see any blank values anywhere. I have a single 'Assign Task' operation with the following config. I can send an lca if you like.
    Initial User = 'Assign to Process Creator'
    Form Data Mappings => input form variable = /process_data/myXFAForm
    output form var = /process_data/myXFAForm
    myXFAForm has as its Render Service/Operation = JdbService/queryMultipleToXml with the following settings:
    datasourceName(literal)= IDP_DS
    sql_info(literal)= select FIRST_NAME, LAST_NAME, CONTACT_INFO, ORACLE_USERID from TVS_TVAS_USER where STATUS='ACTIVE'
    xml_info (literal) = root: tvasUsers; element: User; mapping: [{element_name=firstname, column_index=1, column_name=FIRST_NAME}, {element_name=lastname, column_index=2, column_name=LAST_NAME}, {element_name=emailAddress, column_index=3, column_name=CONTACT_INFO}, {element_name=tvasUserID, column_index=4, column_name=ORACLE_USERID}]
    service output settings:
    document=task/Document

  • Weblogic throws NullPointerException when using ServiceControl.setTimeout

    We are invoking a SOAP service via a com.bea.control.ServiceControl that was generated from a WSDL (right click WSDL, Generate Service Control) using Weblogic 8.1.6.
    SOAP service execution is successful using an http and https endpoint. However, when setting a timeout via ServiceControl.setTimeout(int millisecods) method, the Weblogic API is throwing a NullPointerException when using an https endpoint. When using an http endpoint with the setTimeout method execution is successful.
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: opening connection to https://[... edit removed ...]
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: Response generation exception
    Throwable: java.lang.NullPointerException
    Stack Trace:
    java.lang.NullPointerException
         at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:455)
         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:235)
         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:389)
         at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:209)
         at weblogic.net.http.HttpClient.New(HttpClient.java:228)
         at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:246)
         at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:217)
         at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:189)
         at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(SoapHttpCall.java:179)
         at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(SoapHttpCall.java:80)
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1288)
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1155)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)
    DEBUG com.bea.wlw.runtime.jws.call.SoapFault [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: SoapFault exception throwable e
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: response code=0, responseMsg=null
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: closed connection to https://[... edit removed ...]
    WARN WLW.INVOKE.[... edit removed ...] [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: Id=[... edit removed id ...] Method=[... edit removed method ...]; Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.NullPointerException
    String:null
    Detail:
    END SERVICE FAULT
    ERROR [... edit removed ...]
    [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: ServiceControlException
    com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.NullPointerException
    String:null
    Detail:
    END SERVICE FAULT
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1268)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)

    Thanks for the suggestion. But with -DUseSunHttpHandler=true the Weblogic API is throwing a ClassCastException with or without the timeout value set.
    Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.ClassCastException
    String:null
    Detail:
    END SERVICE FAULT
    ERROR: ServiceControlException
    com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.ClassCastException
    String:null
    Detail:
    END SERVICE FAULT
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1268)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)

  • Reply activity throwing a java.lang.NullPointerException

    I have a synchronous process that includes a FileAdapter read. When the FileAdapter finds the file to read, the process is kicked off. If the process errors out, I call a Reply activity to the client to end the process. My Reply activity throws a "java.lang.NullPointerException", even when I assign a value to it's variable.
    Is this because the "client" is never instantiated because the process is kicked off by a FileAdapter and not from a call to the client?
    Can anyone help me? This is rather important...
    I'm using v. 10.1.3.1

    I am using the fault handlers.
    I've since solved my problem, though. There was no reason I needed a Reply activity to begin with. My problem was, I was validating, then when the validation failed, i wanted a database table to be updated and then have the process quit. I was trying to use a Reply activity to automatically end the process, but the Reply was throwing the "nullPointerException" which was then caught by my fault handlers, and the afore mentioned database was updated again, which it shouldn't have been. I believe the problem, though, was that since my process was being kicked off from a FileAdapter and not the client, when I tried to reply to the client, it simply wasn't there.
    So in the end, i don't need the Reply activity at all. Basically, it was lousy logic on my part.
    Thank you for your reply though. I'm grateful for the suggestiion.

  • Throwing java.lang.NullPointerException

    Hi there.
    In many code samples and throughout the JDK you can find the following kind of code:
    public void doSomething(Object arg) {
        if (arg == null) {
            throw new NullPointerException("arg is null");
        // now do something
    }This is bad coding style in my opinion. If a parameter is passed to a method which violates the methods "contract with the caller" an IllegalArgumentException (or a subclass) should be thrown - since it is an illegal argument. A NullPointerException should just be thrown by the JVM if a null is dereferenced in some way.
    I would rather need an
    public class IllegalNullArgumentException extends IllegalArgumentExceptionYour opinions?
    Klaus

    Yes, you do that...

  • HttpConnection throws NullPointerException

    Hi everybody !
    I'm faceing an odd problem here. I have developed an J2ME (MIDP1.0) application that, among other things, needs to comunicate with my server. The application woks fine on the emulator, it even works great on my phone (Nokia 2650) and on my partners phone (Nokia 6610), but when tested on other phones (SonyErricson, Sagem, Motorola, even an smartphone from Nokia, a 7610 i think) it throws a NullPointerException. I've run out of ideeas regading how to solve this. Here's the piece of code that bugs me:
    public void run(){
            Pachet raspuns = null;               
            display.setCurrent(forma);
            progress.setLabel("Trying to connect");       
            try {
                conn = (HttpConnection) Connector.open(URL, Connector.READ_WRITE);
                conn.setRequestMethod( HttpConnection.POST );
                conn.setRequestProperty("Content-Type", "application/vnd.wap.wmlc");
                byte[] dataForSend = deTrimis.getRawData();
                conn.setRequestProperty("Content-Length", ""+dataForSend.length);
                progress.setLabel("Sending request");
                progress.setValue(25);                      
                forma.append("Opening outputstream\n");
                os = conn.openOutputStream();
                forma.append("Sending data\n");           
                os.write( dataForSend );
                forma.append("Flushing data\n");           
                os.flush();      // this throws the exception
                forma.append("Closing stream\n");           
                os.close();    // if i remove the "os.flush()", the exception is thrown here
                forma.append("Getting response code\n");
                int code = conn.getResponseCode(); // if i remove both os.flush() and os.close() the exception is thrown here !!!
                forma.append("Response code = "+code+"\n");                          
                progress.setLabel("Checking response");
                progress.setValue(50);
                if (code != HttpConnection.HTTP_OK){
                     throw new Exception (conn.getResponseMessage()+"("+code+")");
                progress.setLabel("Reading data");
                progress.setValue(75);           
                if (!aborted){
                    dIn = conn.openDataInputStream();               
                    raspuns = new Pachet();
                    raspuns.readPackage(dIn);
                if (!aborted)
                    listener.packageReceived(raspuns);           
            } catch (Exception e) {
                forma.append("Connection failed. Reason: "+e.getMessage());           
                e.printStackTrace();
            } finally{
                cleanUp();
        }I really need to get this working, so could please someone give me a hint.
    Thank you,
    Daniel Comsa.

    Hi
    I solved this problem.
    There is nothing wrong with the device but the connection that we use.
    Our service provider does not provide the pure HTTP connection rather it goes over WAP and thats where the problem comes.
    Cause we attach our header for the server and WAP sticks his header in between , thats why server does not handle the request and consider it as bad request.
    I have commented the following lines for my code to work
    connection.setRequestProperty("User-Agent",
    System.getProperty("microedition.profiles"));
    connection.setRequestProperty("Content-Type",
    "application/octet-stream");
    Regards,
    Sushil

  • MTOM throws NullPointerException

    Hello,
    I need to transfer large files (12Mb) of diferent types (.pdf, .jpg, .doc, etc). I changed the return type to DataHandler and tried to enable MTOM in my webservice, but when I enabled it, after the method is executed, system throws a NullPointerException.
    I'm enabling MTOM with the annotation @MTOM, and if I just take off this annotation the webservice works correctly.
    Do you know of any problem using MTOM with Java 1.6.0_10? Do you have a suggestion of a better way to transfer it?
    Thanks

    Tested this with JDK 1.4 and it works with the following changes:
    Make these static:
    static public Writer out;
    static public void validateXml (String xmlSt)
    and, of course adding:
    import java.io.*;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    Then here is what I used to test it:
    public class Test2 {
         static public void main(String args[]){
              System.out.println("Hi there");
              String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html> <head> <title> Ho there </title> </head> <body> <h1> Hi there </h1> </body> </html>";
              try {
                   xmlResHandler.validateXml(s);
              }catch (Exception ex){
                   ex.printStackTrace();
    }I think you problem make have to do with your management of the "out" Writer.

  • StartElement throws NullPointerException

    hi
    The code below throws a NullPointerException at startElement method ... Can someone help figure out how to fix it ...?
    xmlSt value is set from another method which is NOT NULL.....
    public class xmlResHandler extends HandlerBase
    public void validateXml (String xmlSt) throws Exception
    String xmlString = xmlSt;
    java.io.InputStream input=null;
    input=new java.io.ByteArrayInputStream(xmlString.getBytes());
    out = new OutputStreamWriter (System.out, "UTF8");
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(true);
    factory.newSAXParser().parse( input, new xmlResHandler());
    System.out.println("validation success in validateXml");
    public Writer out;
    public xmlResHandler(){}
    public void error (SAXParseException e) throws SAXParseException
    throw e;
    public void warning (SAXParseException err) throws SAXParseException
    System.out.println("** Warning" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
    System.out.println(" " + err.getMessage ());
    public void startDocument () throws SAXException
    showData ("<?xml version='1.0' encoding='UTF-8'?>");
    newLine();
    public void endDocument () throws SAXException
    try {
    newLine();
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    public void startElement (String name, AttributeList attrs) throws SAXException
    showData ("<"+name);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength (); i++) {
    showData (" ");
    showData (attrs.getName(i)+"=\""+attrs.getValue (i)+"\"");
    showData (">");
    public void endElement (String name) throws SAXException
    showData ("</"+name+">");
    public void characters (char buf [], int offset, int len) throws SAXException
    String s = new String(buf, offset, len);
    showData (s);
    private void showData (String s) throws SAXException
    try {
    System.out.println (s);
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    private void newLine () throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    System.out.println (lineEnd);
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    Spent a lot of time ....no luck where i am going wrong ... Thanks for the help in advance
    prabhu

    Tested this with JDK 1.4 and it works with the following changes:
    Make these static:
    static public Writer out;
    static public void validateXml (String xmlSt)
    and, of course adding:
    import java.io.*;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    Then here is what I used to test it:
    public class Test2 {
         static public void main(String args[]){
              System.out.println("Hi there");
              String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html> <head> <title> Ho there </title> </head> <body> <h1> Hi there </h1> </body> </html>";
              try {
                   xmlResHandler.validateXml(s);
              }catch (Exception ex){
                   ex.printStackTrace();
    }I think you problem make have to do with your management of the "out" Writer.

  • XMLBean.validate() throws NullPointerException

    I have an XML file that is valid against a schema. I created the XMLBeans for the schema and can create (in code) the XMLBean and call .validate() on the XMLBean and it is in fact valid. I can also validate the XML file just fine.
    I then send that XMLBean (either loaded from a file or created in code) (as a string of XML) to an EJB. The EJB creates the XMLBean successfully, but when it calls .validate() it throws a NullPointerException. Here is the stack trace:
    Valid: true
    Exception in thread "main" java.rmi.RemoteException: EJB Exception: ; nested exc
    eption is:
    java.lang.NullPointerException
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
    ava:108)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:284)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:244)
    at aaa.bbb.ccc.ddd.ejb.FOOCatalog_2fiik0_EOImpl_813_WLStub.create(
    Unknown Source)
    at aaa.bbb.ccc.ddd.CatalogProxy.create(FooCatalogProxy.java:234)
    at FooPublish.main(MDCPublish.java:137)
    Caused by: java.lang.NullPointerException
    at com.bea.xbean.validator.Validator.beginEvent(Validator.java:331)
    at com.bea.xbean.validator.Validator.nextEvent(Validator.java:187)
    at com.bea.xbean.store.Saver$ValidatorSaver.emitEvent(Saver.java:3757)
    at com.bea.xbean.store.Saver$ValidatorSaver.emitEvent(Saver.java:3720)
    at com.bea.xbean.store.Saver$ValidatorSaver.emitContainer(Saver.java:364
    2)
    at com.bea.xbean.store.Saver.processContainer(Saver.java:775)
    at com.bea.xbean.store.Saver.process(Saver.java:518)
    at com.bea.xbean.store.Saver$ValidatorSaver.<init>(Saver.java:3546)
    at com.bea.xbean.store.Type.validate(Type.java:280)
    at com.bea.xbean.values.XmlObjectBase.validate(XmlObjectBase.java:310)
    Any ideas?
    Thanks

    The problem was that the weblogic server had a previously-compiled version of the same XMLBean in its classpath. Once I removed the old XMLBean from the classpath the problem went away.

  • Properties.store throws NullPointerException

    Hi,
    I have a strange problem with the java.util.Properties class. Calling
    store on a Properties object AFTER I've called System.setProperties
    always leads to a NullPointerException.
    Code sample 1:
    Properties props = new Properties();
    props.put("prop1", "val1");
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    Code sample 2:
    Properties props = new Properties();
    props.put("prop1", "val1");
    System.setProperties(props);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    Code sample 1 works fine, sample 2 throws a NullPointerException in
    the last line. Even code sample 3 throws the exception in the last
    line.
    Code sample 3:
    Properties props = new Properties();
    props.put("prop1", "val1");
    System.setProperties(props);
    props = new Properties();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    How can I avoid this problem. I can't guarantee that no one calls
    System.setProperties before the store call, so this is no solution. I
    need the store call to save the properties to a String. At a later
    time I want to use Properties.load to read the properties from this
    String (via ByteArrayInputStream). Perhaps there is another way to
    store/load properties to/from a String?
    Thanks,
    Markus

    Hi,
    I think the problem is that if u create a new Property it will create a new property with null value
    Creates an empty property list with no default values.
    and if u try to override the systemproperty creates a null pointer Exception.
    Insteda try this
    Properties p=System.getProperties();
              p.put("prop1","val1");
              System.setProperties(p);
              ByteArrayOutputStream out = new ByteArrayOutputStream();
              p.store(out, "Header");
    means , try to get the property object from the system and go ahead with ur coding is working fine
    Greetz
    Kumar.R

  • Code compiles - throws java.lang.NullPointerException

    This program is intended to build an array and populate it with inventory, then print out the inventory line item by line item. The code compiles but throws the NullPointerException error when the program is run. Here is the main method with 2 classes, as well as the text from the error and a pointer to the specific place in the code the error is from...
    main method
    import java.util.Scanner;
    import static java.lang.System.out;
    import java.io.*;
    public class Inventory1
        private static void Exit() //set ability for program to exit on each loop
        { out.println("We hope this inventory program was " +
                           "helpful. Thank you for using our program.");
          System.exit(0);
      public static void main (String [] args)
          boolean validNumber;
          boolean validCount;
          boolean validDollars;
          //initialize scanner
      Scanner sc = new Scanner(System.in);        
      Music info = new Music();
      //declare and initialize variables
      int[] itemNumber = new int [5];
      String[] productName = new String[5];
      int[] stockAmount = new int[5];
      double[] productCost = new double[5];
      double[] totalValue = new double[5];
      while (true)
          for (int i=0; i<5; i++)
            out.println( "Enter CD name/description or 'exit' to stop the" +
                    " program: "); //prompt - product name
               info.productName[i] = sc.next(); // input
               if (info.productName.equalsIgnoreCase("exit"))
    out.println("Exit entered. ");
    Exit();
    else
    do
    out.println("Please enter CD number: "); //prompt - item number
    info.itemNumber[i] = sc.nextInt();
    validNumber = true;
    if( (info.itemNumber[i] <1 ) )
    {//make sure product number is positive number
    validNumber = false;
    out.println("All CDs have positive numbers and no other " +
    "characters. Please enter a valid CD number.");
    }while (!validNumber);
    do
    out.println("Quantity in stock: "); // prompt - quantity
    info.stockAmount [i] = (sc.nextInt()); // capture temp number to verify
    validCount = true;
    if(( info.stockAmount[i] <1 ))
    { // ensure stock amount is positive number
    validCount = false;
    out.println( "Inventory numbers must be positive. Please " +
    "enter a correct value." ); // prompt for correct #
    } while (!validCount);
    do
    out.println("What is the product cost for each unit? "); // prompt - cost
    info.productCost[i] = sc.nextDouble();
    validDollars = true;
    if (( info.productCost[i] <1 ))
    validDollars = false;
    out.println( "Product cost must be a positive dollar " +
    "amount. Please enter correct product cost." );
    } while (!validDollars);
    out.println(totalValue);
    @Override
    public String toString()
    return super.toString();
    Music classclass Music
    String productName[];
    String title;
    int itemNumber[];
    int item;
    int stockAmount[];
    int amount;
    double productCost[];
    double cost;
    double totalValue[];
    double value;
    int i;
    public Music(String title, int item, int amount, double cost, double value,
    int i)
    this.productName[i] = title;
    this.itemNumber[i] = item;
    this.stockAmount[i] = amount;
    this.productCost[i] = cost;
    this.totalValue[i] = value;
    public Music()
    public void setTotalValue(double[] totalValue)
    this.totalValue = totalValue;
    public double[] getTotalValue()
    return totalValue;
    public void setStockAmount(int[] stockAmount)
    this.stockAmount = stockAmount;
    public int[] getStockAmount()
    return stockAmount;
    public void setProductCost(double[] productCost)
    this.productCost = productCost;
    public double[] getProductCost()
    return productCost;
    public void setProductName(String[] productName)
    this.productName = productName;
    public String[] getProductName()
    return productName;
    public void setItemNumber (int[] itemNumber)
    this.itemNumber = itemNumber;
    public int[] getItemNumber()
    return itemNumber;
    }TotalInventory classclass TotalInventory
    double TotalInfo;
    public int [] getStockAmount(int[] units)
    int[] stockAmount = units;
    return units;
    public double[] getTotalValue(double[] cost)
    double[] productCost = cost;
    return cost;
    error message
    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\build\classes
    compile:
    run:
    Enter CD name/description or 'exit' to stop the program:
    here we go
    Exception in thread "main" java.lang.NullPointerException
            at Inventory1.main(Inventory1.java:54)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 4 seconds)
    Inventory1.main(Inventory1.java:54) is this line of code in the main method: info.productName[i] = sc.next(); // input Any suggestions?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I have not changed my code from when I supplied it in the first post - I am simply pointing out that I already initiated the String with 5 as the number...I've supplied you with everything I am getting. The three modules are in the original post, as is the error message being received - nothing has changed.
    This means with the code posted in my original question I am getting an NPE. I compile the code and run it. I'm able to input the "title" (productName) after the prompt but then get the NPE. I'm not trying to make you read my mind, I'm just asking for help and make every effort to provide as much detail as possible to make that easier on all of us.

  • Flexbuilder 3 export release build click throws NullPointerException

    Hello!
    Please help me build a release version of my app.
    When I click the "Export Release Build" button, nothing happens.
    From the Eclipse application log, I see that ExportReleaseVersionProjectAndLocationPage.getDefaultOutputFolderPath throws a NullPointerException.
    Some things I've tried:
    Search extensively on net and within adobe forums...
    I tried to guess at the default output folder location -- creating an bin-release folder...
    Reinstall the whole stack on both OS X and a Windows XP... nothing.
    My primary setup:
    J2EE/Flex/Postgresql app, deploying to tomcat 6. Using flex builder 3 plugin for eclipse 3.4 with flex sdk 3.5 (though I tried with 3.2 as well). Running all this on a mac book pro. App has grown such that the low-powered clients (in a health clinic in rural uganda) can't handle the debug version very well. Just trying to make things a bit faster... Help!
    Thank you,
    kuang
    full stack trace:
    !ENTRY org.eclipse.ui 4 0 2010-02-18 18:17:53.312
    !MESSAGE Unhandled event loop exception
    !STACK 0
    java.lang.NullPointerException
        at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionProjectAndLocati onPage.getDefaultOutputFolderPath(ExportReleaseVersionProjectAndLocationPage.java:307)
        at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionProjectAndLocati onPage.createLocationControls(ExportReleaseVersionProjectAndLocationPage.java:292)
        at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionProjectAndLocati onPage.createControl(ExportReleaseVersionProjectAndLocationPage.java:495)
        at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
        at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.createPag eControls(ExportReleaseVersionWizard.java:277)
        at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
        at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:543)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(Export ReleaseVersionAction.java:93)
        at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportRe leaseVersionAction.java:103)
        at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
        at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:583)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
        at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java :452)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

    Sounds like this bug http://bugs.adobe.com/jira/browse/FB-22946.
    You might want to try closing projects that are unrelated to the project you are exporting.
    Jason San Jose
    Quality Engineer, Flash Builder

  • Repeated NullPointerException in FB 4.7

    Hi,
    I've been having multiple problems with FB 4.7 - in one project, over the span of two weeks, I've had to deal with
    1) Bitmaps that do not have an alpba channell being silently skipped from the library.swc (fixed by forcing custom quality)
    2) Flash builder not presenting a password prompt during AIR publishing and then complaining about the non-password being incorrect (fixed by packaging using command line, later by resizing the window unttil it refreshes and shows the dialog)
    3) Flash builder constantly failing to compile, seemingly at random, throwing java NullPointerExceptions
    Description
    Resource
    Path
    Location
    Type
    com.google.common.collect.ComputationException: java.lang.NullPointerException
    at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingCo ncurrentHashMap.java:167)
    at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingCo ncurrentHashMap.java:116)
    at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.jav a:67)
    at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:623)
    at com.adobe.flash.compiler.internal.projects.CompilerProject.getCacheForScope(CompilerProje ct.java:711)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findPropertyQualified(ASScope.java:1476)
    at com.adobe.flash.compiler.internal.definitions.references.ResolvedQualifiersReference.reso lve(ResolvedQualifiersReference.java:80)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:1049)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:1089)
    at com.adobe.flash.compiler.internal.definitions.ClassDefinition.resolveBaseClass(ClassDefin ition.java:373)
    at com.adobe.flash.compiler.internal.definitions.TypeDefinitionBase$TypeIterator.pushChildre n(TypeDefinitionBase.java:284)
    at com.adobe.flash.compiler.internal.definitions.TypeDefinitionBase$TypeIterator.next(TypeDe finitionBase.java:218)
    at com.adobe.flash.compiler.internal.definitions.TypeDefinitionBase$TypeIterator.next(TypeDe finitionBase.java:176)
    at com.adobe.flash.compiler.internal.scopes.TypeScope.getPropertyForScopeChain(TypeScope.jav a:261)
    at com.adobe.flash.compiler.internal.scopes.ScopeView.getPropertyForScopeChain(ScopeView.jav a:71)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findProperty(ASScope.java:1038)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findProperty(ASScope.java:981)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findProperty(ASScope.java:1161)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findProperty(ASScope.java:919)
    at com.adobe.flash.compiler.internal.scopes.ASScopeCache.findPropertyQualified(ASScopeCache. java:267)
    at com.adobe.flash.compiler.internal.scopes.ASScope.findPropertyQualified(ASScope.java:1478)
    at com.adobe.flash.compiler.internal.definitions.references.ResolvedQualifiersReference.reso lve(ResolvedQualifiersReference.java:80)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:1049)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:1089)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:871)
    at com.adobe.flash.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.j ava:90)
    at com.adobe.flash.compiler.internal.tree.as.IdentifierNode.resolveType(IdentifierNode.java: 406)
    at com.adobe.flash.compiler.internal.tree.as.MemberAccessExpressionNode.resolveType(MemberAc cessExpressionNode.java:137)
    at com.adobe.flash.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConver sion(MethodBodySemanticChecker.java:372)
    at com.adobe.flash.compiler.internal.semantics.MethodBodySemanticChecker.checkBinaryOperator (MethodBodySemanticChecker.java:324)
    at com.adobe.flash.compiler.internal.semantics.MethodBodySemanticChecker.checkBinaryOperator (MethodBodySemanticChecker.java:300)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGeneratingReducer.checkBinaryOp(ABCGenera tingReducer.java:838)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGeneratingReducer.binaryOp(ABCGeneratingR educer.java:799)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.action_448(CmcEmitter.java:6377)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:92 11)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39704)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 723)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 723)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:95 19)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39704)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 732)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 723)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 732)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 723)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 732)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39 723)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java: 39703)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39681)
    at com.adobe.flash.compiler.internal.as.codegen.CmcEmitter.burm(CmcEmitter.java:39983)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateInstructions(ABCGenerat or.java:232)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(A BCGenerator.java:397)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(A BCGenerator.java:351)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generateFunction(ABCGenerator.j ava:266)
    at com.adobe.flash.compiler.internal.as.codegen.ClassDirectiveProcessor.declareFunction(Clas sDirectiveProcessor.java:646)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProc essor.java:215)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcess or.java:189)
    at com.adobe.flash.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass(Global DirectiveProcessor.java:423)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProc essor.java:207)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcess or.java:189)
    at com.adobe.flash.compiler.internal.as.codegen.GlobalDirectiveProcessor.declarePackage(Glob alDirectiveProcessor.java:449)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProc essor.java:224)
    at com.adobe.flash.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcess or.java:189)
    at com.adobe.flash.compiler.internal.as.codegen.ABCGenerator.generate(ABCGenerator.java:126)
    at com.adobe.flash.compiler.internal.units.ASCompilationUnit.handleABCBytesRequest(ASCompila tionUnit.java:374)
    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.processABCBytesRequest(Compil ationUnitBase.java:870)
    at com.adobe.flash.compiler.internal.units.CompilationUnitBase.access$300(CompilationUnitBas e.java:107)
    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:309)
    at com.adobe.flash.compiler.internal.units.CompilationUnitBase$4$1.call(CompilationUnitBase. java:305)
    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 8)
    at com.adobe.flash.compiler.internal.units.requests.RequestMaker$1.call(RequestMaker.java:22 2)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
    at com.google.common.collect.CustomConcurrentHashMap.hash(CustomConcurrentHashMap.java:1432)
    at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.jav a:66)
    at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:623)
    at com.adobe.flash.compiler.internal.scopes.ASProjectScope.addScopeToCompilationUnitScopeLis t(ASProjectScope.java:1306)
    at com.adobe.flash.compiler.internal.projects.CompilerProject$ScopeMakerFunction.apply(Compi lerProject.java:106)
    at com.adobe.flash.compiler.internal.projects.CompilerProject$ScopeMakerFunction.apply(Compi lerProject.java:95)
    at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingCo ncurrentHashMap.java:155)
    ... 89 more
    RadialNavMenuMediator.as
    /ESEUM/src/ie/madrobot/eseum/view/mediator
    line 22
    Flex Problem
    Curiously enough, the error seems to be mostly random - whenever it happens, I switch to FDT, do some work there - maybe add a couple classes, do some refactoring, and chances are the error will disappear, just like it appeared - out of nowhere, with no rhyme or reason. It may be renaming a class, it may be a day's work - eventually it does go away.
    Other things that may make the error disappear is commenting out the offending functions.
    Apparently FB 4.7 simply hates Vectors, as they are usually causing the exception. In particular a vector's length property.
    Project uses 1 lib and 1 src folder - no externally linked projects, although a different Flash Builder Pure Actionscript project is used with Flash CC to build a component library.
    Using AIR SDK 3.8. I am able to get a working air 3.8 package (occasionally) so the SDK is probably setup OK.
    I've run accross all sorts of odd bugs and quirks of Flash so I'm pretty forgiving - but 4.7 is a trainwreck.

    I also tried with replacing -verbose-stacktraces=true with -compiler.verbose-stacktraces=true as I've seen in some examples but nothing happens.
    Next you have an example of a stacktrace missing the line numbers:
    TypeError: Error #1009
            at components.visual::BaseECView/configureComponents()
            at views.home::Home/createChildren()
            at mx.core::UIComponent/initialize()
            at spark.components::View/initialize()
            at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
            at mx.core::UIComponent/addChildAt()
            at spark.components::Group/addDisplayObjectToDisplayList()
            at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()
            at spark.components::Group/addElementAt()
            at spark.components::Group/addElement()
            at spark.components::SkinnableContainer/addElement()
            at spark.components::ViewNavigator/createViewInstance()
            at spark.components::ViewNavigator/commitNavigatorAction()
            at spark.components::ViewNavigator/commitProperties()
            at mx.core::UIComponent/validateProperties()
            at mx.managers::LayoutManager/validateProperties()
            at mx.managers::LayoutManager/doPhasedInstantiation()
            at mx.managers::LayoutManager/doPhasedInstantiationCallback()
            at flash.utils::Timer/tick()

Maybe you are looking for

  • Creating an Image from whats already on screen?

    http://carroll1.cc.edu/~tpatters/Scribble.html Above is the link to an applet I've been writing for a few days. I'm fairly new to Java and am using this applet to teach myself concepts as I dig them up. Right now when the page is moved, or the applic

  • EDI FILE MESSAGE

    Anybody can help me? We are going to implement EDI with on of our trading partner. We will send and receive EDI message file over the value added network. Anybody can guide me how we will propgate/manipulate this message into our database in oracle a

  • HI there, trying to use GarageBand with Yamaha DSG-650 Midi interface but not working

    Hi There Can anyone help with connecting a MIDI (USB) to the MAC? It doesn't recognize the keyboard Thanks

  • Google Earth Causes OS X To Crash

    Hey, this was the first time I installed Google Earth on Leopard and it was pretty crazy--after scrolling and zooming for a couple of moments, a transparent sort of gray fell down across the screen and i got a gray box with a power button symbol on i

  • Changing availability Status for event in iCal

    How do I change the availability status for an event in iCal Version 7.0 (1835.1)?