Java 7 u45 System.getProperty returns null

After upgrade to u45, our web launch application stopped working. it failed at System.getProperty("myproperty").
"myproperty" is defined as a
<resources>       
<j2se version="1.6+" initial-heap-size="64m" max-heap-size="256m"/>
       <jar href="nms_wsclient.jar" download="eager" main="true"/>
       <jar href="commons-httpclient.jar" download="eager"/>      
      <jar href="commons-codec.jar" download="eager"/>       
      <jar href="commons-logging.jar" download="eager"/>       
      <jar href="log4j.jar" download="eager"/>       
      <property name="myproperty"   value="http://138.120.128.94:8085/"/>
    </resources>
with older version java ,System.getProperty("myproperty") works fine to return the value, but with u45 it returned null.
Does anyone have the same problem? any idea how to fix it or work around it?
Thanks,
Zhongyao

So did you succeed with the jnlp template ?
After frustrating hours of that information useless JNLPSigningException trial & error, It seems that as :
1. You can't make the j2se version variable
2. You can't have your own variable property/values
I've opened a bug report...
The documentation is atrocious, with a vague "we reserve the right to blacklist variable elements, but we will never say which ones".
The JNLP example in the various example is a joke - Its a hello world jnlp, not a real world one.
The JNLPSigningException must have been written my the same guys at Microsoft that did the "An Unknown Error As Occurred".
I've had to clear the cache at every test, seems that the JNLP Template check didn't get the new updated JNLP from the web server.
/rant over
I think I'll try to bypass that JNLP property mess and get javaws to download my own "jnlp name".xml.config...

Similar Messages

  • Call thirty party java web service but always return null

    hi
    I call a java web service in my application visual studio 2008 c#, but always return NULL.
    I used Tool Fiddler to monitor the traffic between my client and the web service server, it showed the return is not Null.
    Here is my code, please see if anything I do wrong.
    namespace CanOfficer_THQ_vs_IHQ.TestWebReferenceAppointment {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="AppointmentServiceSoapBinding", Namespace="http://service.ips.salvationarmy.org/")]
    public partial class AppointmentService : Microsoft.Web.Services3.WebServicesClientProtocol {
    private System.Threading.SendOrPostCallback deleteAppOperationCompleted;
    private System.Threading.SendOrPostCallback importAppOperationCompleted;
    private System.Threading.SendOrPostCallback editAppOperationCompleted;
    private bool useDefaultCredentialsSetExplicitly;
    /// <remarks/>
    public AppointmentService() {
    this.Url = global::CanOfficer_THQ_vs_IHQ.Properties.Settings.Default.CanOfficer_THQ_vs_IHQ_TestWebReferenceAppointment_AppointmentService;
    if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
    this.UseDefaultCredentials = true;
    this.useDefaultCredentialsSetExplicitly = false;
    else {
    this.useDefaultCredentialsSetExplicitly = true;
    public new string Url {
    get {
    return base.Url;
    set {
    if ((((this.IsLocalFileSystemWebService(base.Url) == true)
    && (this.useDefaultCredentialsSetExplicitly == false))
    && (this.IsLocalFileSystemWebService(value) == false))) {
    base.UseDefaultCredentials = false;
    base.Url = value;
    public new bool UseDefaultCredentials {
    get {
    return base.UseDefaultCredentials;
    set {
    base.UseDefaultCredentials = value;
    this.useDefaultCredentialsSetExplicitly = true;
    /// <remarks/>
    public event deleteAppCompletedEventHandler deleteAppCompleted;
    /// <remarks/>
    public event importAppCompletedEventHandler importAppCompleted;
    /// <remarks/>
    public event editAppCompletedEventHandler editAppCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string deleteApp([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id) {
    object[] results = this.Invoke("deleteApp", new object[] {
    id});
    return ((string)(results[0]));
    /// <remarks/>
    public void deleteAppAsync(int id) {
    this.deleteAppAsync(id, null);
    /// <remarks/>
    public void deleteAppAsync(int id, object userState) {
    if ((this.deleteAppOperationCompleted == null)) {
    this.deleteAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteAppOperationCompleted);
    this.InvokeAsync("deleteApp", new object[] {
    id}, this.deleteAppOperationCompleted, userState);
    private void OndeleteAppOperationCompleted(object arg) {
    if ((this.deleteAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.deleteAppCompleted(this, new deleteAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string importApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int person,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.importAppAsync(person, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.importAppOperationCompleted == null)) {
    this.importAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OnimportAppOperationCompleted);
    this.InvokeAsync("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.importAppOperationCompleted, userState);
    private void OnimportAppOperationCompleted(object arg) {
    if ((this.importAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.importAppCompleted(this, new importAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string editApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.editAppAsync(id, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.editAppOperationCompleted == null)) {
    this.editAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OneditAppOperationCompleted);
    this.InvokeAsync("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.editAppOperationCompleted, userState);
    private void OneditAppOperationCompleted(object arg) {
    if ((this.editAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.editAppCompleted(this, new editAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    public new void CancelAsync(object userState) {
    base.CancelAsync(userState);
    private bool IsLocalFileSystemWebService(string url) {
    if (((url == null)
    || (url == string.Empty))) {
    return false;
    System.Uri wsUri = new System.Uri(url);
    if (((wsUri.Port >= 1024)
    && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
    return true;
    return false;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void deleteAppCompletedEventHandler(object sender, deleteAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class deleteAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal deleteAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void importAppCompletedEventHandler(object sender, importAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class importAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal importAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void editAppCompletedEventHandler(object sender, editAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class editAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal editAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));

    Hi;
    I used Fiddler to monitor the process, and it showed the request sent thru web service worked and returned a value, but in my .Net application the return captured as NULL. Could you please look into the code above and the result from Filddler and see if
    you can help.
    thank you.
    REQUEST:
    POST https://159.253.140.178/services/AppointmentService HTTP/1.1
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4252)
    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    Host: 159.253.140.178
    Content-Length: 1589
    Expect: 100-continue
    Connection: Keep-Alive
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://service.ips.salvationarmy.org/" xmlns:types="http://service.ips.salvationarmy.org/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
    <soap:Header>
    <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>
    [email protected]
    </wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
    tpi4IPSws!
    </wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <tns:importApp>
    <person xsi:type="xsd:int">
    169275
    </person>
    <name xsi:type="xsd:string">
    Corps Officer (Cahul-Russia) Test12
    </name>
    <territory xsi:type="xsd:string">
    CAN
    </territory>
    <location xsi:type="xsd:string">
    TEST LOCATION 12
    </location>
    <primary xsi:type="xsd:boolean">
    true
    </primary>
    <start xsi:type="xsd:dateTime">
    2013-05-30T00:00:00
    </start>
    <end xsi:type="xsd:dateTime">
    2014-06-04T00:00:00
    </end>
    <categories href="#id1" />
    </tns:importApp>
    <soapenc:Array id="id1" soapenc:arrayType="xsd:string[1]">
    <Item>
    vpsCat1
    </Item>
    </soapenc:Array>
    </soap:Body>
    </soap:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Content-Type: text/xml;charset=UTF-8
    Content-Length: 232
    Date: Fri, 05 Sep 2014 19:45:22 GMT
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ns2:importAppResponse xmlns:ns2="http://service.ips.salvationarmy.org/">
    <return>
    OK_572463
    </return>
    </ns2:importAppResponse>
    </soap:Body>
    </soap:Envelope>

  • Java Web Start (JNLP) getResource return null.

    I have a Java Web Start Swing application and with the Java version 1.6.0_u27.
    same code run from jdk1.1.8 to jdk 1.6, more then 10 customers it's work fine, java web start only run on jdk 1.4.0 and jdk 1.5.0.
    just migrate one customer from Java version 1.5.0_u6 to 1.6.0_u27.
    sometimes, the getResource will return null, when system return null, then system cannot get any other resource, always return null.
    It only happen in Java web start environment, work fine in command line (java/javaw), and same as the WebStart loses resources post,
    "Unfortunately this cannot be reproduced easily. Sometimes this happens after some minutes, sometimes the application can be used for days without problems.",
    note. all of my resource files put in the same jar file, one resource file in that jar get fail, all files will be fail.
    after I get the url, I will use new BufferedInputStream(url.openStream()); to retrieve data, never use the File object.
    for example, get resource from "/path/a1.xml", "/path/a2.xml"....... 30 minutes pass, get same file "/path/a1.xml" will return null, then all resource will return null.
    URL url = getClass().getResource(s);
    if(url == null) {
    System.out.println(getClass().getResourceAsStream(s)); // also null, log only
    // if the url == null, the following retrieve will be null
    url = Thread.currentThread().getContextClassLoader().getResource(s);
    if(url == null){
    System.out.println(Thread.currentThread().getContextClassLoader().getResourceAsStream(s)); // also null, log only
    ClassLoader loader = getClass().getClassLoader();
    if(loader == null){
    loader = ClassLoader.getSystemClassLoader();
    if(loader != null) {
    System.out.println(loader.getResourceAsStream(s)); // also null, log only
    url = loader.getResource(s);
    if(url == null) {
    System.out.println("URL resource still can not found!!" + s);
    Edited by: M. Jwo on 2011/11/3 上午 5:40

    I ran into the same problem with JNLP and IE.
    Here is the trick I am using to make IE think that it is dealing with "real" .jnlp file. This works on JBoss-3.2.1/Tomcat-4.1.24 bundle.
    In web.xml:
    <servlet>
    <servlet-name>fakejnlp</servlet-name>
    <description>jsp that generates JNLP on the fly</description>
    <jsp-file>start.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
    <servlet-name>fakejnlp</servlet-name>
    <url-pattern>/start.jnlp</url-pattern>
    </servlet-mapping>
    Now, when you request start.jnlp (perhaps, with HTTP parameters), you end up executing your start.jsp. IE is happy. One limitation, though: if you need to pass parameters, there should be no href attribute in <jnlp> element.
    HTH
    Alex

  • Getting cell id in java me using System.getProperty

    Hi all
    I wish to get the cell id of the cell (I know it had been asked for more than a million times) that my nokia phone is currently connected to with the api listed here
    [http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME|http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME]
    As stated,
    System.getProperty("com.nokia.mid.cellid") works on S60 3rd Ed
    System.getProperty("Cell-ID") works on S40 3rd Ed
    However, I am unable to do so on N82, anyone have any idea why is that so?
    Or is there any kind soul with N95 can tell me whether it works on N95?

    yes.. I saw that thread before I posted this.. but the piece of code mentioned in the thread does not make use of the api listed in the wiki right?
    In fact, I'm not very clear as to what that mentioned code is doing.
    Moreover, my point would be, how come the api is listed in the wiki in that case.. that is, if it does not work.. :/

  • Awt.toolkit returns null

    Hi all, I've discovered that the awt.toolkit system property returns null on the linux server hosting a java web application am working on. I've listed some of the AWT system properties on the system but the awt.toolkit returns null.
    java.awt.graphicsenv: = sun.awt.X11GraphicsEnvironment
    java.awt.headless: = ture
    awt.toolkit: = null
    I really dont know what could be causing this.
    This affects all image related proceses (dynamic image creation) that the application does. It outputs the following error message:
    java.lang.NoClassDefFoundError
         java.lang.Class.forName0(Native Method)
         java.lang.Class.forName(Class.java:141)
         java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)I dont think it has anything to do with X11, XServer or Headless.
    Any thoughts ?
    Cheers

    It hs something to do with a missing X11 server/the machine being headless. I faced a similar problem recently.

  • ViewLink Accessor returning null when VO has a BindParameter

    I have DeptView and EmpView that is link with a DempEmpViewLink. the link is two way so DeptView has a RowIterator Viewlink accessor and EmpView has a Row ViewLInk accessor.
    However inside the employeViewRow code, I always get a Null value when I access the Dept accessor.
    //inside Employee View Row.java
    Row row = this.getDeptView(); //returns null
    ...This happens when The DeptView has a bindvariable because I need to filter the DeptView so I have a where clause on the SQL statement. However, when I remove the whereclause and the bindvariable, the Dept ViewLInk accessor returns the correct row.
    regards,
    Anton

    Hi Chris,
    My scenario is actually a Invoice Header and Details screen.
    I have a HeaderView, DetailsView, and a HeaderDetailLink defined by a Composition Assoc. The headerView has a BindParameter on it. So on my page, I can view/navigate invoices and its details. but at the same time using the same viewobjects and same page, I need to be able to create and save a record on the header and details at the same time by just one Commit/Save. (Similar to a Forms application (header Form, and Details table).
    On pageload i execute a methodaction that inserts a row on the header and the detail at the same time. Then on the jsp page, I put some values on the header. Next i put a value on a fieldA on the detail. But when I put a value on fieldA, I need to compute the value of fieldB on the detail based on fieldA and a field of the Header row, fieldHeader.
    So to compute fieldB, I put a code on the settermethod of fieldA in the DetailRowImpl.java file:
    //detailRowImp.java, setFieldA()
    public void setFieldA(Number value) {
    setAttributeInternal(FIELDA, value);
    ... Row row = getHeaderRow(); //returns null
    Number fieldbValue = compute(value, row.getAttribute("FieldC")); //NullPointerException
    }What are your thoughts? any suggestions?
    regards,
    Anton

  • System.getProperty( "com.nokia.mid.imei" ) return null ?!?!

    hello guys,
    i intend to get the IMEI No. i wrote the following code:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class IMEIDemo extends MIDlet
         Display display;
         private Form mainForm;
         String imeiNokia = "";
         public void startApp()
              display = Display.getDisplay( this );
              mainForm = new Form( "IMEI Demo" );
              imeiNokia = System.getProperty( "com.nokia.mid.imei" );
              if( imeiNokia.compareTo( "" ) == 0 )
                   System.out.println( "NULL..." );
              else
                   mainForm.append( imeiNokia );
                   display.setCurrent( mainForm );
         public void pauseApp()
         public void destroyApp( boolean b )
              destroyApp( false );
              notifyDestroyed();
    } // IMEIDemoi am using WTK2.2, MIDP2, CLDC1.1
    when i run this code in emulator (WToolKit), i got the following Exception:
    startApp threw an Exception
    java.lang.NullPointerException
    java.lang.NullPointerException
         at IMEIDemo.startApp(+36)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    would u pls suggest me how can i overcome this problem or any effective openion?
    thanx in advance.
    take care all.
    bye.

    hi
    i tried this program using J2ME to retireve IMEI number
    * IMEINO.java
    * Created on February 19, 2007, 3:50 PM
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * @author Administrator
    * @version
    public class IMEINO extends MIDlet implements CommandListener{
    public TextField t1,t2,t3;
    public Form form;
    public String s1,s2,s3,n=null;
    public Display disp;
    public Command ok,exit;
    public IMEINO()
    form = new Form("IMEI");
    t1 = new TextField("imei1","",50,TextField.ANY);
    t2 = new TextField("imei2","",50,TextField.ANY);
    t3 = new TextField("imei3","",50,TextField.ANY);
    ok = new Command("ok",Command.OK,1);
    exit = new Command("exit",Command.EXIT,2);
    public void startApp() {
    form.addCommand(ok);
    form.setCommandListener(this);
    form.addCommand(exit);
    form.setCommandListener(this);
    form.append(t1);
    form.append(t2);
    form.append(t3);
    Display disp = Display.getDisplay(this);
    try
    s1 = System.getProperty("com.nokia.mid.imei");
    s2 = System.getProperty("phone.imei");
    s3 = System.getProperty("com.nokia.IMEI");
    if(s1.compareTo("") == 0 || s2.compareTo("")==0 || s3.compareTo("")==0 )
    t1.setString(null);
    else
    t1.setString(s1);
    t2.setString(s2);
    t3.setString(s3);
    catch(Exception e)
    t1.setString("error"+ e.getMessage());
    t2.setString(s2);
    t3.setString(s3);
    disp.setCurrent(form);
    public void commandAction(Command c,Displayable d)
    if(c==ok)
    destroyApp(true);
    notifyDestroyed();
    if(c == exit)
    destroyApp(true);
    notifyDestroyed();
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    i tried this program , when i run in the netbeans environment , it shows null (system.out.println(imei)),when i installed the jar file into nokia 3230 mobile,the textfield is null , it shows nothing,can anyone give me any suggestion , whether i have to change my phone settings
    Message was edited by:
    scorpianalways

  • System.getProperty("user.dir") returns "/home/user" on Linux

    Has anyone else had the error when launching a jar from Linux (just by clicking it), System.getProperty("user.dir") returns the "/home/user" (or "~") value instead of the folder that the jar is in? Essentially, it returns "user.home" instead of "user.dir".
    This does not happen when I start the application from command line.
    (I know its not swing, but I wasn't sure where to post it)
    Is this just a simple Linux setting that isn't enabled by default? Ubuntu already made the file association after using apt-get to install Java 6.
    Cheers.
    -FBL

    Because, semmingly, the command is being set off as
    java -jar relative/pat/to/file.jarwhen you double click it, rather than
    cd relative/path/to
    java -jar file.jarIf you don't like this, I would say to find a Linux, preferably Ubuntu, forum and ask there if it is possible to change that handling, and if not, request that a cahnge be made to the code to change that handling. But, in any case, I doubt you are going to get an answer here about it.

  • Java 7 TitledBorder getTitleColor returns null

    With java 1.7.0_03, the method getTitleColor() in class javax.swing.border.TitledBorder returns null. It didn't with java 1.5 or 1.6. Is this change in functionality a bug? If not, is the best way to handle it really to go through my code and add 'UIManager.getColor("TitledBorder.titleColor")' everywhere getTitleColor() returns null? The UIManager call appears to be the code Oracle took out of TitledBorder in java 7.
    Thanks,
    Mike

    The following code returned an object in java 1.5 and 1.6, but in 1.7 it returns null.
    package test;
    public class MyTitleColor{
    public static void main(String[] args){
    System.out.println(new javax.swing.border.TitledBorder("new").getTitleColor());
    The output in 1.5 and 1.6 is:
    sun.swing.PrintColorUIResource[r=51,g=51,b=51]
    but in 1.7 it is:
    null
    I'm pretty sure this is a regression, so it looks like my next stop is the java bug reporting maze.

  • System.getproperty("Var Name") gives null in RedHatLinux5

    Please provide some solution for this strange problem. I am able to get the system property value from terminal but when I use System.getproperty() I am getting null.
    Ex:
    echo $client
    ans: /home/naveen/client/classes
    from java program
    System.getproperty("client"); it gives null

    use getenv(), instead of getProperty()

  • Field.get(Object obj) now returning null with Generics (Java 5.0) ??

    Hello,
    I'm currently using Java 5.0 (especially for the Generics part) on a new Java/J2EE project, but having a strange issue with code working previously in a Java 1.4 project.
    Below is an overriding of the toString() method provided by the Object class which allow me to view nicely in debug (dev. mode) the contents of my Transfer Objects (all the TO's must extend this ATO abstract class).
    Previously this code displayed me something like:
    [field1 => value1, field2 => value2] ... for a TO (sort of "Javabean") having e.g. two String fields with values initialized to "value1" (resp. "value2").
    But unfortunately, this does (or seems) not to work anymore, having such display :
    [field1 => null, field2 => null]I tried to debug, and the problem is that the call fieldValue = field.get(this); returns null while it should returns the actual value of the field.
    I thing it it strongly related to Generics, but could not at the moment found how/why it does not work.
    May someone help...? Thanks.
    public abstract class ATO {
        // Reflection for field value display
        public String toString() {
            StringBuffer sb = new StringBuffer("[");
            MessageFormat mf = new MessageFormat("{0} => {1}, ");
            Field[] fields = this.getClass().getDeclaredFields();
            for (int i = 0; i < fields.length; i++) {
                Field field = (Field) fields;
    String fieldName = field.getName();
    Object fieldValue = null;
    try {
    fieldValue = field.get(this);
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    mf.format(new Object[] { fieldName, fieldValue }, sb, null);
    if (sb.length() > 1) {
    sb.setLength(sb.length() - 2);
    sb.append("]");
    return sb.toString();

    ejp wrote:
    Field field = (Field) fields;
    This cast is unnecessary.
    Effectively, I haven't noticed it yet. Fixed.
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    }Either the field value really is null or you are getting one of these exceptions which you are ignoring. Never write empty catch blocks.That's true, I missed something. Fixed with some code to log the eventual exceptions.
    Thanks for you answer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(&#8220;getRealPath = &#8221; + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • Enums for System.getProperty(...) method in Java API?

    Just had a thought today as a result of a colleaugue mis-spelling "file.separator" in a System.getProperty() call:
    How about an enum for the above method (e.g. SystemProperty) that has all the known properties and the String method for any prop not included in the enum?
    Am I being too greedy or pedantic about type-safety?
    Appreciate your feedback.
    Cheers,
    Ali
    Edited by: user7627452 on 30-Apr-2012 19:09

    Yes. The whole idea is that anybody can add their own. As opposed to an API.

  • Java portletRequest.getUser().getEmail returns null

    I have defined an oid manager for my portlets in the myprovider.properties file like this:
    oidManager=true
    oidAdminClass=oracle.portal.sample.v2.devguide.oid.UnsafeOidInfo
    oidHost=myhost
    oidPort=389
    oidUser=orcladmin
    oidPasswd=mypwd
    Im using jdeveloper 9.0.5.2 and deploying to oc4j standalone 9.0.4 with pdk. On one oc4j instance on localhost the oidmanager works and getUser().getEmail return korrekt data, but on another instance it returns null. Its the same OID thats being used from both oc4j instances, and bot instances have tcp access to 389 on the OID machine. Only change i have made to the oc4j container where it dosent work is that ports for web, rmi and jms has been changed from the default values because there are more than one oc4j container on that same machine. I have tried stepping into calls such at getEmail() to find out whats missing but i dont have the orion sourcecode so the debugger dosent show precisely whats going on - is there another way to investigate this issue?

    OK i had a breakthrough myself. The oid manager only works if I register the web provider using a url like this:
    http://<host>:<port>/<webmodulename>/providers/<providername>
    and not the usual one:
    http://<host>:<port>/<webmodulename>/providers/
    My oracle manual only mentions the last one that dosent work.

  • Why getResource of jar in classpath returns null?

    When i iterate through the jars in the classpath and try to turn them into URL's via the getResources(), they all return null. What am I doing wrong?
    (NOTE: It does print out the classpath properly when i print that out)
    String classPath = System.getProperty( "java.class.path" );
    String delim = System.getProperty( "path.separator" );
    String[] locations = classPath.split( delim );
    for ( int i = 0; i < locations.length; i++ )
          /* ** It doesn't work with either of these statments: ** */
          //This one tries the full path (e.g. /home/me/test/some.jar)
          //Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ] );
          //This one tries to use just the local name of the jar (e.g. test.jar)
          Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ].lastIndexOf( '/' ) + 1 ) );
          //This just prints null
          while (  en.hasMoreElements(); ) System.out.println( en.nextElement() );
    }Edited by: 6tr6tr on Dec 4, 2008 5:46 PM
    Edited by: 6tr6tr on Dec 4, 2008 5:47 PM

    What you are doing doesn't make sense. The resource locations within a JAR file are relative to the package directory structure within the JAR file, not to its own absolute location on the disk. And you seem to be expecting to retrieve a JAR file from within a JAR file. This makes no sense either.

Maybe you are looking for

  • How to locate the POV intersections where Custom Document is linked to

    Hi Experts, My customer tried to delete a custom document in HFM, and received an error message saying that the document is linked. Unfortunately, he does not remember what the POV intersections were? Is there a way to find out the POV intersections

  • SD-FI interface table(s)

    Dear CRM experts, I seek your kind advise on the following matter: On billing we wish to update the FI with an information from the SD as the 'assignment'. In the ECC we had done through a sort key and neceeeary entering of the "field's" value in the

  • Where is Solaris 10 Companion Disk?

    Hi all! When I have just finished setting up Solaris 10 on my PC (x86 - Intel), I realized that the X-Windows is not a part within CDs. Anh I do not how to download them, exactly, I do not know about their address in Sun website. Would you like to gu

  • Airport is acting strange, slowing my internet

    About a week ago I started experiencing a rather strange issue with my MacBook Pro. While connected to my network, my internet still works but when I try to connect to website it takes a good 10-15 seconds to load a web page during that time my brows

  • Can I set up Photoshop E

    Can I set up Photoshop Elements 10 to spread the workspace over two monitors?