Error with declaring a method with array variable

Hi,
I had implemented this:
import java.awt.*;
import javax.swing.*;
public class Oefening1
     public static void main(String args[])
          int array[]= new int[10];
          int getal;
          JTextArea outputArea = new JTextArea();
          Container container = getContentPane();
          container.add(outputArea);
          public void invoerRij(int array[10])
               output +=" ";
               for(int counter = 0; counter <10;counter++){
                    output +="Geef een getal in"+"\n"+array[counter]+"\n";
                    outputArea.setText(output);
I had comilated this code while the compiler gave errors like these:
A:\Oefening1.java:15: illegal start of expression
          public void invoerRij(int array[10])
^
A:\Oefening1.java:24: ';' expected
^
A:\Oefening1.java:12: cannot resolve symbol
symbol : method getContentPane ()
location: class Oefening1
          Container container = getContentPane();
^
3 errors
Tool completed with exit code 1
Now i have read my book and finded out that the declaration of a method always starts with public.
Can anyone halp me solving these probs? Thanks
Crazydj1

The problem is that you didn't close the previous method definition.
Compiler error messages (in any language) often mistakenly report false errors on perfectly valid code immediately following the actual error.
When you post code on these forums, please wrap in in &#91;code]&#91;/code] tags.

Similar Messages

  • Error with instance variable and constructor of base class

    I am getting the error on the following statement "protected Point apoint" of by base class. What is causing this problem? See my code:
    package Shapes;
    public abstract class Shapes
         protected Point apoint; / ****error at this line****/
         public void move(double xdelta, double ydelta)
              apoint.x += xdelta;
              apoint.y += ydelta;
    public abstract void distance();
    public abstract void show();
    public String toString()
    return "\nThe starting point is at coordinates ("+x+","+y+")";
    package Shapes;
    public class Lines extends Shapes
    protected Point start;
    protected Point end;
         protected double x;
         protected double y;
         double delta;
         public Lines( final Point apoint, final Point bpoint)
    start.x = apoint.x;
              start.y = apoint.y;
              end.x = bpoint.x;
              end.y = bpoint.y;
    public Lines(double xstart, double ystart, double xend, double yend)
    this.xstart = xstart;
              this.ystart = ystart;
              this.xend = xend;
              this.yend = yend;
         public Lines(double x, double y)
              this.x = x;
              this.y = y;
                   public void distance(final Lines start, final Lines end)
                        delta = abs(Math.sqrt (super.x - start.x) * (super.x - end.x) +
                        (super.y - start.y) * (super.y - end.y));
                   Lines move(Point start, double delta)
                        end.x += delta;
                        end.y += delta;
                        return new Point(end);
    public Lines show()
    g.drawLine( start.x, start.y, end.x, end.y);
    public String toString()
    return super.toString()+ "\n moved distance is("
                   + start + ") : (" + end + ")"
                   +" \n to position(" + start + " ) : (" + end + ")";
    package Shapes;
    public class Rectangle extends Lines
         double delta;
    public Rectangle (Point top_lft_pt, Point bottom_rght_pt)
    super(top_lft_pt, bottom_rght_pt);
    public Rectangle(double x_top_lft, double y_top_lft, double x_bottom_rght, double y_bottom_rght)
    super(x_top_lft, y_top_lft, x_bottom_rght, y_bottom_rght);
         public Rectantgle is_it_diagonal()
              if(top_lft.x > bottom_rght.x && bottom_rght.x < top_lft.x)
                   System.out.println("Point are Not Diagonal");
                   public void distance(double delta)
                        delta = abs(Math.sqrt (top_lft.x - bottom_rght.x) * (top_lft.x - botton_rght.x) +
                        (top_lft.y - bottom_rght.y) * (top_lft.y - bottom_rght.y));
                   public Rectangle move(final Point top_lft_pt, double delta)
                        bottom_rght.x += delta;
                        bottom_rght.y += delta;
                        return new Point(bottom_rght_pt);
                   public void get_top_rght_coords()
                        Point top_rght = new Point();
                        top_rght.x = bottom_rght.x;
                        top_rght.y = top_lft.y;
                   public void get_bottom_left_coords()
                        Point bottom_lft = new Point();
                        bottom_lft.x = top_lft.x;
                        bottom_lft.y = bottom_rght.y;
         public Rectangle show()
                        g.drawLine(top_lft.x, top_lft.y, top_rght_x, top_rght_y);
                        g.drawLine(bottom_lft.x, bottom_lft.y, bottom_rght.x, bottom_rght.y);
                        g.drawLine(top_lft.x, top_lft.y, bottom_lft.x, bottom_lft.y);
                        g.drawLine(top_rght.x, top_rght.y, bottom_rght.x, bottom_rght.y);
    package Shapes;
    public class Circles extends Lines
    protected double radius;
         public double delta;
         protected Point center;
    public Circles(double x, double y, double radians)
    super(x, y);
              radius = radians;
         public Circles(Point acenter)
              center.x = acenter.x;
              center.y = acenter.y;
    public void distance()
    delta = abs(Math.sqrt(super.x - x) * (super.x - x) + (super.y - y) * (super.y -y));
         public Circles move(final Point Circles, double delta)
              return new Point(Circles);
    public void show()
    g.drawOval(Circles.x, Circles.y, radius, radius);
    package Shapes;
    import java .math .*;
    import java.util .Random ;
    public class ShapesDriver
    Shapes[] aShape = new Shapes[10];
    static double range = 101.0;
    static Random r1 = new Random();
    public static void main(String [] args)
    double[][] coords = new double[10][10];
    double[] radians = new double [10];
    Shapes anyShape = {
    new Circles(radians),
    new Lines(coords),
    new Rectangle(coords)
    Shapes aShape; /***error at this line***/
              for(int i = 1; i <= coords.length; i++)
    for(int j = 1; j <= coords.length; j++)
                                                      coords[i][j] = r1.nextDouble () * range;
                                                      radians[j] = r1.nextDouble () * range;
    aShape[i] = anyShape[r1.nextInt(aShape.length)];
    System.exit(1);

    Thanks for your help with this problem. Now I have another problem that I am having a hard time figuring out. My program is using inheritance and polymorphism. I trying to use only one version of methods in the superclass points which extends the shapes class which is the abstract superclass vs. repeating the implementation of the methods (move, show, etc.) in each of the subclasses. The error I am getting is this "declare the class abstract, or implement abstract member 'Point Shapes.move()'. As you see, move is declared abstract and of type point in the Shapes superclass and it's behavior is implemented in the subclass Points extending Shapes. The other subclasses, circle, rectangle and lines will invoke the move method from Points and return a new point object. Why I am I getting the error to declare or implement move when the implementation is in Point?
    Below is code, please help?
    import java .awt .Point ;
    public class ShapesDriver
         public static void main(String args[])
              int count = 0;
              int choice;
              Point start = null;
              Point end = null;
              System.out .println(" 1 i am here");
              start = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
              end = new Point((int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
         System.out .println(" 2 i am here");     
         System.out.println (start);
         System.out.println(end);                         
         for(int i = 0; i <= count; i++)
              System.out .println(" 3 i am here");
              choice = (int)(4.0 * Math.random());
              System.out .println(" 4 i am here");
              System.out.println (choice);     
         switch(choice)
              case 0: //Lines
              System.out .println(" 5 i am here");
              Lines apoint = new Lines((int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                                  (int)(Math.random()* 10.0), (int)(Math.random()* 10.0));
              Point coords = new Point((int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
              new Point((int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
              break;
              case 1: //Circles
              System.out .println(" 6 i am here");
              Circles center = new Circles((double)(Math.random()* 10.0),
              (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
              (double)(Math.random()* 10.0),(double)(Math.random()* 10.0));
              Circles centerpt = new Circles((int)(Math.random()* 10.0),
              (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
              (int)(Math.random()* 10.0), (double)(Math.random()* 10.0));
         break;
              case 2: //Rectangles
         System.out .println(" 7 i am here");
              Rectangle top_lft_pt = new Rectangle ((double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0), (double)(Math.random()* 10.0),
                             (double)(Math.random()* 10.0));
              Rectangle bottom_rgt_pt = new Rectangle ((double)(Math.random()* 10.0),
                   (double)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0), (int)(Math.random()* 10.0),
                             (int)(Math.random()* 10.0));
         break;
         default:
         System.out .println(" 9 i am here");
         System.out.println("\nInvalid shape choice =" + choice);
         System.exit(0);
         break;
         try
                   System.in.read();
                   catch(java.io.IOException ioe)
    import java .awt .Point ;
    public abstract class Shapes
         private String shape;
         public Shapes(String ashape)
              shape = new String(ashape);
         public abstract Point move();
         public double distance()
              return 0.0;
         public abstract void show();
         public String toString()
              return "\nThis shape is a" + shape;
    import java .awt .Point ;
    public class Rectangle extends Points
         protected Point top_lft;
         protected Point top_rgt;
         protected Point bottom_lft;
         protected double top_lft_x;
         protected double top_lft_y;
         protected double bottom_rgt_x;
         protected double bottom_rgt_y;
         protected Point bottom_rgt;
         protected double delta = 0;
         protected String shape = "Rectangle";
         public Rectangle(double x, double y, double top_lft_x,
                             double top_lft_y, double bottom_rgt_x,
                             double bottom_rgt_y)
              super(x, y);
              top_lft_x = top_lft_x;
              top_lft_y = top_lft_y;
              bottom_rgt_x = bottom_rgt_x;
              bottom_rgt_y = bottom_rgt_y;
         public Rectangle( double x, double y, Point bottom_rgt, Point top_lft)
              super(x, y);
              bottom_rgt_x = bottom_rgt.x;
              bottom_rgt_y = bottom_rgt.y;
              top_lft_x = top_lft.x;
              top_lft_y = top_lft.y;
         public String toString()
              return super.toString() + " coordinates top left= " + top_lft_x + "," + top_lft_y + "and bottom right" +
                   bottom_rgt_x + "," + bottom_rgt_y + ")";
         public void is_it_diagonal()
              if(top_lft_x < bottom_rgt_x && bottom_rgt_x > top_lft_x)
                   System.out.println("Points are Not Diagonal");
              public double distance()
                   distance ();
                   return delta;
              public Point move(Point top_lft)
                   move();
                   bottom_rgt_x += delta;
                   bottom_rgt_y += delta;
                   return top_lft;
              public void get_other_coords()
                   top_rgt.x = bottom_rgt.x;
              top_rgt.y = top_lft.y;
                   bottom_lft.x = top_lft.x;
                   bottom_lft.y = bottom_rgt.y;
              public void show()
                   super.show();
                   System.out.println("new coords are :");
                   System.out .println ("(" + top_lft_x + "," + top_lft_y + ")");
                   System.out .println ("top right(" + top_rgt + ")");
                   System.out .println ("(" + bottom_rgt_x + "," + bottom_rgt_y + ")");
                   System.out .println ("bottom right(" + bottom_rgt + ")");
    import java .awt .Point ;
    public class Points extends Shapes
         protected double delta = 0.0;
         protected double x;
         protected double y;
         protected String ashape = "Points";
         public Points( double x, double y)
              super("Points");
              x = x;
              y = y;
         public Points( Point start)
              super("Points");
              x = start.x;
              y = start.y;          
         public String toString()
              return super.toString() + "References coordinates(" + x + y + ")";
         public double distance(double x1, double y1 )
              return delta =(Math.sqrt(x - x1) * (x - x1) + (y - y1) *
              (y - y1));
         public Point move(Point pts)
              pts.x += delta;
              pts.y += delta;
              return pts;
         public void show()
              System.out.println("This shape is a" + ashape + "(" +
                                  "(" + x+ "," + y + ")");
    import java .awt .Point ;
    public class Lines extends Points
         double delta = 0;
         protected double x;
         protected double y;
         protected String ashape = "Lines";
         public Lines( double x1, double y1, double x, double y)
              super(x1,y1);
              x = x;
              y = y;
         public Lines(Point start, Point end)
              super(start);
              x = end.x;
              y = end.y;
         public String toString(Point end)
              return super.toString() + "line points = (" + x + "," + y +
                   "(" + end + ")";
         public double distance()
              distance ();
              return delta;
         public Point move(Point lines)
              move ();
              return lines;
         public void show()
              System.out.println("This shape is a" + ashape + "(" +
                                  "(" + x + "," + y + ")");
    import java .awt .Point ;
    public class Circles extends Points
    protected double radius;
    protected double xcenter;
    protected double ycenter;
    protected String ashape = "Circle";
         public Circles( double x, double y, double cx, double cy, double radians)
              super(x, y);
              xcenter = cx;
              ycenter = cy;
              radius = radians;
         public Circles( Point acenter, Point ref, double radians)
              super(ref);
              xcenter = acenter.x;
              ycenter = acenter.y;
              radius = radians;
         public String toString(Point ref)
              return super.toString() + " reference points (" +
                   ref + ")" +
                   "center coordinates (" + xcenter + "," + ycenter + ")";
              public double distance(Point ref)
                   return (Math.sqrt(ref.x - xcenter) * (ref.x - xcenter)
                             + (ref.y - ycenter) *
              (ref.y - ycenter));
              public Point move(Point center)
                   move();
                   return center;
              public void show()
                   System.out.println("This shape is a" + ashape + "(" +
                                  "(" + xcenter + "," + ycenter + ")");

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Error with ARRAY- ArrayDescriptor

    Hi!
    I've a very weird error with an application built in JDeveloper 10G 10.1.2.2.0 (Build 1929). I need to call an store procedure and pass an ARRAY parameter. To do so, I just
          Connection conn = callStoredProcPST.getConnection();    
          ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "NUM_ARRAY", conn );                 
          ARRAY array_to_pass = new ARRAY( descriptor, conn, P_LISTTYPE );    
          callStoredProcPST.setArray(2, array_to_pass);and works perfectly if I run it from JDev. However, if I deploy such application in OAS 10.1.2.0.2 I got an exception:
    java.lang.NullPointerException
         at oracle.jdbc.driver.PhysicalConnection.isDescriptorSharable(PhysicalConnection.java:5025)
         at com.evermind.sql.OracleConnectionBCELProxy__oracle_jdbc_driver_T4CConnection__SQLBCELProxy.isDescriptorSharable()
         at oracle.sql.ARRAY.<init>(ARRAY.java:118)I redeploy the ADF installer in the server but that doesn't work. I am sure that this is some kind of problem with the jars between my local JDev and OAS.
    Do you have any idea about this?
    Best regards,
    Gerardo

    Ok, I solved the problem.
    After the connection opened my code executed the following sql "+ALTER SESSION SET CONSTRAINTS=DEFERRED+", it made all the deferrable constraints deferred.
    Yair

  • Problem with arrays - variable not been inicializes

    I've declared my array ;
    int[] array ;
    int intefer;
    BufferedReader stdin = new BufferedReader(new InputStreamReader( System.in ));
    intefer = stdin.readLine();
    array[0] = intefer; --> variable array might not have been initialized.
    Can you please help me ? Why is the error occuring ?

    array[0] = intefer; --> variable array might not have been initialized.
    Can you please help me ? Why is the error occuring ?An array is an object; all object should be instantiated by use of the 'new'
    operator. You never instantiated such an object and therefore never
    initialized your 'array' variable.
    kind regards,
    Jos

  • Ora-01008 error with bind variable

    Hi,
    We have a test program which have one bind variable on a column which is varchar2(20), in the test program we've passed a 20 character string to the variable. The program returns error in one of the databases but all others are successful. We've checked the column is same in all of them.
    Exception in thread "main" java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-01008: not all variables bound
    Could you please advise how to troubleshoot this issue?
    Regards

    We aren't going to be able to help you if you won't post the database code that is giving the error.
    And now we need the Java code that is constructing the query that you are using.
    Your error is saying there is a second variable that you are not providing a value for.
    And you said
    >
    We have a test program which have one bind variable on a column which is varchar2(20), in the test program we've passed a 20 character string to the variable.
    >
    But you are using a string that is 23 characters long
    "a3g34-b13fd-efaie-f83fk"How does 23 go into 20?

  • Working with array variables defined in the BPM process

    Hello,
    I have created an array variable in my process. This array was created based on a custom type that contains 2 strings variables.
    How can I set/get and add new items to this array variable using java code?
    The only thing I know is that, if this was a simple variable I would do something like this:
    DCBindingContainer bc = (DCBindingContainer)FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(FacesContext.getCurrentInstance(), "#{bindings}", BindingContainer.class);
    JUCtrlAttrsBinding dc = (JUCtrlAttrsBinding) bc.findNamedObject("myVar");
    dc.setInputValue("theValue".toString());
    thank you
    fwu

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • Error with Bind Variable for dblink

    Good morning,
    I am attempting to implement some code in a pre-page process but having problems with it. I need to query a value from the database using a dblink that points at a different database depending upon the session. I have tried the following two approaches...
    SELECT COALESCE(Attribute20,'PENDING')
    INTO str_Import_Status
    FROM GL_JE_LINES@&P0_INSTANCE.
    WHERE JE_HEADER_ID = :P430_JE_HEADER
    AND JE_LINE_NUM = :P430_JE_LINE;
    as well as...
    str_SQL_Statement := 'SELECT COALESCE(Attribute20,''PENDING'') '||
    'INTO str_Import_Status '||
    'FROM GL_JE_LINES@'||:P0_INSTANCE||' '||
    'WHERE JE_HEADER_ID = '||:P430_JE_HEADER||' '||
    'AND JE_LINE_NUM = '||:P430_JE_LINE||';';
    EXECUTE IMMEDIATE str_SQL_Statement;
    I am boggled because I completely expected the first approach to work. I have a similar statement in a post submit process which works fine. That statement is...
    SELECT COUNT(*)
    INTO num_Collector_Count
    FROM XXMC_GL_TSG2FIMS_CROSSREF@&P0_INSTANCE.
    WHERE Collector_Code = :P915_Collector_Code;
    Any help or pointers on this would be greatly appreciated.
    --Adam Cumming                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Never mind....
    After I posted this I realized I had a bad variable name. Syntax error

  • "Invalid Expression " Error with Refreshing variable

    Hi
    When ever i try to validata following query in Refreshing tab of a variable, I am getting invalid expression error
    select USER_NAME from SNP_SESSION where SESS_NO = <%=odiRef.getSession()%>
    if i use following Query
    select STEP_MESS
    from <%=snpRef.getObjectName("L","SNP_STEP_LOG","D")%>
    where SESS_NO = <%=snpRef.getSession("SESS_NO")%>
    and STEP_STATUS = 'E'
    Its giving invalid table
    Need your suggestions
    Thanks
    Baji

    Hi
    Thanks alot for your information .But when ever i click on "Refresh" button available in refrshing tab.I am able to see following error in operator
    Execution
    java.sql.SQLException: ORA-00900: invalid SQL statement
    Description
    BeanShell script error: Sourced file: inline evaluation of: ``out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ; out.print(odiR . . . '' : Error in method invocation: Method getSession() not found in class'com.sunopsis.dwg.snpreference.b' : at Line: 2 : in file: inline evaluation of: ``out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ; out.print(odiR . . . '' : odiRef .getSession ( )
    BSF info: Filter_Records at line: 0 column: columnNo
    out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ;
    out.print(odiRef.getSession()) ;
    out.print(" \n\n\n\n\n\n") ;
    ****** ORIGINAL TEXT ******
    select USER_NAME from SNP_SESSION where SESS_NO = <%=odiRef.getSession()%>
    Thanks
    Baji

  • Error with a variable variable

    Hi people!
    First of all, sorry for my bad english ;-)
    I have a vert rare problem. I'm implementing a shellscript to sync svn dirs that are out of actual revision. This script checks automatically which dirs are candidates and into a for iteration he's going building the final svnsync command. This part works ok, but when the recently created command becomes executed he doesn't do any thing. Here is the part of the code that do this task:
                    command=""
                    c=1
                    for i in $optionP;do
                            SVN_SYNC_CMD="svnsync sync http://server/$i $CREDS --no-auth-cache --non-interactive >> $ERROR_SYNC 2>&1"
                            SVN_SYNC_FORMAT="echo \"###### i$ ########\" >> $ERROR_SYNC"
                            command="${command} $SVN_SYNC_FORMAT && $SVN_SYNC_CMD"
                            if [ "$c" != "$CONT" ]; then
                                    command="${command} &&"
                                    c=$(expr $c + 1)
                            else
                                    command="${command} &"
                            fi
                    done
                    $command
                    echo "Final Command ========== >>>$command"
                    $DIALOG --title 'Sincro...' --tailbox $ERROR_SYNC 50 95
    The last echo "Final Command ======>>> $command" shows me the correct command, like this: echo "#################################TestDir#################################" >> /var/tmp/errorSync && svnsync sync http://server/TestDir  --username=user --password=anything --no-auth-cache --non-interactive >> /var/tmp/errorSync 2>&1 && echo "#################################TestDir1#################################" >> /var/tmp/errorSync && svnsync sync http://server/TestDir1 --username=user --password=anything --no-auth-cache --non-interactive >> /var/tmp/errorSync 2>&1 &
    If I execute this command directly from the shell works ok, but when this command is executed from the script it crashes and the script seems to do the first echo, with a output like this "#################################TestDir#################################" >> /var/tmp/errorSync && svnsync sync http://server/TestDir  --username=user --password=anything --no-auth-cache --non-interactive >> /var/tmp/errorSync 2>&1 && echo "#################################TestDir1#################################" >> /var/tmp/errorSync && svnsync sync http://server/TestDir1 --username=user --password=anything --no-auth-cache --non-interactive >> /var/tmp/errorSync 2>&1 &      instead to continue with the next command...
    Anybody knows what can I do?
    Thanks in advance!

    I'm a big fool!
    I've tried to do with eval many times before writing this post, but I tried with other combinations of eval and obviously did not work ... I was so dazed with this stupid problem that it occurred to me that ...
    Thank you very much Procyon
    PD: I Love google translator jajajaja

  • Analysis Service Execute DDL Task throwing error with SourceType Variable

    Hi,
    I have Configuring Analysis Services Execute DDL Task to use Variable and Process Data(xmla Script) like below:
    When I execute this task I get the below error message:
    [Analysis Services Execute DDL Task] Error: The -->
    text node at line 23, column 3 cannot appear inside the DataSource element (namespace http://schemas.microsoft.com/analysisservices/2003/engine) under Envelope/Body/Execute/Command/Batch/Parallel/Process. This element can
    only have text nodes containing white-space characters.
    Can anyone please let me know how to resolve this.

    If I run using the sourceType "Direct Input", the Analysis Execute DDL Task runs fine, but if I use the sourcetype as variable its throws the error. And below is the xmla script
    Here is my Package look and the xmla script; its failing at "ProcessAdd" Analysis Execute DDL task:
    "SELECT '<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ErrorConfiguration xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
    <KeyNotFound>IgnoreError</KeyNotFound>
    </ErrorConfiguration>
    <Parallel>
    <Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\">
    <Object>
    <DatabaseID>IIS_Version2</DatabaseID>
    <DimensionID>Application</DimensionID>
    </Object>
    <Type>ProcessAdd</Type>
    <DataSource xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" xsi:type=\"RelationalDataSource\" dwd:design-time-name=\"1a3cb292-9bce-4c59-a182-177d6b3506ff\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ID>IISDW</ID>
    <Name>IISDW</Name>
    <ConnectionString>Provider=SQLNCLI11.1;Data Source=CO1MSFTSQLHKT02;Integrated Security=SSPI;Initial Catalog=IISDW</ConnectionString>
    <Timeout>PT0S</Timeout>-->
    </DataSource>
    <DataSourceView xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ddl2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2\" xmlns:ddl2_2=\"http://schemas.microsoft.com/analysisservices/2003/engine/2/2\" xmlns:ddl100_100=\"http://schemas.microsoft.com/analysisservices/2008/engine/100/100\" xmlns:ddl200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200\" xmlns:ddl200_200=\"http://schemas.microsoft.com/analysisservices/2010/engine/200/200\" xmlns:ddl300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300\" xmlns:ddl300_300=\"http://schemas.microsoft.com/analysisservices/2011/engine/300/300\" xmlns:ddl400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400\" xmlns:ddl400_400=\"http://schemas.microsoft.com/analysisservices/2012/engine/400/400\" xmlns:dwd=\"http://schemas.microsoft.com/DataWarehouse/Designer/1.0\" dwd:design-time-name=\"b0b61205-c64d-4e34-afae-6d4d48b93fb3\" xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">
    <ID>IISDW</ID>
    <Name>IISDW</Name>
    <DataSourceID>IISDW</DataSourceID>
    <Schema>
    <xs:schema id=\"IISDW_x0020_1\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:msprop=\"urn:schemas-microsoft-com:xml-msprop\">
    <xs:element name=\"IISDW_x0020_1\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\" msprop:design-time-name=\"72037318-e316-469d-9a45-a10c77709b39\">
    <xs:complexType>
    <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">
    <xs:element name=\"Application\" msprop:design-time-name=\"7f579e7e-e8b7-4a9d-8a93-a255fccbbfbe\" msprop:IsLogical=\"True\" msprop:FriendlyName=\"Application\" msprop:DbTableName=\"Application\" msprop:TableType=\"View\" msprop:Description=\"\" msprop:QueryDefinition=\"SELECT a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS [Timestamp], a.ServerName, CAST(a.ServerName AS char(3)) AS DataCenter, a.CS_URI_Stem, CAST(HashBytes(''MD5'', &#xD;&#xA; a.Application + a.ServerName + a.CS_URI_Stem + CAST(DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0) AS varchar(24))) AS uniqueidentifier) AS Server_URI_Identity&#xD;&#xA;FROM IIS_6_OLD AS a LEFT OUTER JOIN&#xD;&#xA; Dimension_Pointer AS b ON a.Application = b.Application&#xD;&#xA;WHERE (b.ProcessedFlag = 0) AND (a.Application IN ("+(DT_WSTR,100) @[User::strDistinctApplication]+"))&#xD;&#xA;GROUP BY a.Application, DATEADD([hour], DATEDIFF([hour], 0, a.[Timestamp]), 0), a.ServerName, a.CS_URI_Stem\" msprop:QueryBuilder=\"SpecificQueryBuilder\">
    <xs:complexType>
    <xs:sequence>
    <xs:element name=\"Application\" msprop:design-time-name=\"f3074e98-4a82-4bc5-a818-916203f7758b\" msprop:DbColumnName=\"Application\" msprop:FriendlyName=\"Application\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"255\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"Timestamp\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"2662e3a8-8b1a-4d77-aecb-575329b84dc1\" msprop:DbColumnName=\"Timestamp\" msprop:FriendlyName=\"Timestamp\" type=\"xs:dateTime\" />
    <xs:element name=\"ServerName\" msprop:design-time-name=\"ced26d49-cd6e-4073-a40c-ff5ef70e4ef1\" msprop:DbColumnName=\"ServerName\" msprop:FriendlyName=\"ServerName\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"255\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"DataCenter\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"4583e15a-dcf1-45a2-a30b-bd142ca8b778\" msprop:DbColumnName=\"DataCenter\" msprop:FriendlyName=\"DataCenter\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"3\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"CS_URI_Stem\" msprop:design-time-name=\"10db5a79-8d50-49d2-9376-a3b4d19864b9\" msprop:DbColumnName=\"CS_URI_Stem\" msprop:FriendlyName=\"CS_URI_Stem\" minOccurs=\"0\">
    <xs:simpleType>
    <xs:restriction base=\"xs:string\">
    <xs:maxLength value=\"4000\" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name=\"Server_URI_Identity\" msdata:DataType=\"System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" msdata:ReadOnly=\"true\" msprop:design-time-name=\"018ede0a-e15e-47c2-851b-f4431e8c839c\" msprop:DbColumnName=\"Server_URI_Identity\" msprop:FriendlyName=\"Server_URI_Identity\" type=\"xs:string\" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    <xs:unique name=\"Constraint1\" msprop:IsLogical=\"True\" msdata:PrimaryKey=\"true\">
    <xs:selector xpath=\".//Application\" />
    <xs:field xpath=\"Server_URI_Identity\" />
    <xs:field xpath=\"Timestamp\" />
    </xs:unique>
    </xs:element>
    </xs:schema>
    <IISDW_x0020_1 xmlns=\"\" />
    </Schema>
    </DataSourceView>
    <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
    </Process>
    </Parallel>
    </Batch>' as XMLAScript_ProcessData"

  • Applet error with changing variable data after several runs....

    Can anyone give some advice on the following:
    I have a java card program running on a gsm sim:
    The program makes use of member variables which
    contain data that is reused and rewritten all the time.
    The member variables are all declared as (for example)
    private byte[] myVariable = {(byte) ' ',(byte) ' '};
    And the values stored in the variables are changed
    everytime the program gets an event. This works fine
    for about 15 - 35 times and then suddenly the program
    can't execute any code that accesses these variables (the
    other parts that simply display a message or the menu and that
    never change their variable's value have no problem running on).
    Does anyone know a specific reason for this ? Should I rather
    use my own EF entries on the SIM to keep data ? Is there any
    specific rules around using variables and reusing them ?
    The only fix (once this occurs) seems to be to reload the applet
    onto the card...resetting the phone etc. does not change this
    behaviour....
    Any help would be much appreciated...

    I don't think that your problem lies in your private member variable.
    From my point of view it is more likely that you some kind of memory allocation problem somewhere.
    Anyway it is always a good idea to post a minimal applet which reproduces the erroneous behaviour.

  • Errors with getInstanceVariables() method

    When trying to use the getInstanceVariables() method in a JSP, it doesn´t recognize
    the sintaxis used which is like the example used on the BEA manuals:
    List list = admin.getInstanceVariables(task.getInstanceId());
    The problem is as follows: when trying to access the page that contains the list
    of tasks, once the user is logged on, the following error appears:
    Compilation of 'C:\bea\wli21\config\wlidomain\applications\.wlnotdelete\WEB-INF\_tmp_war_myserver_myserver_ApCuentaB13c\jsp_servlet\__worklist.java'
    failed:
    C:\bea\wli21\config\wlidomain\applications\.wlnotdelete\WEB-INF\_tmp_war_myserver_myserver_ApCuentaB13c\jsp_servlet\__worklist.java:510:
    cannot resolve symbol
    probably occurred due to an error in /worklist.jsp line 453:
    List list = admin.getInstanceVariables(task.getInstanceId());
    Full compiler error(s):
    C:\bea\wli21\config\wlidomain\applications\.wlnotdelete\WEB-INF\_tmp_war_myserver_myserver_ApCuentaB13c\jsp_servlet\__worklist.java:510:
    cannot resolve symbol
    symbol : variable admin
    location: class jsp_servlet.__worklist
    List list = admin.getInstanceVariables(task.getInstanceId());
    //[ /worklist.jsp; Line: 453]
    We think it's not using the admin as a nexus with the EJBObject. We feel it's
    necessary to emphasize that we are invocating:
         com.bea.wlpi.server.admin.Admin

    The first error is on line 17
    public void readPlayers( fin, teamArray)When declaring a method, you have to indicate the types of the parameters, e.g., public void readPlayers(Scanner fin, Player[] teamArray) {Further, you may NEVER define a method within another method.
    the second error is on line 53
    else (type.equals("Hockey"))type.equals("...") is only for testing equality. It returns a boolean value of true or false. There are two possible solutions here:
    else if (type.equals("Hockey")) //to test if variable "type" is set to the value "Hockey"
    or
    else (type="Hockey") //to force the variable "type" to represent the string "Hockey"
    Which to use depends on what you want to accomplish.

  • Object variable or With block variable not set (Error 91)

    I am not a developer, however i have to help to run a VB program.
    when using a local administrator to run this program there will be error :
    Object variable or With block variable not set (Error 91)
    however using a DOMAIN Administrator to run without problem.
    any idea

    Do you have the source code? The error itself is a nullreference error. It means the code is trying to use some object to access a property of method of that object, but the object is currently null so it fails. The fact that it runs different when you run
    as a domain admin versus local admin could mean that it does something via a network location or resource, and when running as a domain admin, it has access to that resource and succeeds, but the local admin doesn't have access to the needed resource, and
    the code doesn't check to see if the object is null before using it. If you don't have the source code, then it will be difficult to fix, other than giving the local admin the ability to access whatever it is the program is looking to access.
    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com

  • Error in BatchLoad process - Object variable or with block variable not set

    Hi All,
    We are working on FDM version 11.1.1.3 with Essbase as a target system.
    To automate the data load process, we are loading the batch loader feature.
    I have taken the backload script from admin guide and it is working fine in our test environment.
    When, I am trying to use the same script in our QA environment, we are getting the below error message-
    Error: An error occurred running the script:
    *91 - Object variable or with block variable not set*
    At Line: 24
    QA environment has same version as Test environment (11.1.1.3). In QA, it the same script which I am using in Test environment.
    Please help us on this issue. Any help will be highly appreciated.
    Thanks & Regards,
    Mohit Jain

    Hi,
    As suggested by you, I have placed the code given by you and now my scripts looks like-
    'Declare Local Variables
    Dim lngProcessLevel
    Dim strDelimiter
    Dim blnAutoMapCorrect
    Dim BATCHENG
    Set BATCHENG = CreateObject("upsWBatchLoaderDM.clsBatchLoader")
    BATCHENG.mInitialize API, SCRIPTENG
    'Initialize Variables
    lngProcessLevel = 12 'Up-To-Check
    strDelimiter = "~"
    blnAutoMapCorrect = 0
    'Create the file collection
    Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter))
    'Execute a Standard Serial batch
    BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)
    But still, I am getting the same error.
    Have I placed the your given code at wrong place? please help me on this.
    Thanks a lot for your help!!
    Thanks & Regards,
    Mohit

Maybe you are looking for

  • Boot Camp and Windows on a Separate Drive

    OK - so I have been a MacEvangelist for 20 years and have avoided Windows and have refused to even acknowledge its existence on principle. Consequently, I have had no experience of Boot Camp or any of the other Windows solutions. Sadly, I now need to

  • Trying to get movies off of Sony XR500 video cam

    I have a Sony XR500 video cam and i'm trying to download it from the camera to iMovie HD. But when I iMovie keeps defaulting to iSight which leads me to believe that it doesn't recognize the camera. Please help! Thanks.

  • Process completed successfully but status changes  to red

    hi in my process chain all the processes of the master data load local chain completed succesfully but the status changes to red and the chain is not processding further.  wh t may be the reason for this. do any one have idea about this

  • Anyone else notice the icons bug in iOS 5.0.1?

    Hi, I can't find anything about a bug in the new iOS 5.0.1 for the home screen icons and hoping to hear back on some workaround or new function(s)... I have a iPhone 4, CDMA. It's happens when I want to arrange my icons on home screens. So I hold dow

  • Formula to calculate mean Quality Score

    Hello! What is the formula to calculate mean quality score? Regards, VM