Compile error: Returning a local object to a reference variable

Hi all...
I just need to know that when I return from a function with a local object to a reference, I am getting a compile error (Error name is "badarglval2"). Actually I'm sure that the error is closely related to Sun Solaris Compiler. According to C++ specs, when I return a local object to a reference, the local object has to survive until the refence variable is destroyed. However it doesn't work as expected with Solaris compiler and I am not allowed referencing a local variable.. Is there anyone who can explain why it works like this?
Thanks in advance...
- Volkan
Edited by: 938646 on 05.Haz.2012 00:46

Could you illustrate what you mean with a short (but complete) example?
Just in case: did you try adding a "const"?

Similar Messages

  • How to suppress compiler errors without excluding database objects from the "Schema Compare" tool (using VS2013/SSDT)

    Hi,
    In short: How to suppress compiler errors without excluding the object from the "Schema Compare" tool ??
    A bit longer:
    We have a SQL Server 2008 project in Visual Studio 2013 running SQL Server Data Tool.
    An old database, with a lot of history in, has been imported into SSDT and there are many syntax errors preventing the project from compiling/running. An typical error is: "SQL70001: This statement is not recognized in this context".
    Running the "faulty" scripts on the server, executes just fine. I understand that there are syntax errors and they should be rewritten, but it's not gonna happen just like that - it is a slow process over a long period of time.
    I know it is possible to change Build Action to None, but that also exclude the object from appearing in the Schema Compare function/window.
    So - how to ignore some compiler errors and still having the objects to appear when doing "Schema Compare" ??
    Thank you in advance.

    Hi Steven,
    Thanks for your comments.
    Well, it sure does help in the future, but right now i would prefer the other way - to suppress some errors and still allow the scripts to build.
    The thing is that if we "rewrite" the objects into create scripts, then we have a huge test job ahead of us + the database environments (PROD vs DEV and UAT) does not share the same AD or DB users and therefore grants is lost if dropping/creating
    objects, right!
    If you drop a object before creating it, the drop will also drop the roles and grants and since they don't share user table, the create will not be able to add the permissions again. There might be a solution to that, but it is going to be very complicated
    for some newbies like us. We need something we can trust.
    BR
    Peter

  • Compile Error on Final Arrays Project

    I'm sure this is an elementary problem, but I'm relatively new to Java. Can someone glance at this code for any apparent errors. I'm pretty sure the fillArrays() method and average() method are correct. I've tried everything, and there's no one I can ask. Any help would be greatly appreciated. This program is the final project of my java programming intro class.
    Thanks
    import ann.easyio.*;
    public class DoubleArrayOps
    public static double[] subArray(double data[], int start, int stop)
    double newData[] = new double[stop-start+1];
    int storeAt = 0;
    for (int i = start; i<= stop; i++)
    newData[storeAt++] = data;
    return newData;
    public static void printArray(Screen out, double data[])
    for (int i = 0; i< data.length; i++)
    out.print(data[i] + " ");
    public double average(double [] scoreArr)
    int numValues = scoreArr.length;
    double sum = 0.0;
    for(int i = 0; i < numValues; i++)
    sum += scoreArr[i];
    if(numValues > 0)
    return (sum / numValues);
    else
    System.err.println();
    return 0.0;
    public double standardDev(double [] scoreArr)
    int numValues = scoreArr.length;
    if(numValues > 0)
    double avg = average(scoreArr);
    double sumSqrTerms = 0.0;
    double term;
    for(int i = 0; i < numValues; i++)
    term = (scoreArr[i] - avg);
    Math.pow(term,2) += sumSqrTerms;//Compile error.
    return(Math.sqrt(sumSqrTerms / numValues));
    else
    System.err.println();
    return 0.0;
    import ann.easyio.*;               
    import hoj.*;
    class Grades extends Object
    static Screen theScreen = new Screen();
    static Keyboard theKeyboard = new Keyboard();
    public static void main(String args[])
    String [] nameArr;
    double [] scoreArr = new double [1000];
    double scores = fillArrays( nameArr, scoreArr);
    scoreArr = DoubleArrayOps.subArray(scoreArr, 0, scores-1);
    theScreen.print( "\nMean score: "
    + DoubleArrayOps.average(scoreArr)
    + "\n"
    + "Std. Dev: "
    + DoubleArrayOps.standardDev(scoreArr)
    +"\n");
    char [] gradeArr;
    gradeArr = computeLetterGrades(scoreArr);
    displayArrays( nameArr, scoreArr, gradeArr);
    public static double fillArrays(String [] nameArr, double [] scoreArr)
    int n = 0;
    String name;
    double score;
    while(true)
    Keyboard theKeyboard = new Keyboard();
    theScreen.print("\nPlease enter students name: ");
    name = theKeyboard.readWord();
    if (name.equals("done"))
              break;
    nameArr[n]=name;
    score = theKeyboard.readDouble();
    scoreArr[n]=score;
    n += 1;
    return n;
    public static char computeLetterGrades(double [] scoreArr)
    int numValues = scoreArr.length;
    char [] gradeArr = scoreArr.length;
    if(numValues > 0)
         double avg = average(scoreArr);
              double sDev = standardDeviation(scoreArr);
              double F_CUT_OFF = (avg - 1.5 * standardDev);
              double D_CUT_OFF = (avg - 0.5 * standardDev);
              double C_CUT_OFF = (avg + 0.5 * standardDev);
              double B_CUT_OFF = (avg + 1.5 * standardDev);
    for(int i = 0; i < numValues; i++)
              if(scoreArr < F_CUT_OFF)
              return gradeArr['F'];
              else if(scoreArr < D_CUT_OFF)
              return gradeArr['D'];
              else if(scoreArr < C_CUT_OFF)
              return gradeArr['C'];
              else if(scoreArr < B_CUT_OFF)
              return gradeArr['B'];
              else
              return gradeArr['A'];
              return gradeArr[];
    public static double displayArrays(String [] nameArr, double [] scoreArr, char [] gradeArr)
    Screen theScreen = new Screen();
    theScreen.print(+ Grades.fillArrays(nameArr,scoreArr)
    + Grades.computeLetterGrades(gradeArr);

    All my errors are compile errors. Here are the errors I get, and I've tried everything I know with null results. :) Thanks for the responses!
    Grades.java:115: 'class' or 'interface' expected
    public static char computeLetterGrades(double [] scoreArr)
    ^
    Grades.java:31: subArray(double[],int,int) in DoubleArrayOps cannot be applied to (double[],int,double)
    scoreArr = DoubleArrayOps.subArray(scoreArr, 0, scores-1);
    ^
    Grades.java:34: non-static method average(double[]) cannot be referenced from a static context
    + DoubleArrayOps.average(scoreArr)
    ^
    Grades.java:37: non-static method standardDev(double[]) cannot be referenced from a static context
    + DoubleArrayOps.standardDev(scoreArr)
    ^
    Grades.java:42: cannot resolve symbol
    symbol : method computeLetterGrades (double[])
    location: class Grades
         gradeArr = computeLetterGrades(scoreArr);
    ^
    Grades.java:44: cannot resolve symbol
    symbol : method displayArrays (java.lang.String[],double[],char[])
    location: class Grades
         displayArrays( nameArr, scoreArr, gradeArr);
    ^
    DoubleArrayOps.java:69: unexpected type
    required: variable
    found : value
              Math.pow(term,2) += sumSqrTerms;//Compile error.

  • Occasional compiler error when cloning

    Hi,
    I believe I have written all my clone() methods correctly now (thanks guys) and I see this error with only two of the many clone() calls I make. Every other clone() call compiles fine. I was hoping someone might have a hint for me.
    //the class is called NbrInfo and id, policy1, policy2 are its member vars
    // ----- NbrInfo.clone -----------------------------------------------------//
      protected Object clone() {
        NbrInfo ni    = (NbrInfo)super.clone(); //ok
        ni.id              = (IPaddress)id.clone();  //ok
        ni.policy1    = (Rule)policy1.clone(); //compiler error
        ni.policy2    = (Rule)policy2.clone(); //compiler error
        return ni;
      }I don't understand why cloning the id variable works but cloning the policy variables don't. Here are the two classes in question (unrelated stuff left out):
    public class IPaddress implements Cloneable {
      // ........................ member data .......................... // 
      /** The actual IP address. */
      public String ip_address;
      protected Object clone() {
        IPaddress ip_addr = (IPaddress)super.clone();
        return ip_addr; //Strings are immutable, so we don't do a deep copy on them
    } // end of class IPaddress
    public class Rule implements Cloneable {
      // ........................ member data .......................... //
      /** The predicates that make up the rule. They will be Strings.*/
      private ArrayList predicates = new ArrayList();
      // ----- Rule.clone() -----------------------------------------------------//
      protected Object clone() {
        Rule r = (Rule)super.clone();
        r.predicates = (ArrayList)predicates.clone();
        return r;
    } // end of class RuleThere are other places in my code where I clone() other classes as well, and they are written like I have for IPaddress and they also compile fine. It is just this Rule class that doesn't seem to work right, even though, to me, it looks like I did it exactly like I did the IPaddress class.
    Here is the error message:
    NbrInfo.java [150] clone() has protected access in Rule
    Thanks.

    Isn't the stmt where you attempt to clone ArrayList
    generating a compiler error? Container classes
    don't have public clone methods. You have to construct
    an explicit copy for them.Well, the NetBeans compiler points me to the line where NbrInfo is being cloned, but I think it could be what you suggest. Yesterday I was trying to clone ArrayLists elsewhere and got this same problem.
    So should I do the bold move of putting the keyword "new" in the Rule.clone() method? Something like:
    // ----- Rule.clone() -----------------------------------------------------//
      protected Object clone() {
        Rule r = (Rule)super.clone();
        r.predicates = new ArrayList(predicates);
        return r;
      }It's just that I found a tutorial online the other night that seemed pretty against using "new" in clone() methods. I hate to violate and laws Java wants me to obey.

  • CRVS2010 Beta - Compiler Error Message: BC32206:

    Compiler Error Message: BC32206: The project currently contains references to more than one version of CrystalDecisions.Web, a direct reference to version 12.0.2000.0 and an indirect reference (through 'StarPDM2.PDMSpecCrystal.CrystalReportViewer1') to version 14.0.2000.0. Change the direct reference to use version 14.0.2000.0 (or higher) of CrystalDecisions.Web
    I put the lines in the web.config as stated in the notes.
    thanks
    Ken

    Mandeep,
    Have you got any solution for this as I am also facing the same issue.
    Server Error in '/applicationnameqa' Application.
    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
    Compiler Error Message: CS1705: Assembly 'applicationname.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'CrystalDecisions.CrystalReports.Engine, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' which has a higher version than referenced assembly 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
    Source Error:
    [No relevant source lines]
    Source File:    Line: 0
    Show Detailed Compiler Output:
    c:\windows\system32\inetsrv> "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\assembly\dl3\7d95d4c9\041adbd0_2e72ca01\applicationname.Splitter.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.InfoStore\12.0.1100.0__692fbea5521e1304\CrystalDecisions.Enterprise.InfoStore.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.ReportSource\12.0.2000.0__692fbea5521e1304\CrystalDecisions.ReportSource.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.ReportAppServer.DataDefModel\12.0.1100.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.DataDefModel.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\App_Code.whwoj_l1.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Framework\12.0.1100.0__692fbea5521e1304\CrystalDecisions.Enterprise.Framework.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Viewing.ReportSource\12.0.1100.0__692fbea5521e1304\CrystalDecisions.Enterprise.Viewing.ReportSource.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.Enterprise.Desktop.Report\12.0.1100.0__692fbea5521e1304\CrystalDecisions.Enterprise.Desktop.Report.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Shared\12.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.ReportAppServer.Controllers\12.0.1100.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.Controllers.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\WINDOWS\assembly\GAC\CrystalDecisions.ReportAppServer.ClientDoc\12.0.1100.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\assembly\dl3\c350966a\d484edb6_cf17cb01\applicationname.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\12.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\12.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\App_Web_reportviewertest.aspx.cdcab7d2.rqat3bqm.dll" /D:DEBUG /debug+ /optimize- /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\wrr15z3d.res" /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\App_Web_reportviewertest.aspx.cdcab7d2.rqat3bqm.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\App_Web_reportviewertest.aspx.cdcab7d2.rqat3bqm.1.cs"
    Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
    Copyright (C) Microsoft Corporation. All rights reserved.
    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\applicationnameqa\ce84c14c\a620f1ad\assembly\dl3\c350966a\d484edb6_cf17cb01\applicationname.Web.DLL: error CS1705: Assembly 'applicationname.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'CrystalDecisions.CrystalReports.Engine, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' which has a higher version than referenced assembly 'CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
    c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\12.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll: (Location of symbol related to previous error)
    Thank you
    Hrushikesh Patel
    Edited by: Hrushikesh Patel on Jun 30, 2010 8:43 AM

  • Java Adapter Compile Error - Missing Libraries

    I am trying to convert my project from being deployed on Flex Data Services 2 To LiveCycle Data Services. I dont know very much about java and have hit a snag when trying to recompile my custom java adaptor.
    It compiles fine under a FDS2 project, but when compiled under a LCDS deployment on JRun, Eclipse gives me the following error when trying to compile:
    Project PTSChat_Java is missing required library: lib/commons-codec.jar
    Project PTSChat_Java is missing required library: lib/commons-httpclient.jar
    The project cannot be built until build path errors are resolved
    It appears that the libraries have been renamed to commons-codec-1.3.jar & commons-httpclient-3.0.1.jar in LCDS, but I am not sure where to update these references? They are not direct library imports in my java code.
    As a shot in the dark, I tried just copying the old FDS2 libraries back over to the WEB-INF\lib\ DIR since there are named differently. It resolved the missing library error, but then I got a compile error with service cannot be resolved in references to my MessageService msgService = (MessageService) service; java code. I quickly realized this is not the correct path to head down.
    Does anyone have any clues what I may be doing wrong? Any help is much appreciated.
    Thanks!

    I resovled the problems I was having.
    I was able to figure out how to change the library linking in eclipse and switched the commons-codec-1.3.jar & commons-httpclient-3.0.1.jar in the place of commons-codec.jar & commons-httpclient.jar libraries previously used with the project (properties:libraries).
    I was not able to correct the service cannot be resolved. Everything I did kept crashing and dropping my connection tot he channel. I ended up just switching the code in my java adapter from:
    MessageService msgService = (MessageService) service
    to
    MessageBroker broker = MessageBroker.getMessageBroker(null);
    MessageService msgService = (MessageService) broker.getService("message-service");
    This appears to be working as desired for my use of the java adapter for the session management & logging. I am not really certain why the "service" became undefined between FDS2 & LCDS, something must have been depreciated or changed around.

  • How Do I Convert a String that Names an Object to a Reference to the Object

    You get many program-specific object names in the XML that is returned by describeType.  Suppose I find an object that interests me.  What is the best way to convert the String that names the object (e.g. the id of the object) to a reference variable that points to the object? 

    Sure.  I am working on a complex application that involves several ViewStacks, several Accordions, some checkboxes, some radio buttons, some text boxes.  These components are scattered about, but all are children of a base class that is successfully enumerated by
    var classInfo:XML = describeType(vwstk);
    Suppose I write a loop as follows:
     for each (var a:XML in classInfo..accessor){
    Inside that loop I have a series of tests like
    if (a.@type == "mx.controls::CheckBox"{
    Then, I iterate thru all of the children of the base class as in:
    for  
    (var u:Object in vwstk)
    {        if  
    Inside the if I persist the checked/not checked status of the checkbox.
    The tricky part is going from the string a.@name to the Object reference u.  I doubt my proposed method will work.  Do you have a better idea?

  • Is down casting possible in Java objects(reference variables)?

    I hope, Java up casting and down casting is possible in Java primitive variables like int float and so on.
    My doubt is,Does in object of Java(reference variables) support down casting?

    makpandian wrote:
    the ques i asked here is popped from my mind.We know that.
    But i did not get answer .Because you didn't do any research.
    Than s why i ask this here..That's the wrong approach. Do some research first. Use google, a textbook, a tutorial, the JLS, write some code, etc. etc.
    After spending time and effort doing that, if you still have questions, indicate clearly what you read and what part you didn't understand. The way you're doing it is NOT an effective way to learn, and it's a waste of everyone's time.

  • How to Include Warnings/Error messages in Return Service Data Object

    Hello All,
    I am using Jdeveloper 11.1.1.3.0, ADF BC. and want to publish Service-Enabled application modules, specifically I want to publish a custome method in the application module as a web service.
    While going through Enable support for Service Interface wizard as explained in developer guide, in step 7 I read this
    >
    7. To expose service information messages such as warnings and exceptions for a custom method or warnings for process operation methods, select Include Warnings in Return Service Data Object. For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    If Include Warnings is not selected, no informational messages will be returned with the service response. This option is only enabled when the method does not return a view row or a list
    of view rows. When the method returns view rows, the underlying view object determines whether the method supports warnings, as described Section 11.2.4, "How to Service-Enable Individual View Objects." The informational messages (and warnings) are reported as part of the return object. JDeveloper generates appropriate wrappers as the return objects, and the wrappers contain the actual method return and the informational messages.
    >
    I am interested in this part: For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    To do this, I write a method in the application module
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
           return first!=null ? first.getSalary() : null;
    }and I selected the Include Warnings in Return Service Data Object check box. but how and where can I expose the error or warning message?
    Note:
    I tried to throw an exception in the method
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
            if(first!=null && (first.getSalary()!=null || first.getSalary().compareTo(1000)==1))
                throw new JboException("out of range salary");
             return first!=null ? first.getSalary() : null;
    }and when I test the web service for some employee I get this response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
         <env:Body>
              <env:Fault>
                   <faultcode>env:Server</faultcode>
                   <faultstring>out of range salary</faultstring>
                   <detail><tns:ServiceErrorMessage xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:xsi=      "http://www.w3.org/2001/XMLSchema-instance"><tns:code/><tns:message>out of range  salary</tns:message><tns:severity>SEVERITY_ERROR</tns:severity><tns:exceptionClassName>oracle.jbo.JboException</tns:exceptionClassName></tns:ServiceErrorMessage>
                   </detail>
              </env:Fault>
         </env:Body>
    </env:Envelope>but is this the right approach or there is another place to show error/warning messages?
    Edited by: Mohammad Jabr on Apr 16, 2012 1:17 PM

    This is fine if you raise exception from your code. It will be raised as a server fault only.

  • After December 2014 update, Compile Error - calling Excel Objects Sub "Object library invalid or contains references to object definitions that could not be found"

    When try to call Sub in Excel Objects > SheetXX after the original xlsm is modified and saved by another user in diff machine, getting an error below and seems Excel cannot identify any subs exists in Sheet.
    Compile error:
    Object library invalid or contains references to object definitions that could not be found
    Note: it seems that this problem has been occurring After December 2014 update and still exists even after applying the fix:
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-stop-working-after-december-2014-updates-.aspx)

    Hi Kwlee324,
    Thanks for sharing the workaround with us. It would be very helpful for others who have the same issue.
    Also I found a two useful links about the error message "Object library invalid or contains references to object definitions that could not be found":
    https://support.microsoft.com/kb/2703186
    http://blogs.msdn.com/b/vsod/archive/2009/06/05/visual-basic-6-controls-stop-working-after-security-advisory-960715.aspx
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Play Framework - Compilation error[object inject is not a member of package javax]

    I would like to add to the table "Person" when you press the button "Add a Person" but I get an error:
    play.PlayExceptions$CompilationException: Compilation error[object inject is not a member of package javax]
    at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
    at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
    at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
    controller is in the class Application:
    package controllers
    import play.api._
    import play.api.mvc._
    import play.api.data.Form
    import play.api.data.Forms._
    import play.api.libs.json.Json
    import models._
    import javax.inject._
    class Application @Inject() (db: DB) extends Controller {
      def index = Action {
       Ok(views.html.index())
      val personForm: Form[Person] = Form {
       mapping(
       "name" -> text
       )(Person.apply)(Person.unapply)
      def addPerson = Action { implicit request =>
       val person = personForm.bindFromRequest.get
      db.save(person)
      Redirect(routes.Application.index)
    I do not know how to add a library javax.inject-1.jar ?
    Is there another solution . Thank for you help in this matter.

    If this is still an outstanding issue, and you have a valid CSI, a BDB support license, please access MOS (MyOracle Support) and review Note 1198943.1: "Building BDB XML 2.5.16 with STLPort on Solaris using Sun Studio". If you cannot access MOS, drop me an e-mail at andrei dot costache at the obvious domain, and I will send the details.
    Regards,
    Andrei

  • Compile Error: missing return statement

    anyone knows why the following program yields compile error "missing return statement??"
    class LengthTest
         public int stringLength(String s)
         {     int len = s.length();
              if (len <= 5) return 5;
              else if (len <= 10) return 10;
              else if (len <= 20) return 20;
    //          else return 30;
    If I add "else return 30" statement, then it can stop the error. Any ideas??

    You might know that the string length will never be more than 20, but the compiler does not. So it forces you to supply a return statement that will be executed no matter what the string length is.

  • Compile error: Object library invalid or contains references to object definitions that could not be found

    Office Online 365 installed today January 20 on brand new HP Envy. Get the above message when loading Excel applications with code and when running code. Will greatly appreciate help. Applications run well on other computers.

    Hi Jaime,
    >> Get the above message when loading Excel applications with code and when running code. Will greatly appreciate help. Applications run well on other computers.
    >> Compile error: Object library invalid or contains references to object definitions that could not be found
    According to the error message, it seems some ActiveX control is not registered successfully on the new machine.
    Would you mind telling us which ActiveX controls you used in the workbook?
    >> For my applications Excel from Office 365 is now useless. Should I just let my subscription run out and purchase another version?
    According to my experience, this issue is not related to the subscription.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Compiler Error, Missing Return Statement

    This line of code for the begining of a method that reads a file always throws the compiler error, missing return statement. I can't figure out how to fix it!
    public String[] read(InputStream list) throws Exception {
    Could someone please help?

    you might need to post more code, but basically the
    compiler is complaining because you do not have a
    return statement at the end of your method.
    if you do not have a return statement (with a matching
    return type) then the compiler will complain. If you
    don't understand this then post the code to your
    method and we can get it fixed.
    public String[] read(InputStream list) throws
    Exception {
    String[] stringArray;
    return stringArray;
    The code is the most complex I have written so far but here is some of it. (the begining and the end)
    public String[] read(InputStream list) throws Exception {
    if (list != null) {
    String[] stringArray = null;
    try {
    while {
    //add strings to string array
    }//end of while
    return stringArray;
    }// end try
    catch{
    }//end of method

  • MDT 2013: ZTI ERROR - Unhandled error returned by ZTIWindowsUpdate: ActiveX component can't create object (429)

    Hi,
    I try to capture a custom image but at the end of the process, I get the following error (see attached image):
    ZTI ERROR - Unhandled error returned by ZTIWindowsUpdate: ActiveX component can't create object (429)
    Could someone help me to solve this please?

    Hi everybody,
    I'm getting this message time to time and I don't know why. I have the ZTIWindowsUpdate.log who says:
    <![LOG[Ready to Opt-In to Microsoft Update: WUA Version: 7.6.7601.18804]LOG]!><time="15:35:07.000+000" date="04-14-2015" component="ZTIWindowsUpdate" context="" type="1" thread="" file="ZTIWindowsUpdate">
    <![LOG[ZTI ERROR - Unhandled error returned by ZTIWindowsUpdate: ActiveX component can't create object (429)]LOG]!><time="15:35:37.000+000" date="04-14-2015" component="ZTIWindowsUpdate" context="" type="3"
    thread="" file="ZTIWindowsUpdate">
    <![LOG[Event 41002 sent: ZTI ERROR - Unhandled error returned by ZTIWindowsUpdate: ActiveX component can't create object (429)]LOG]!><time="15:35:38.000+000" date="04-14-2015" component="ZTIWindowsUpdate" context=""
    type="1" thread="" file="ZTIWindowsUpdate">
    Do we have an explanation for this issue? Or, do you know how to fix that?

Maybe you are looking for