Monday 12 January 2015

Variable Already Defined Error In Netbeans!!!

Sometimes there occurs a error while compiling .jsp file:

Compiling 2 source files to C:\Users\Rajeev Handa\Documents\NetBeansProjects\Mission Cricket new\build\generated\classes
C:\Users\Rajeev Handa\Documents\NetBeansProjects\Mission Cricket new\build\generated\src\org\apache\jsp\playersdeatil1_jsp.java:32: error
variable PATH is already defined in class playersdeatil1_jsp
String PATH="jdbc:mysql://localhost/";
^
1 errors
C:\Users\Rajeev Handa\Documents\NetBeansProjects\Mission Cricket new\nbproject\build-impl.xml:953: The following error occurred while executing
this line:
C:\Users\Rajeev Handa\Documents\NetBeansProjects\Mission Cricket new\nbproject\build-impl.xml:296: Compile failed; see the compiler error output
for details.
BUILD FAILED (total time: 1 second)

This error usually occurs when any net beans failed to compile any file successfully and during compilation of different file the next time it fails to remove from its cache the previous contents .
So to remove this error look at the very first line of the error very carefully because the cause of the error is usually defined in the first line.
In this case see the first line which says  :"\build\generated\src\org\apache\jsp\playersdeatil1_jsp.java"

Now the erroneous file is located somewhere in the path specified
So go to the path specified and delete the error causing file

Note:Removing the erroneous file does not harm UR file because it is related to the the server not  the compiler itself
So The best way is to locate the path and remove the error causing file


No comments:

Post a Comment