Interesting compiler error message

Hi,
i have the following fragment of code:
     public void setTheArmies(int attacking, int defending) {
          defending.setArmies(defending);
          attacking.setArmies(attacking);
          game.repaint();
     }defending and attacking are both of typr Country, the setArmies() method in class Country is as follows:
     public void setArmies(int a) {
          occArmies = a;
     }When i try and compile it, it comes up with the following error message:
java:254: Can't invoke a method on a int.
java:255: Can't invoke a method on a int.This is strange as im clearing using an integer as an argument for this method????? Can someone please help me.
Thanks
Cath

you have variables named the same 'defending', one is an int, the other is an object.
Hi,
i have the following fragment of code:
public void setTheArmies(int attacking, int
defending) {
defending.setArmies(defending);
attacking.setArmies(attacking);
game.repaint();
}defending and attacking are both of typr Country, the
setArmies() method in class Country is as follows:
public void setArmies(int a) {
occArmies = a;
}When i try and compile it, it comes up with the
following error message:
java:254: Can't invoke a method on a int.
java:255: Can't invoke a method on a int.This is strange as im clearing using an integer as an
argument for this method????? Can someone please help
me.
Thanks
Cath

Similar Messages

  • Compiler Error Message: BC30451: Name 'UserEmail' is not declared.

    Have the message when I test the page. Anyone sugest a
    solution please?
    Compiler Error Message: BC30451: Name 'UserEmail' is not
    declared.
    Page code below.
    <%@ Page Language="VB" ContentType="text/html"
    ResponseEncoding="iso-8859-1" %>
    <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
    Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutra l"
    %>
    <MM:DataSet
    id="dsUsers"
    runat="Server"
    IsStoredProcedure="false"
    ConnectionString='<%#
    System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conSQLPerene lle")
    %>'
    DatabaseType='<%#
    System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conSQL Perenelle")
    %>'
    CommandText='<%# "SELECT dbo.Users.UserEmail,
    dbo.Users.UserPassword FROM dbo.Users WHERE
    dbo.Users.UserEmail=@UserEmail AND
    dbo.Users.UserPassword=@UserPassword" %>'
    Expression='<%# IsPostBack %>'
    Debug="true"
    ><Parameters>
    <Parameter Name="@UserEmail" Value='<%#
    IIf((Request.Form("UserEmail") <> Nothing),
    Request.Form("UserEmail"), "") %>' Type="NVarChar" />
    <Parameter Name="@UserPassword" Value='<%#
    IIf((Request.Form("UserPassword") <> Nothing),
    Request.Form("UserPassword"), "") %>' Type="NVarChar" />
    </Parameters></MM:DataSet>
    <MM:PageBind runat="server" PostBackBind="true" />
    <script language="VB" runat="server">
    Protected Sub Page_Load(ByVal Src As Object, ByVal E As
    EventArgs)
    ' Don't cache this page.
    Response.Expires = -1
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("cache-control", "no-store")
    ' Check user credentials entered on the page
    If (UserEmail.Value =
    dsUsers.FieldValue("UserEmail",Nothing))
    &&(UserPassword.Value =
    dsUsers.FieldValue("UserPassword",Nothing)) Then
    ' The user has been authenticated.
    ' 1. Create the authentication ticket.
    ' 2. Redirect to the appropriate page.
    ' 1. Create the authentication ticket.
    ' Create and use the forms authentication ticket.
    FormsAuthenticationTicket ticket = New
    FormsAuthenticationTicket(1,
    Request.Form("UserEmail"),
    DateTime.Now, ' issue time
    DateTime.Now.AddMinutes(30), ' expires in 30 minutes
    False, ' not persistent
    Dim ' role assignment gets stored in the UserData As
    "Users")
    ' Create a new (encrypted) HttpCookie using the ticket just
    created
    ' and name it accordingly to the value specified in the
    <forms> element
    ' in the web.config file.
    Dim cookie As HttpCookie = New
    HttpCookie(FormsAuthentication.FormsCookieName,FormsAuthentication.Encrypt(ticket))
    ' Add the cookie to the outbound response.
    Response.Cookies.Add(cookie)
    ' Redirect as appropriate.
    Dim ReturnUrl As String
    If Request.QueryString("ReturnURL") Is Nothing Then
    ReturnUrl = "/client-area/index.aspx"
    Else
    ReturnUrl = Request.QueryString("ReturnURL")
    End If
    Response.Redirect(ReturnUrl)
    Else
    Msg.Text = "Invalid Credentials: Please try again"
    End If
    End Sub
    </script>

    Answered myself. JUst named the imput fields incorrectly.
    Couple of other problems also but sorted and now working
    fine...

  • Compiler Error Message: CS0433

    Compiler Error Message: CS0433: The type 'CrystalDecisions.Web.CrystalReportPartsViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\11.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.Web.dll'
    Support Information:
    Windows Server 2003
    Crystal 9,10 and 11 support required based on reports and web configuration.
    This error relates to the following configuration:
    Visual Studio 2005
    Crystal .Net that comes with VS2005 SP2 (10.2.3600.0)
    Web application deployment.
    I am told that some Web.Config settings would fix this, but no one has been to specific.
    Thanks
    -Jonathan

    Been over those files many times today actually. Thanks for the suggestion though. Apparently this type of issue is a known issue when you have multiple DLL's in the assembly cache with regards to how Crystal is laid out.
    My Web.Config has no refference to either assembly, the project reference only refferences 10.2.3600.0 DLL's, Specific Version is set to true on all of them. The only way around this problem from what I have read is to use some sort of Web.Config adjustment, and the only article that even slightly goes into this is:
    http://blogs.gotdotnet.com/richarde/archive/2005/09/02/468187.aspx
    As you can see by that article, Microsoft is not only aware of this problem, but have had to do work arounds in the Web.Config themself to get around it. The problem is, I do not know the xmlns to use for Crystal, the depenentAssembly information, or even the assemblyIdentity to use in this case.
    What I need is the <runtime> variables for atleast version 10.2.3600.0 and 11.5.3700.0 along with 11.5.3300.0, some of my reports are directly created inside of VS 2005 C# .Net and need to be displayed in a web project, others are created in VS 2003 and used in an application layer and those are fine, but finally, I have Crystal XI R2 reports (several people creating these) which are displayed on a web page via <assemblies> tags within those sub project websites.
    The sticker at the moment is the VS2005 C# projects. I would LOVE to just shove a package at VS 2005 to force it to upgrade from 10.2.3600.0 to 11.5.3700.0, then it wouldn't matter as much, but Microsoft won't support me, they consider this a Business Objects issue. What I am looking for is the Web.Config <runtime> setttings.
    <runtime>
       <assemblyBinding xmlns="????">
            <dependentAssembly>
                 <assemblyIdentity name="???" publicKeyToken="???" />
                 <bindingRedirect oldVersion="??" newVersion="??" />
            </dependentAssembly>
       </assemblyBinding>
    </runtime>
    One for me to get past this issue.. Or some sort of upgrade to VS 2005 to bring it up to Crystal XI R2 package level, or some direction there of.

  • Compiler error messages

    Have compiled two source files from the Ivor Horton book Understanding java 2 and they both compile successfully. However when I go to run the program I get the following compiler error message.
    Exception in thread "main" java.lang.NoSuchMethodError : main
    what essentially does this mean because they are saved in the right directory and compile with no complications.

    I believe you do not have a main method. you cannot run any java class, and just compiling the classes does not imply that it will run. To run a program you need to have the main method...
    Say for the following class it will compile but will throw the exception you mentioned if you try to run the program since it does not have the main method.
    public class Test
    public static void test(String[] args)
    System.out.println(" Hello World");
    throws:
    Exception in thread "main" java.lang.NoSuchMethodError: main
    Now if you replace method name test with main
    it will run.
    public class Test
    public static void main(String[] args)
    System.out.println(" Hello World");
    }

  • CRVS2010 Beta - Compiler Error Message: BC32206:

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

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

  • Java compilation error messages

    Is there any way for HTML DB to return error messages during Java compilation? Every create java command I submit -- unless there is a grievous syntax error -- seems to return statement processed:
    Given....
    CREATE OR REPLACE FUNCTION returnOne
       RETURN NUMBER
    AS LANGUAGE JAVA
       NAME 'JavaTest.returnOne ()
                return int';Test #1 -- a valid Java source code:
    create or replace java source named "JavaTest" as
    public class JavaTest
      public static int returnOne()
           return 1;
    Statement processed.
    0.20 seconds
    begin
      htp.p(returnOne());
    end;
    1
    Statement processed.
    0.11 secondsTest #2 -- Invalid source code -- there is no indication until runtime that anything is wrong:
    create or replace java source named "JavaTest" as
    public class JavaTest
      public static int returnOne()
           iCalendar ical   = new iCalendar();
           return 1;
    Statement processed.
    0.18 seconds
    begin
      htp.p(returnOne());
    end;
    ORA-29541: class ARDB.JavaTest could not be resolved
    0.37 seconds               :(

    Er....yeah....but do you have any idea why the SQL Command Processor would not return any errors when trying to compile a class with a non-valid dependency?
    Another example:
    create or replace and compile java source named "JavaTest" as
    public class JavaTest
      public static int returnOne()
           MyFooBarClass ns = new MyFooBarClass();
           return 1;
    Statement processed.
    0.37 seconds
    select * from user_errors where name = 'JavaTest';
    NAME     TYPE     SEQUENCE     LINE     POSITION     TEXT     ATTRIBUTE     MESSAGE_NUMBER
    JavaTest     JAVA CLASS     1     0     0     ORA-29535: source requires recompilation     ERROR     0
    JavaTest     JAVA SOURCE     1     0     0     JavaTest:5: cannot resolve symbol     ERROR     0
    JavaTest     JAVA SOURCE     2     0     0     symbol : class MyFooBarClass      ERROR     0
    JavaTest     JAVA SOURCE     3     0     0     location: class JavaTest     ERROR     0
    JavaTest     JAVA SOURCE     4     0     0     MyFooBarClass ns = new MyFooBarClass();     ERROR     0
    JavaTest     JAVA SOURCE     5     0     0     ^     ERROR     0
    JavaTest     JAVA SOURCE     6     0     0     JavaTest:5: cannot resolve symbol     ERROR     0
    JavaTest     JAVA SOURCE     7     0     0     symbol : class MyFooBarClass      ERROR     0
    JavaTest     JAVA SOURCE     8     0     0     location: class JavaTest     ERROR     0
    JavaTest     JAVA SOURCE     9     0     0     MyFooBarClass ns = new MyFooBarClass();     ERROR     0
    JavaTest     JAVA SOURCE     10     0     0     ^     ERROR     0
    JavaTest     JAVA SOURCE     11     0     0     2 errors     ERROR     0Well, now that I know about user_errors, I can go ahead -- but that was sort of a surprising find.....

  • Struts and Tiles Problem:compiler error message

    I imported the application "tiles-documentation.war" from jakarta-struts-1.1 into the newly installed JDevloper(Version 9.0.5.2 Build 1618) and try to make it running.
    While with the former Jdeveloper 9.0.4 I can run it nicely(a few manual editing of some files, though), with this newer version I just can not proceed with the following error message.
    Project: D:\jdev\mywork\oc4j_startup\tiles_doc\tiles_doc.jpr
    D:\jakarta-struts-1.1\webapps\tiles-documentation\tutorial\common\menu.jsp
    Error: package and class have same name: tutorial.common._menu
    the same kind of message repeated many many times.
    It seems that I can not probe any more...
    Can someone help me out? Thanks in advance

    Right so these where messages from the JSP compile or from the import process?

  • I do not understand the compiler error message

    The code below is supposed to get multiple integer inputs from the console, place them on an array, and check for the NumberFormatException. When I compile it, it is giving an error message that I do not understand.
         A console program that accepts integer input from the user and throws a NumberFormatException if the entry is not an integer.
         Created on: August 20, 2003
    import javax.swing.*;
    import java.util.*;
    public class ArgstoNumbers2
         public static void main(String[] args)
              //Prompt user for input
              System.out.print("Enter a number: ");
              //Create and array to accept the user's input
              int [] integerArgs;
              //Fill array with users input
              while(true)
                   try
                        integerArgs = getInt();
                        break;
                   //Verfy that the input is an integer
                   catch (NumberFormatException e)
                        System.out.println("Not a number. Please enter a number.");
                        System.exit(1);
         //Start of the getInt() method
         public static int getInt()
              String numberString;
              int intVal = 0;
              boolean endChar = false;
              while(!endChar)
                   try
                        numberString = getString();
                        intVal = Integer.parseInt(numberString);
                        endChar = true;
                   catch (NumberFormatException e)
                        System.out.println("Not a number. Please enter a number.");
                        System.exit(1);
              return intVal;
         //End of the getInt() method
         //Start of the getString() method
         public static String getString()
              int aChar = -1;
              String consoleChars = "";
              boolean endChar = false;
                   while(!endChar)
                        try
                             aChar = System.in.read();
                             if ((aChar == 10) || (aChar == 13)) endChar = true;
                             else consoleChars = consoleChars + (char)aChar;
                        catch (Exception e)
                             System.out.println(e.getMessage());
                             System.exit(0);
              return consoleChars;
         //End of the getString() method

    Hi,
    A possible problem would be at line
    integerArgs = getInt();
    since here you would get an incompatible types error since 'integerArgs' is an array and 'getInt()' returns a primitive int value.
    This needs to be changed and then am sure your code should compile.
    Hope the above helps.
    John Morrison
    PS: As paul was saying, putting in the error message would be a faster way to get an answer since most developers on the forum would be hard pressed for time and may not be able to actually try out your code.

  • I try to generate a chm file over the net and I get a compiling error message

    Hi all,
    I am trying to generate chm files over the net, and the same project when I am generating the same chm locally works fine, however when I am attempting to generate the same chm on a network location, it gives me a compiling error and aborts the generation. It is also keeping the chm file open afterwards, so I have to reboot the machine.
    It is RH7 working on a Windows XP Pro 32 bit.
    Thank you

    It is not a project issue. RoboHelp is just not designed to work that way but like a lot of things, some people can use them outside what they were designed for. However, just because some people can work that way, it does not follow everyone can.
    I've seen people with projects on a network and they say have been doing it for years so it must be OK. A while later they come back and say the problem is fixed since moving it locally.
    Sorry but it looks like you are stuck with working the way you do or getting your colleague to do it. It might be as simple as he is on a different bit of your network.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Defect: Compilation Warnings hide Compilation Error messages.

    If you have a lot of pl/sql warnings generated in your procedures or packages (some of which I question as to their validity!), it won't show you the compilation errors. It should show errors first, and then, if space allows, warnings.
    I know there is a setting that lets you turn off the warnings, but that's a work-around, not a fix. :)

    I agree 100%. I've seen tools that can do this, but sqldev's project manager said long ago this is a "database limitation" and nothing could be done about it.
    Nevertheless, there's a request at http://htmldb.oracle.com/pls/otn/f?p=42626:39:6637246751078089::NO::P39_ID:3401, where you can vote for increasing prios.
    I thought I created one suggesting compiling 2 times internally if necessary: once without warnings to get the errors on top, then with warnings enabled to fill up the 20 available slots, but can't find it anymore...
    Regards,
    K.

  • Im puling my hair out! compiler error message

    can any one please give me an insight into why my program is giving me the following message
    myTry3.java [24:1] variable output might not have been initialized
    JOptionPane.showMessageDialog(null,output,"Information",JOptionPane.INFORMATION_MESSAGE);
    i cant understand this as i have set up the variable as a string at the start of the program. some guidance would be well appreciated here if possible please. thanks.

    Then maybe you need to assign something sensible to output, won't you?
    After all, you were the one who was insisting that it was initialized properly just a while ago. That turned out to be incorrect, didn't it?
    Peeking at my javadocs, I don't see a four-argument ctor for JOptionPane that takes an int as the fourth argument.
    My next idea is to suggest that you remove that first 'null' from the argument list and assign a sensible output message to 'output':
    output = "Something informative";
    JOptionPane.showMessageDialog(output,"Information",JOptionPane.INFORMATION_MESSAGE);Why don't you declare the output String closer to the JOptionPane? Narrow scope is a good thing.
    Other advice? Stop tearing at your hair every time you get a Java error. You'll be bald soon. Read the javadocs more often. Stop assuming that everything you do is correct and that the machine is persecuting you. Doubt yourself more. - MOD

  • Help with a compile error message

    Hello
    The compiler reports " ReadTVFile.java:7: duplicate class: ....
    It is only one file (and class) in my filesystem that is called this, so what can the message mean?
    I might be doing something stupid :). This is how my program structure is:
    The class ReadTVfile has a method: public ArrayList Dfile() {...}
    In Main file: import com.JT.IO.*; //the ReadTVfile is in this package
    ArrayList a = ReadTVFile.DFile();
    Is this not valid?
    My idea is to create several method to read files with. I have not created any objects of ReadTVFile since reading a file is no object. Maybe there is a better solution?
    Much regard
    JT

    Hi
    Please :) I dont have any pride in Java. As you can
    read above, I apologized for my naming convention used
    here, rewrote it for clarity and said ill do better
    next time.
    However, how does "you write confusing.. are you a VB programmer?"When I see someone who capitalizes method names it suggests VB, because that's the convention for that language. It's a fair question, because people who change from one language to another tend to write in the idiom they know until they learn differently.
    "you dont know how to read compile messages, I do" help me solve my problem? The "I do" part certainly doesn't, but that came in the second note. The first time I told you read more of the stack trace comes from seeing too many new programmers who post a stack trace for something like a NullPointerException that tells them the class, the .java source file, and the line at which it occurred, AND THEY STILL CAN'T FIGURE IT OUT. I thought you were one of those.
    Kariann
    tried to solve it. Admittenly dufymo did help me
    realize the importance of clarity in postings, but he
    did not adress my problem. If he did, I dont
    understand it, and I humbly ask you to clarify it for
    me.Sometimes it's hard to pinpoint what someone has done wrong. Your post was one of those. There's very little information to go on from your original note.
    If the class isn't too big, and there aren't too many of them, post all the code. Stack traces are good. Maybe some details about how you tried to compile and run the code, because screwing up the commands can be the reason for your problem.

  • Interesting compiler error....

    import java.net.*;
    import java.io.*;
    public class Client
         // Stores the client socket information.
         private Socket c_socket;
         // Stores a string to be send to the server for printing.
         private String lineToBeSent;
         // Gets strins from the client.
         private BufferedReader input;
         // Used to write strings to the server.
         private PrintWriter output;
         public static void main(String[] args)
              runClient();
         private void runClient()
                                   doing stuff here....
    }When I try to compile this code I get an error saying non static method runClient() cannot be referenced from a static context. What causes this? And is it possible to solve it without lumping all my code into the main method including variables (which works).

    Only static methods can be accesed from main since it is static. so make runClient() static and it will work. or else make a separate class ,say Client , add runClient() method to it and from main () create an object of class Client and call the method runClient. This way u won't have to make the method static.

  • Flash limitations, Invisible Compiler Errors, swc files...

    This question is for expert users of Flash CS4/CS5 and actionscript.   Please do not comment or offer suggestions if you have no experience  with these errors or their causes.
    ===================================================
    Question:
    =======
    Publishing  an extremely complex file can sometimes result in a blank swf being  created, and no compiler errors being shown even though some may exist.   Are there any suggested methods for dealing with this?
    =======
    Details:
    =======
    Those who have written flash files with large actionscript components  will be familiar with needing to set the JAVA_TOOL_OPTIONS evinronment  variable in order to prevent the Flash compiler from crashing due to  memory limits.  The majority of the files in question require this as a  bare minimum in order to be compiled at all.
    The project in question involves several main "launcher" components,  in addition to hundreds of "modules".  The modules themselves are being  developed in a distributed manner by several programmers.  Each module  can be executed as a standalone swf, for testing and production  purposes.  Each module has a companion swc file which holds its assets  and exports them.  All of the modules make use of a shared custom code  library that sits on top of actionscript.
    The launcher program also uses the shared library code, and runs the  modules  (never more than one at a time, and clearing previously loaded ones  before loading a new one) inside of itself.  The launcher contains a  reference file(the class names typed in an include file, referencing all  of the available exported assets from the swcs) that makes all the  necessary assets available to the modules, such that any module can be  run at any time.
    ===========
    The Error:
    ===========
    Seemingly random in occurence, every now and then a file will  "compile blank".  Essentially, the compile time is very short, the swf  pops up as a blank white box, and there is absolutely nothing listed in  the "Compiler Errors" tab, nor in the output tab.  Sometimes closing  flash and relaunching it will bring the Compiler Error messages back,  though usually not.  More often opening the file on another computer in a  different copy of flash and compiling it again will show the errors.   The original computer will still not show anything, but the other  computer can be used to fix the error, and then the file will start  reporting errors again properly.
    However, sometimes, the file will "compile blank" on all computers,  and all copies of flash.  Then the only resort to find the hidden errors  and fix them, is to comment out the entire file, and slowly uncomment  out sections one at a time.  In this manner, the area where the hidden  errors are occuring can be determined, and the error found manually.
    Obviously this is an extremely frustrating situation, but one that can be "worked around".
    However, there are two more serious incarnations of this which cannot be as easily side stepped.
    1.) Sometimes certain computers/copies of flash will "compile blank" a  file that doesnt actually have errors in it.  The same file will  compile and work perfectly on one machine, and not on another.
    2.) The most severe of all...The two more complex components compile fine in cs4, but always "compile blank"  on cs5, no matter what.  The module files all compile much faster on  cs5 and work great.  However, the shared code library and the launcher  program cannot be compiled in cs5, though they compile fine in cs4.   Both compile blank every single time on cs5, with no errors reported.
    --Just as a side note here are the compile times on two different  types of computers, for cs4 and cs5, for the three types of compiled  files:
    =====================
    CS4 Compile time averages:
    =====================
    Dual Core - Pentium 4:
            Module File = 1-4 minutes
            Shared Code Library = 10+ minutes
            Launcher Program = Unusable
    6 Core AMD w 16 GBs of RAM:
             Module File = less than 10 seconds
             Shared Code Library = approx. 1 minute
             Launcher Program = 15-25 minutes
    =====================
    CS5 Compile time averages:
    =====================
    Dual Core - Pentium 4:
            Module File = less than 20 seconds
            Shared Code Library = 2-4 minutes
            Launcher Program = Compiles blank
    6 Core AMD w 16 GBs of RAM:
             Module File = less than 10 seconds
             Shared Code Library = less than 30 seconds
             Launcher Program = Compiles blank
    ========================================
    Summary:
    ========================================
    1.) Large and complex files in cs4 or cs5 can sometimes false compile, showing a blank swf, and no errors.
    2.) Large interlinked projects containing many swcs that can compile on cs4 always compile blank on cs5
    The issues involved "appear" to deal with interlinked swcs and swfs, memory, and compiler messages.
    The best solution i can think of would be some sort of verbose mode  setting, where the cs4/cs5 compilers can be set to trace all the actions  they are taking, either to a log file, or to the screen.  Rather than  simply giving a summary of the results, a real-time display of what is  occuring might lead to the actual bugs/issues.
    Eisley79

    For the future people who come searching this forum and find my thread.
    http://kb2.adobe.com/cps/405/kb405257.html
    Above is a link to adobe's official version of admitting this situation exists(and its true for cs5 as well).
    If you are reading this, and simply have a single large file that won't compile.  Attempt their solutions suggested.  Also, click the link in the comments by the user refering to a blog that helped him.
    That will explain the JAVA_TOOL_OPTIONS memory issue (which you can find many explanations on google as well).
    If however, you are working with a large number of separate swf's that load each other, and share assets and are getting the REAL problem, neither adobe's solutions, nor the JAVA_TOOL_OPTIONS will correct the problem for you.  My best suggestion to you is, have one SWF launch the next one, and break your project into pieces.  Whatever the parent SWF needed to have, can be either copied into all the children SWFs, or into several "brother" SWFs which share the loaded children SWFs, (and can actually be successfully compiled).  Then as you move from brother to brother, they can be made to appear as if they were actually ONE file, loading the children, instead of several launching each other, and sharing the loading duties.
    and as far as adobe is concerned, if i told you what i thought of you, i would get this post deleted...and myself banned.
    Anyone considering doing Enterprise level projects in Flash, DONT.  I wanted to use JAVA, but my company went with flash.  I am stuck working around it constantly, and would have been better off coding foundation classes to mimic whatever functionality we needed from flash into java.
    Maybe when actionscript 4 comes along, it will magically bring with it true object oriented programming, and Adobe will spend the time and money to make a real working compiler.  Somehow i doubt it.

  • Compilation error that cannot be displayed

    Hi all,
    I have this compilation error message, but when I try to view the error, nothing appears. Have you guys ever experienced anything like this? Or is there anything that I have missed? Thanx.
    (new.sql is the script of the stored procedure)
    SQL> @d:\scriptdb\new.sql
    Warning: Procedure created with compilation errors.
    SQL> show error;
    No errors.
    SQL>

    Try being explicit:
    show error procedure procedure_name
    or
    show error package package_name
    "show error" with no additional arguments just shows the errors for the last object processed. Perhaps your script is compiling multiple objects?

Maybe you are looking for

  • Oracle Press book gives incorrect information about when you are certiifed

    SQL Certified Expert Exam Gudie: ISBN: 978-0-07-161421-4 Page: 12 ... and I left (the testing center) a happy and Certified SQL Expert. THIS IS WRONG. When you leave the exam you receive a score report indicating you have passed the exam (I beleive s

  • Weekly to daily/shift Order Split

    Hi All, We have weekly snp orders that we convert to PPDS orders. Is there a standard way to split the orders to daily/shift wise orders? Regards, Zeeshan.

  • Undo function not working

    CC InDesign 9.2 update has killed my Undo/Redo function - it's always in light grey... can anyone help?

  • Refurbished AIrport Extreme Card problems

    So i ordered a refurbished airport extreme card for my 12 inch powerbook g4. i installed the card in the right place and heard the click it is supposed to make, i fold up the little door, put the battery back in and reset my computer, after having in

  • Cannot change desktop photo

    Tried , via System Preferences, to change my desktop photo. Oddly, some images in my library appeared, but many wouldn't - instead,a question mark appeared in the thumbnail box. Ran Cocktail, but it didn't help. Using Mountain Lion and the latest ver