DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2005
    Posts
    6

    Can't find the error

    I cannot run one of web applications.The error giving on the browser
    is
    jrunx.compiler.DefaultCFE: Compiler errors:C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:453: illegal start of expression
    public String getDescr(String Description)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:2449: illegal start of expression
    public ArrayList getStatVec(java.sql.Connection conn, int participateid, int planid, String[] bankids, String[] questids)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:4726: ';' expected
    String getBannerId(java.sql.Connection conn, String CodPlace, String sType, String sId, String sLink)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:7361: illegal start of expression
    public String getDescr(String Description)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:8373: illegal start of expression
    public ArrayList removeDubl(ArrayList inVec, int colNum)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:9904: illegal start of expression
    public ArrayList getStatVec(java.sql.Connection conn, int participateid, int planid, String[] bankids, String[] questids)
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:11260: ';' expected
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:82: 'try' without 'catch' or 'finally'
    try
    ^
    C:\Web\JRun4\servers\gctest\default-ear\default-war\WEB-INF\jsp\jrun__survey__sands__htmlPrint2ejsp1b.java:11286: '}' expected
    }
    ^
    9 errors
    But I have looked at these methods an could not find any problems.
    The most interesting is that some of those methods are used by other applications and work pretty well.

  2. #2
    Join Date
    Sep 2005
    Posts
    6
    I didnot write the code (that programmer doesnot work anymore).
    and I am new employee also new to Java
    Last edited by Individual; 09-21-2005 at 03:23 AM.

  3. #3
    Join Date
    Jul 2005
    Location
    the Netherlands
    Posts
    128
    Quote Originally Posted by Individual
    I didnot write the code (that programmer doesnot work anymore).
    and I am new employee also new to Java
    There are a lot of lines where you (or your former colleage) forgot to end his/her lines with "';". This meistake can cause both the "';' expected" and the "illegal start of expression" compiler errors. The compiler tells you exactly where these things are forgotten. If you're new to Java then get a good book on it and/or read some tutorials to get familiarised with the language.

    Good luck.

  4. #4
    Join Date
    Sep 2005
    Posts
    6
    Actually i became a lot familiar, since working for 2 months

    the method is written without errors I can give the source
    public String getDescr(String Description)
    {

    if (Description != null)
    {
    while (Description.indexOf('\n') != -1)
    {
    Description = Description.substring(0,Description.indexOf('\n')) + Description.substring(Description.indexOf('\n')+1,Description.length());
    }


    while (Description.indexOf('\r') != -1)
    {
    Description = Description.substring(0,Description.indexOf('\r')) + Description.substring(Description.indexOf('\r')+1,Description.length());
    }


    while (Description.indexOf("<") != -1)
    {
    if (Description.indexOf(">") != -1)
    Description = Description.substring(0,Description.indexOf("<")) + Description.substring(Description.indexOf(">")+1,Description.length());
    else
    {
    Description = Description.substring(0,Description.indexOf("<")) + "&lt;" + Description.substring(Description.indexOf("<")+1,Description.length());
    }
    }

    while (Description.indexOf(">") != -1)
    {
    Description = Description.substring(0,Description.indexOf(">")) + "&gt;" + Description.substring(Description.indexOf(">")+1,Description.length());
    }

    return Description;
    }
    else
    return "";

    }
    Also the method is located in JSP filev which is requested I don't where yet!

  5. #5
    Join Date
    Jul 2005
    Location
    the Netherlands
    Posts
    128
    Quote Originally Posted by Individual
    Actually i became a lot familiar, since working for 2 months

    the method is written without errors I can give the source

    Also the method is located in JSP filev which is requested I don't where yet!
    Ok, that method looks ok, but the compiler is complaining about some other code. Not the code you just posted.

  6. #6
    Join Date
    Sep 2005
    Posts
    6

    Tokenizer makes me..

    I have solved that problem, now another error

    jrun.jsp.parser.TokenMgrError: (9,5) Unable to scan the character '/' which follows ''

    what does that mean? is '/' character given to be tokenized?

    for example the symols '\' and '|' are in one button(with shift)
    so is it possible that someone mistyped in the database and the tokenizer is getting stupid when retrieving data from the daytabase?

  7. #7
    Join Date
    Jul 2005
    Location
    the Netherlands
    Posts
    128
    Quote Originally Posted by Individual
    I have solved that problem, now another error

    jrun.jsp.parser.TokenMgrError: (9,5) Unable to scan the character '/' which follows ''

    what does that mean? is '/' character given to be tokenized?

    for example the symols '\' and '|' are in one button(with shift)
    so is it possible that someone mistyped in the database and the tokenizer is getting stupid when retrieving data from the daytabase?
    I never used jrun.jsp.parser, but it sounds quite straight forward: it can't scan / if " is followed. This happens at line 9, column 5 (I think).
    Maybe this link is helpfull to you: http://livedocs.macromedia.com/coldf...FML/Debug7.htm

    Good luck.

Similar Threads

  1. Returning errors from SQL Server Stored Procs
    By Khalizan in forum VB Classic
    Replies: 1
    Last Post: 11-28-2001, 01:32 AM
  2. DTS/linked server error #6
    By John M. in forum Database
    Replies: 0
    Last Post: 05-17-2001, 03:01 PM
  3. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 05:34 PM
  4. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 02:42 AM
  5. Error "Can't find DLL Entry Point "
    By Rishi Dhruv in forum VB Classic
    Replies: 0
    Last Post: 05-13-2000, 07:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links