Unexpected type  required: variable   found   : value

Hello, these are my errors:
PWC6197: An error occurred at line: 43 in the jsp file: /jsp/ListRedirect.jsp
PWC6199: Generated servlet error:
string:///ListRedirect_jsp.java:96: unexpected type
required: variable
found : value
PWC6197: An error occurred at line: 43 in the jsp file: /jsp/ListRedirect.jsp
PWC6199: Generated servlet error:
string:///ListRedirect_jsp.java:96: incomparable types: java.lang.String and int
==================================
any suggestions??
<%      
if (listData.getListURL()= null || listData.getListInfo() == 0)
          String baseUrl = "/content/listings.html?";
         String listUrl = null;
              if (userData.isAgentType()) {
                listUrl = parentPage + baseUrl + "ag_id=" + userData.getAgentID();
              }  if (userData.isBrokerType()) {
              listUrl = parentPage + baseUrl + "br_id=" + userData.getAdverID();
              }  if (userData.isOfficeType()) {
              listUrl = parentPage + baseUrl + "ag_id="= + userData.getAdverID();
              } else {
              listUrl = parentPage + "/content/homefinder.html";
               if (listData.getListURL() && listData.getListInfo() == 1) {
                   listUrl = listData.getListURL();
           else {
                listUrl = parentPage + "/content/homefinder.html";
%>     

mimsc wrote:
if (listData.getListURL()= null || listData.getListInfo() == 0)
The 1st part of this if statement is incorrectly an assignment, not a equation.
Further on, this code belongs in Java classes like servlets, not in JSPs. This would not only introduce clean code separation, but also greatly improve debugging and maintenance.

Similar Messages

  • Incompatible types required boolean found string

    I am trying to set a value for a variable called Location when ever the value for the location is "AFRICA"
    I need to reset it to be "55555".
    What I am getting is that 'Incompatible types required boolean found string' under the if statemant. Can anyone shade some light on this?
    String Location = filename.substring(12,17);
    String AP = "AFRICA";
    System.out.println(Location);
    if (Location = AP)
    System.out.println(Location);
    Location = "55555";
    thanks

    rp0428 wrote:
    The IF condition needs to be a BOOLEAN. The '=' is used to do an assignment. The boolean would be '=='.
    But to compare strings why aren't you using
    if (Location.equalsIgnoreCase(AP) {
    To stress this a little more:
    <tt>==</tt> applied between References will compare the Adresses they point to. This means this will only be true if both References point to the identical Object. @Test
    testStringEquality(){
       String s1 = "my Test"
       String s2 = "Test"
      Assert.assertTrue("This strings are equal",s1.equals("my "+s2));
      Assert.assertFalse("This strings are not identical",s1 == ("my "+s2));
    }So use <tt>==</tt> only for primitive number types (those starting with a lower case letter).
    bye
    TPD

  • Unexpected type

    Why does the following code error?
    MyMenuInt.java
    import java.awt.*;
    import javax.swing.*;
    public class MyMenuInt extends JFrame
         private static JTextArea jta=new JTextArea(20,15);
         private Integer count=0;
         public MyMenuInt()
              JPanel jp=new JPanel();
              JMenuBar jmb=new JMenuBar();
              JMenu Count=new JMenu("Count");
              JMenuItem inc=new JMenuItem("Inc");
              JMenuItem dec=new JMenuItem("Dec");
              JMenuItem reset=new JMenuItem("Reset");
              JMenuItem exit=new JMenuItem("Exit");
              jp.setLayout(new BorderLayout());
              jta.setText(String.valueOf(count+"\n"));
              jta.setEditable(false);
              JScrollPane jsp=new JScrollPane(jta);
              jp.add(jsp,BorderLayout.CENTER);
              add(jp);
              Count.add(inc);
              Count.add(dec);
              Count.add(reset);
              Count.add(exit);
              jmb.add(Count);
              MyCountListenerInt incl=new MyCountListenerInt(inc,count);
              MyCountListenerInt decl=new MyCountListenerInt(dec,count);
              MyCountListenerInt resetl=new MyCountListenerInt(reset,count);
              MyCountListenerInt exitl=new MyCountListenerInt(exit,count);
              setJMenuBar(jmb);
              Count.setMnemonic('C');
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setTitle("Practice Exercise Day 17");
              setSize(333,741);
              setVisible(true);
         public static void appendTextArea(String txt)
              jta.append(txt+"\n");
         public static void resetTextArea()
              jta.setText(String.valueOf(0+"\n"));
         public static void main(String args[])
              MyMenuInt mm=new MyMenuInt();
    MyCountListenerInt.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MyCountListenerInt implements ActionListener
         private static Integer num;
         //Make num static so that all the instances of this class share one reference of count
         //instead of each instance having its own reference which causes unsync'd output.
         //Since this variable is static, when Java does its optimizations and gets to the 2nd, 3rd, etc
         //instantiations of this class it sees that this variable is already in memory with a reference
         //to count so it uses the existing variable in memory instead of creating another reference.
         private JMenuItem jmi1;
         public MyCountListenerInt(JMenuItem jmi,Integer count)
              num=count;
              jmi1=jmi;
              jmi1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              if(ae.getActionCommand().equals("Inc"))
                   MyMenuInt.appendTextArea(String.valueOf(num+1));
                   num+=1;
              if(ae.getActionCommand().equals("Dec"))
                   MyMenuInt.appendTextArea(String.valueOf(num-1));
                   num-=1;
              if(ae.getActionCommand().equals("Reset"))
                   num=0;
                   MyMenuInt.resetTextArea();
              if(ae.getActionCommand().equals("Exit"))
                   System.exit(0);
    }the error:
    MyMenuInt.java:43: unexpected type
    required: variable
    found   : value
              jta.append(txt+"\n");
                        ^
    1 errorthis is from:
    public static void appendTextArea(String txt)
              jta.append(txt+"\n");
         }thanks! :)

    kajbj wrote:
    John_Musbach wrote:
    Thanks for the replies, the dashes are really in my code to make it beautiful. My friend said it would work.It doesn't, unless you comment them out. E.g this works:
    Oh oops, I totally forgot. Thanks for the reminder! :)

  • Reason: Error in sieve filter: Unknown function/variable found: church around input line 79 [ stop; } require " f^ileinto"; if header ]

    My wife's email has been getting filled with hundereds of emails with this in them this morning. I don't see where anyone else is having this problem today, but I wanted to see if it's on iCloud's end or ours.
    Processing errors occurred during delivery:
    Recipient address: [email protected]
    Reason: Error in sieve filter: Unknown function/variable found: church around input line 79 [ stop; } require " f^ileinto"; if header ]
    Delivery processing continued in spite of these errors.
    Reporting-MTA: dns;ms21034.mac.com (tcp_intranet-daemon)
    Arrival-date: Tue, 13 Mar 2012 07:33:18 +0000 (GMT)

    My Wife and I both have an Ipad and an iPhone, I use an iMac and my wife a MacBook Pro.
    I have this problem with all my devices.
    My wife has NOT got this problem.
    We both use a [email protected] email acount.
    Just compared the settings:
    For "Incoming server" I have p03-imap.mail.me.com
    My Wife has p02-imap.mail.me.com .... and has not got this problem.
    I have setup a new rule for incoming mails (for the meantime):
    move all incoming emails from [email protected] to trash and delete it.
    Works fine for now,......until APPLE deals with the problem.
    Message was edited by: RTONLINE

  • A newer version of data type BBP_PDS_HSS_IC was found than one required

    Hi,
    When I create a SC, it is automatically approved but the PO is not created.
    If I check TRX SM58 I get the message:
    "A newer version of data type BBP_PDS_HSS_IC was found than one required"
    Any ideas?
    Carlos Durazo

    Hi
    Which SRM version are you using ?
    By an chance have you created any new fields in the standard structure
    <b>'BBP_PDS_HSS_IC'</b> using <u>SE11</u> Transaction in SRM system. Please confirm the same by taking help of ABAP person here. Seems to be like the structure is not Activated completed. 
    <u>Related SAP OSS Notes -></u>
    Note 758067 - SRM 4.0: Change documents of new sets (DynAttr, Weight)
    Note 820201 - Document changes for attachments does not work
    Hinweis 691880 - Changes in tolerances not displayed in purchase order
    Note 1018714 - Change documents: Time stamp of the application server
    Note 1006898 - Deleted vendor not displayed in Change hist of Shopping cart
    Do let me know.
    Regards
    - Atul

  • Requirement type, alternative calculation type and alternative base value?

    Hi guys pls can any body experts in pricing
    Can u pls explain requirement type, alternative calculation type and alternative base value?
    Not theory Any of Ur real time experience………

    <b>Requirement:</b>
    It is a routine that is written by an ABAP consultant according to the business requirement.
    By defining Requirement in condition technique we can restrict the access of condition type.
    To understand the concept, we will take the example of the Rebates. Rebates are to be included during the billing document processing and not in the sales document processing. As rebates are given on the delivered quantity and not on the ordered quantity (in case of cut-off period for rebates).
    For rebates we use the condition types BO01 to BO05, and in the Requirement column we give the value 24 which is "Only in Billing Document".
    This Requirement will ensure that these condition types will appear only during the billing document processing.
    If new Requirements are to be defined we follow the procedure given below.
    Go to T.Code: VOFM. - Maintain Requirements & Formulas
    Click on the "Requirements" in the top menu and then click on "pricing".
    We have a list of requirements, we can ask ABAP consultant to create new requirement based on the client requests.
    And we assign the application type like V - Sales/Distribution etc.
    <b>AltCty - Condition formula for alternative calculation type:</b>
    It is again a Routine that is written by ABAP Consultant.
    It is an alternative formula for the condition type that can be used instead of standard formulas.
    For example, let us take the Profit Margin which can be both + / - , so here this routine will help us in generating the value which can be either + or -. Profit margin is not a condition type so it cannot be classified as +ve or -ve in the V/06.
    Ex.: 950 0 Profit Margin 11.
    So we assign 11 - Profit Margin.
    If new routines are to be defined we follow the procedure given below.
    Go to T.Code: VOFM. - Maintain Requirements & Formulas
    Click on the "Formulas" and then on the "Condition Values".
    We have a list of routines, we can ask ABAP consultant to create new routines based on the client requests.
    And we assign the application type.
    <b>AltCBV - Alternative formula for condition base value:</b>
    Formula for determining the condition basis as an alternative to the standard.
    It is again a Routine that is written by ABAP Consultant.
    It is used as a basis to calculate value of the condition type instead of using it from the "FROM" column.
    Ex.: Freight - KF00.
    Freight is calculated based on weight, volume etc. and not on the base price. In pricing there is no entry of weight from which the value can be referred like we do for discounts using base price. We have to get the value from the Material master.
    In this column we can mention the value as 12 - Gross Weight or 13 - Net Weight.
    During pricing, the system will consider the value that is mentioned in this column and determine the freight based on this value.
    Suppose we have Net weight: 100 kgs and Gross Weight: 150 kgs. And if we mention 13 in this column then the Freight condition KF00 will be calculated using the weight as 100 kgs.
    Regards
    AK

  • Value "JCO CALLS" for variable "E2E Metric Type Variable(multiple values)"

    Hello Experts, 
    Workload analysis for java components doesnot show any data.
    more over get "JCO CALLS" for variable "E2E Metric Type Variable(multiple values)"  error.
    my setup wizard completed without any error.
    Any suggestions ?
    Thanks & Regards
    Sankar

    Hi Sankar,
    have a look at my post in no data for Jco in E2E thread.
    Hope this helps.
    Regards,
    Shyam

  • Error in OAF page (Definition CLOSE_PO_FLAG of type Attribute not found)

    Hi All,
    In OAF, When we go to receive a requisition order, on that page for a column called PO Close, below this column in the value text, I am getting the below error:
    Error
    You have encountered an unexpected error. Please contact the System Administrator for assistance.
    Click here for exception details.
    About Previous Page
    When I click the here for exception details. I see the below error. What is this error. Any idea.
    =============
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition CLOSE_PO_FLAG of type Attribute not found
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2946)
         at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2743)
         at oa_html._OA._jspService(_OA.java:101)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
         at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
         at oa_html._OA._jspService(_OA.java:94)
    ===========
    Help greatly appreciated.
    Thanks
    Aman

    Hi JulianE.
    Looks good. But strange .Please bounce the middletier once and set the permissions of this file to 7777
    Thanks
    Sandeep

  • Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.

    Hi All,
    I am trying to add a new task to a Tasks list called CATasks. The list was created via Visual Studio “Add > New Item > List” process and not by custom code. The code I am using to add a task is shown below.
    What I have noticed is if I use my code to add a Task to a Task List created by Visual studio “Add > New Item > List” process, I get an error. Error message when adding an item:
    Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
    But if I create the same list using custom code I don't get an error.
    Am I missing something in my custom code or is this a bug?
    I hope you can help.
    CEStar
    App.js Code:
    function createItem() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/?$select=Title,CurrentUser/Id&$expand=CurrentUser/Id",
    type: "GET",
    dataType: "json",
    headers: {
    Accept: "application/json;odata=verbose"
    call.done(function (data, textStatus, jqXHR) {
    var userId = data.d.CurrentUser.Id;
    addItem(userId);
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function addItem(userId) {
    var due =
    new Date();
    due.setDate(due.getDate() + 7);
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/getByTitle('CATasks')/Items",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.Data.CATasksListItem" },
    Title: "Sample Task",
    AssignedToId: userId,
    DueDate: due
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var div = jQuery("#message");
    div.text("Item added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function failHandler(jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    Create List Custom Code:
    function createList() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.List" },
    BaseTemplate: SP.ListTemplateType.tasks,
    Title: "CATasks"
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var message = jQuery("#message");
    message.text("List added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thanks 
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Condition on CKF (based on replacement type formula Variable) not working

    Hello Friends,
    We have a reporting requirement where in we want to find out vendors who are being paid with the multiple currancies.For this I have created a replacemnent path formula variable with reference to currancy and created a CKF with the help of this variable.
    Now as I want to display only multiple currancies I want a condition to display value > 1 on this CKF but
    this condition is not working as the replacement path variable contains value 1 for every currancy passed to it although it shows in the report for 2 currancies value as 2.
    Can anyone guide us in this matter?
    Thanks,
    Suyog.

    Friends found the Solution so closing this thread....:)

  • Invalid method declaration; return type required

    The code:
              public Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
    public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
        }Gives:
    "invalid method declaration; return type required"
    If i add void to public Reminder(int seconds) {It prints:
    cannot find symbol
    symbol : class Reminder
    location: class superball
    new Reminder(5);
    Is it because of the public class?
    public class superball extends JFrameHere is the FULL code:
    /*                      superball                                 */
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.regex.Pattern;
    import java.util.Timer;
    import java.util.TimerTask;
    import java.util.*;
    import java.io.*;
    * Summary description for superball
    public class superball extends JFrame
         // Variables declaration
         int ballx;
      int bally;
         int jumpstop;
         int stopper;
         int coin;
         int coinx;
         int coiny;
         int coinvaluex;
         int coinvaluey;
      Timer timer;
      private int value = 0;
         private static Random r = new Random();
         private JLabel jLabel1;
         private JLabel jLabel2;
         private JLabel jLabel4;
         private JLabel jLabel5;
         private JLabel jLabel7;
         private JLabel jLabel9;
         private JLabel jLabel10;
         private JPanel contentPane;
         private JPanel jPanel1;
         // End of variables declaration
         public superball()
              super();
              initializeComponent();
              // TODO: Add any constructor code after initializeComponent call
              this.setVisible(true);
          * This method is called from within the constructor to initialize the form.
          * WARNING: Do NOT modify this code. The content of this method is always regenerated
          * by the Windows Form Designer. Otherwise, retrieving design might not work properly.
          * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
          * to retrieve your design properly in future, before revising this method.
         private void initializeComponent()
              jLabel1 = new JLabel();
              jLabel2 = new JLabel();
              jLabel4 = new JLabel();
              jLabel5 = new JLabel();
              jLabel7 = new JLabel();
              jLabel9 = new JLabel();
              jLabel10 = new JLabel();
              coin = 1;
              coinx = Math.abs(r.nextInt()) % 460 + 100;
              coiny = Math.abs(r.nextInt()) % 200 + 100;
              ballx = 342;
              bally = 338;
              jumpstop = 0;
              stopper = 13;
              contentPane = (JPanel)this.getContentPane();
              jPanel1 = new JPanel();
              // jLabel1
              jLabel1.setIcon(new ImageIcon("IMG\\coin.gif"));
              jLabel1.setText("0");
              // jLabel2
              jLabel2.setIcon(new ImageIcon("IMG\\logo.PNG"));
              // jLabel4
              jLabel4.setIcon(new ImageIcon("IMG\\black.GIF"));
              // jLabel5
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
              // jLabel7
              jLabel7.setIcon(new ImageIcon("IMG\\star-heart.gif"));
              jLabel7.setText(" 100");
              // jLabel9
              jLabel9.setIcon(new ImageIcon("IMG\\coin.gif"));
              // jLabel10
              jLabel10.setIcon(new ImageIcon("IMG\\stage1.GIF"));
              // contentPane
              contentPane.setLayout(null);
              contentPane.setBackground(new Color(255, 254, 254));
              addComponent(contentPane, jLabel5, 342,338,60,18);
              addComponent(contentPane, jLabel1, 561,4,100,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel7, 495,4,60,18);
              addComponent(contentPane, jLabel9, coinx,coiny,19,18);
              addComponent(contentPane, jLabel2, 2,3,208,24);
              addComponent(contentPane, jLabel10, -2,29,738,412);
              addComponent(contentPane, jPanel1, 79,209,200,100);
              // jPanel1
              jPanel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
              jPanel1.setFocusable(true);
              jPanel1.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e)
                        jPanel1_keyPressed(e);
                   public void keyReleased(KeyEvent e)
                        jPanel1_keyReleased(e);
                   public void keyTyped(KeyEvent e)
                        jPanel1_keyTyped(e);
              // superball
              this.setTitle("Superball created by Hannes Karlsson");
              this.setLocation(new Point(0, 0));
              this.setSize(new Dimension(617, 450));
              this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              this.setResizable(false);
         /** Add Component Without a Layout Manager (Absolute Positioning) */
         private void addComponent(Container container,Component c,int x,int y,int width,int height)
              c.setBounds(x,y,width,height);
              container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jPanel1_keyPressed(KeyEvent e)
              System.out.println("\njPanel1_keyPressed(KeyEvent e) called.");
              // TODO: Add any handling code here
              if(e.getKeyCode()==e.VK_LEFT) // when the user enters left
                  jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                            if(e.getKeyCode()==e.VK_RIGHT) // when the user enters right
                  jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED
                                                                if(e.getKeyCode()==e.VK_UP) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setIcon(new ImageIcon("IMG\\balljetpack.gif"));
                        } // equalling PLAIN_SPEED
                                                                                    if(e.getKeyCode()==e.VK_DOWN) // when the user enters up
                  jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setIcon(new ImageIcon("IMG\\ballroll.gif"));
                        } // equalling PLAIN_SPEED     
                        if(bally>=340)
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                  System.out.println("LOW!!!");
                        if(bally<=-2)
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                        jLabel5.setLocation(new Point(ballx, bally++));
                                  System.out.println("HIGH!!!");
                                            if(ballx>=594)
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                        jLabel5.setLocation(new Point(ballx--, bally));
                                  System.out.println("RIGHT!!!");
                                                                if(ballx<=-3)
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                        jLabel5.setLocation(new Point(ballx++, bally));
                                  System.out.println("LEFT!!!");
                                                                           if (bally==294 && (ballx > 218 && ballx < 274))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                                           if (bally==262 && (ballx > 246 && ballx < 306))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                                       if (bally==230 && (ballx > 486 && ballx < 562))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                                        if (bally==310 && (ballx > 486 && ballx < 594))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                         if (bally==262 && (ballx > 442 && ballx < 514))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
          if (bally==294 && (ballx > 378 && ballx < 466))
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                        jLabel5.setLocation(new Point(ballx, bally--));
                   // COIN
                         if ((bally > coiny-10 && bally < coiny+10) && (ballx > coinx-10 && ballx < coinx+10))
                coinx = Math.abs(r.nextInt()) % 617 + 1;
                coiny = Math.abs(r.nextInt()) % 300 + 1;
                   jLabel9.setLocation(new Point(coinx, coiny));
                        System.out.println("Coinx:"+coinx+"");
                        System.out.println("Coiny:"+coiny+"");
                        jLabel1.setText(""+ coin++ +"");
                        System.out.println("Ballx:"+ballx+"");
                        System.out.println("Bally:"+bally+"");
         private void jPanel1_keyReleased(KeyEvent e)
              System.out.println("\njPanel1_keyReleased(KeyEvent e) called.");
              // TODO: Add any handling code here
              jLabel5.setIcon(new ImageIcon("IMG\\ballstanding2.gif"));
         private void jPanel1_keyTyped(KeyEvent e)
              System.out.println("\njPanel1_keyTyped(KeyEvent e) called.");
              // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
    //============================= Testing ================================//
    //=                                                                    =//
    //= The following main method is just for testing this class you built.=//
    //= After testing,you may simply delete it.                            =//
    //======================================================================//
              public void Reminder(int seconds) {
            timer = new Timer();
            timer.schedule(new RemindTask(), seconds*1000);
        class RemindTask extends TimerTask {
            public void run() {
                System.out.format("Time's up!%n");
                timer.cancel(); //Terminate the timer thread
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
           new superball();
                    new Reminder(5);
            System.out.format("Task scheduled.%n");
    //= End of Testing =
    }

    No, it's because you can't have a constructor called Reminder if you don't have a class named Reminder.

  • Compiler throws "unexpected type" error

    Hi,
    I am newbie to Generics, I wrote the below program as part of my learning exercise:
    =================
    class One<T> implements Comparable<? extends One<T>>
         T var;
         public void setVal(T val){
              var=val;
         public T getVal(){
              return this.var;
         public int compareTo(One<T> o1){
              if(this.getVal().equals(o1.getVal())){
    return 0;
    }else {
    return 1;
    class Two<T> extends One<T>
         public int compareTo(Two o1){
              // do nothing
              return 0;
    class GenTest
         public static void main(String[] args)
              One<String> obj_01=new One<String>();
              obj_01.setVal("Vinayaka");
              One<String> obj_02=new One<String>();
              obj_02.setVal("Vinayaka");
    =========
    Compilation fails with the below error:
    javac GenTest.java
    GenTest.java:1: unexpected type
    found : ? extends One<T>
    required: class or interface without bounds
    class One<T> implements Comparable<? extends One<T>>
    ^
    1 error
    Can any one please explain me what is wrong with this program ?

    You are mixing syntaxes. Your definition should be:
    class One<T> implements Comparable<One>(PS: please use code tags when posting code)

  • Passing variable having value as whole SOAP request to command while invoking ODI WS call

    When passing variable in place of soap request message (variable value is whole SOAP request message prepared using procedure) in ODI Invoke WebService command like -->
    OdiInvokeWebService "-URL=url...." "-PORT_TYPE=..." "-OPERATION=..." "-RESPONSE_MODE=NEW_FILE" "-RESPONSE_FILE_CHARSET=UTF8" "-RESPONSE_XML_ENCODING=UTF-8" "-RESPONSE_FILE=..." "-RESPONSE_FILE_FORMAT=SOAP" "-HTTP_USER=..." "-HTTP_PASS=..."
    #SOAPREQUESTMESSAGE
    Gives error :
    ODI-1226: Step OdiInvokeWebService 1 fails after 1 attempt(s).
    ODI-1241: Oracle Data Integrator tool execution fails.
    Caused By: com.sunopsis.wsinvocation.SnpsWSInvocationException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '#' (code 35) in prolog; expected '<'
    at [row,col {unknown-source}]: [1,1]
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromXML(AbstractMessageImpl.java:333)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.loadFromString(AbstractMessageImpl.java:348)
        at com.sunopsis.wsinvocation.client.impl.AbstractMessageImpl.fromString(AbstractMessageImpl.java:403)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.fromXML(AbstractJWSDLParserImpl.java:272)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:260)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.getSOAPMessage(WebserviceUtils.java:94)
        at com.sunopsis.dwg.tools.common.WebserviceUtils.invoke(WebserviceUtils.java:138)
        at com.sunopsis.dwg.tools.InvokeWebService.actionExecute(InvokeWebService.java:327)
        at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:276)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java:3437)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1509)
        at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:44)
        at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)
        at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
        at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
        at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
        at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
        at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
        at java.lang.Thread.run(Thread.java:662)
    Thanks in anticipation...

    the used variable 'SOAPREQUESTMESSAGE' is being created in a procedure using jython.
    1. Can we use this variable (SOAPREQUESTMESSAGE) value in the next step that is while invoking web service request (can it persist) ?
    2. If not then how can we use this variable value to invoke ws request in next step ?
    Would like to appreciate help.
    Pls reply.

  • Transaction Type field not getting value in F-05 transaction

    Hi All,
    When ever we are doing a reverse posting for foreign currency valuation using F.05 Tcode it will create a BDC session where we can execute this batch Input session thru SM37.
    This will use F-05 Tcode to post the the entries, but the problem is one of  the field Transaction Type is not getting value for some of the GL account numbers range. This is totally SAP standard program take cares of it. Transaction type field value shuld be populated by '990' value for this GL account range, this is fixed. So is thr any User exit or Screen exit for this Tcode or how we can populate the value....
    Help me...
    Chandar
    Edited by: Bala Chandar on Feb 12, 2009 1:25 PM
    Edited by: Bala Chandar on Feb 12, 2009 1:28 PM
    Edited by: Bala Chandar on Feb 12, 2009 1:33 PM

    Hi Mr/Mrs Bala Chander,
    I am having the same problem.
    When running F.05 a BIM is created for GL account X. GL account X has a field status in which transaction type is defined as a required field because of BCS / ECCS. We have a substitution rule in place which should default the transaction type, based on several criteria. But when executing the BIM, I see that nothing is filled in field transaction type. Did you find a proper solution for your problem? Changing the field status is not an option in my opinion.
    Regards,
    Joep

  • Chnfind unable to find the decimal type by variable and sometimes "Round" command

    Dear all,
    During the work with Diadem I got two troubles. Could you please take a look and show me the wrong if you find the issue?
    1.) Here is my trouble as we see the photo below. It is most important problem which I have. I really have no idea why it could happened. It is alway happened to find a value with decimal type's variable, and even that variable is changed  to "str()".
    setlocale("en-gb")
    dim Min_point,Index_low,result
    Min_point=val(Data.Root.ChannelGroups(1).Channels("CopyYangle").Properties("minimum").Value)
    Min_point=round(Min_point,6)
    Min_point=str(Min_point)
    msgbox("The Min.Value is: "&Min_point)
    Index_low=Chnfind("ch(""CopyYangle"")<="&Min_point&"", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    Index_low=Chnfind("ch(""CopyYangle"")<=-0.11374 ", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    2.) Still the problem with ChnFind()  or  ChnFindreverse().   If I change the Rounds off a number to the nearest integer with the function "Round()" it might not work in ChnFindreverse(). Such like it works under 4, 6, 8 and even 7 but doesn't work with 3 and 5. Is this logical?
    setlocale("en-gb")
    Dim XE, Xchannel, Ychannel,round_N0
    Xchannel = "[2]/Right"
    T1 = Xchannel
    R1 =val(Data.Root.ChannelGroups(2).Channels("Right").Properties("maximum").Value)
    round_N0=4 ' <========= 3 and 5 Not work, 4, 6, 7, 8 .... work
    R1 =round(R1,round_N0) ' <=========
    msgbox("Max. point is: " &R1 &VbCrlf& "Round Nr is: "&round_N0)
    L1 = ChnFindReverse ("Ch(T1)>=R1",0)
    msgbox("Index number for Max.Point is: "&L1 &VbCrlf& "Round Nr is: "&round_N0)
     .tdx is a valid extensions for an attachement?
    If you couldn't open the TMD file. Please remove ".tdv" the attacments file name to make sure it is "ChnFind.tdx" but not "ChnFind.tdx.tdv".
    Kind regards / Mit freundlichen Grüßen
    J.Huang
    Attachments:
    ChnFind.TDM ‏5 KB
    ChnFind.tdx.tdv ‏39 KB

    Hello J.Huang,
    I downloaded the files and was able to get it to work. It looks like when you format the minimum value to a string, you loose precision and then ChnFind doesn't find the value your are looking for. He is an example which worked for me :
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    sgValue = str(oChnY.Properties("minimum").Value,"d.ddddddddddddddd")
    Index = ChnFindReverse("Y<="&sgValue,,Array("Y"),Array(oChnY))
    LogFileWrite(Index)
     Using symbols (parameters 3 and 4) is not necessary to get the solution. The key is teh second value for "str" which formats using more digits. As soon as you reduce the number of digits, you may no longer get a result.
    Ther is an alternative to ChnFind, in case there is only one occurance in teh signal which has the minimum value
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    Index = PNo(oChnY,oChnY.Properties("minimum").Value)
    LogFileWrite(Index)
     I hope one of the two options works for you. I tested the approach with teh first channel too and it worked as well

Maybe you are looking for