Results 1 to 16 of 16
  1. #1
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Hi all........... I am getting this error while running all the .JSP files.
    The Error message is Recompile with -Xlint:unchecked for details.
    If i execute any Html pages its running. I am new to JSP.
    Help me out guys.................



    Thanks in advnce..........

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    That is not the error message, that is a recommendation that Java is giving you because of an error you are getting.

    Probably you are using a new version of Java with a very old version of whatever server software you are using; I'll assume Tomcat. What software are you using, which version and what version of Java are you using?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    jdk 1.7
    NetBeans 7.4 &
    Tomcat 7.0.41.0

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Okay that's all quite current. Do you actually get an error, or only a warning in the Netbeans console? Do JSPs actually not work?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    It's a warning, probably (since it's for an unchecked warning) because somewhere you aren't using generics.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #6
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Its showing like this if i run a page.


    H:\NB-Working area\hsp\build\generated\src\org\apache\jsp\nurse_ 005fadmin_0020module\getPatient_jsp.java:10: error: class getpatient_jsp is public, should be declared in a file named getpatient_jsp.java
    public final class getpatient_jsp extends org.apache.jasper.runtime.HttpJspBase
    Note: H:\NB-Working area\hsp\build\generated\src\org\apache\jsp\AdminV iew_jsp.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    H:\NB-Working area\hsp\nbproject\build-impl.xml:953: The following error occurred while executing this line:
    H:\NB-Working area\hsp\nbproject\build-impl.xml:296: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 4 seconds)


    What do i need to change.?

    Thanks in advance.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    H:\NB-Working area\hsp\build\generated\src\org\apache\jsp\nurse_ 005fadmin_0020module\getPatient_jsp.java:10: error: class getpatient_jsp is public, should be declared in a file named getpatient_jsp.java
    public final class getpatient_jsp extends org.apache.jasper.runtime.HttpJspBase

    That's your error.
    The other part is irrelevant to it not compiling.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Yeah but its kind of weird (I should be punished for using the "W" word) because it is a servlet class generated from a JSP through Jasper; how on earth can that turn into the wrong class / file name??
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    There's probably something up with the JSP page.
    I originally thought it was another class defined in the page, but as you say, that's not the case. It's generating an incorrect file name.

    Clean the generated stuff out and try again?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  10. #10
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    yeah wait, it fails as part of the -build-, not as part of running the JSP. Its probably pre-compilation of the JSP that is actually failing.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  11. #11
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Thanks fr the suggestions. I will try fr this.

  12. #12
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    problem solved. thanq guys.

  13. #13
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Okay, but what was wrong and what did you change?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  14. #14
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    I do not understand at all what you just said :/
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  15. #15
    Join Date
    Dec 2013
    Posts
    6
    Rep Power
    0

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    Some error is occuring during the compilation of JSP page. I just tried by copying the code to someother page by creating a new webapp. it worked.

  16. #16
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Hi...How to overcome this: Recompile with -Xlint:unchecked for details

    So basically you don't know what the problem was, you only made it go away by trying some stuff. I have a gut feeling that this problem is going to return sooner or later, problems which you workaround in stead of solve/explain usually do.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Compiler Warning:compile with -Xlint:unchecked
    By harshit shah in forum AWT / Swing
    Replies: 5
    Last Post: 08-08-2013, 04:17 PM
  2. to overcome nosuchelement exception
    By Preethi dimpi in forum New To Java
    Replies: 1
    Last Post: 03-04-2013, 12:48 PM
  3. Replies: 24
    Last Post: 07-29-2011, 04:53 PM
  4. unchecked or unsafe operations-Recompile with -Xlint
    By pronetin in forum Advanced Java
    Replies: 15
    Last Post: 05-31-2010, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •