Thursday, October 27, 2011

org.apache.jasper.JasperException: Unable to compile class for JSP

I got this error while working with a complex file  in JBOSS.

If you get below mentioned error, As the compiler suggesting there is some brace mismatch. Just go around and check again. Make sure you close all braces correctly.

09:09:25,282 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 822 in the generated java file
Syntax error, insert "else Statement" to complete IfStatement

An error occurred at line: 822 in the generated java file
Syntax error, insert "}" to complete Block

An error occurred at line: 832 in the generated java file
Syntax error on token "}", delete this token

An error occurred at line: 833 in the generated java file
Syntax error, insert "}" to complete ClassBody

Monday, October 24, 2011

How to install Subversion (SVN) in Eclipse or My Eclipse

Apache Subversion (SVN) is a software versioning and a revision control system distributed under a free license. SVN is also known as Subclipse.

Subclipse 1.8.1 and 1.6.18 and 1.4.8 are now available for Eclipse 3.2+.

Here are the simple steps to install Subclipse (SVN) plugins in your IDE Eclipse or My Eclipse.

Step 1. Go to Site (http://subclipse.tigris.org) and download file latest version of Zipped file (site-1.8.1.zip).

Download Page.

Download URL.

Step 2. Unzip the file (site-1.8.1.zip) in dropins folder

Unzip the downloaded file in below mentioned dropins folder. dropins is where your Eclipse is installed.
Extract files to site-1.8.1

For Example.
C:\Program Files\Genuitec\MyEclipse 7.5\dropins



Step 3. Restart Eclipse and check it.

Restart your IDE (Eclipse or My Eclipse) and check whether it is installed successfully.

How to check whether Subclipse (SVN) is installed successfully or not?

Go to Window -> Preferences



If you can see SVN under Team node then it is installed successfully. If not then try again.

class file has wrong version 49.0, should be 48.0

If you get below mentioned error.

class file has wrong version 49.0, should be 48.0

There could be Java version conflict. Check for correct version of Java for Compiling and Running the .class / .jar file.
You may have complied .java file in higher version of Java and Running it on lower version of Java.

Check for Java version

Command: java -version

Just make sure that you compile and run in same version.

Thursday, October 20, 2011

RA layer request failed

If you get below mentioned SVN error in Eclipse or My Eclipse, possibly there could be two reasons.

RA layer request failed
svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'https://svn.example.com/test'

1. Check whether you have access to the SVN repository.

Hit the SVN url https://svn.example.com/test in your browser and check whether you can access it, if required put user name and password. if you do not have access then ask SVN admin to grant access to you.

2. If you have access and still getting above error.

Go to below mentioned folder and Clean up the folder. Take files backup or simply delete those files.

C:\Documents and Settings\Your User Name\Application Data\Subversion\auth

Now try to access your SVN in Eclipse, Hope you may able to access it, if not let us discuss it.

Linux : chmod: WARNING: chmod: could not getcwd OR chown: getcwd: Permission denied

When I tried to do chmod for a bulk of files at once using below mentioned chmod command, I used to get below error.
Below command is used for changing permission for a bulk of files recursively in a single shot.

Command : chmod -R 777 *

Error :
chmod: WARNING: chmod: could not getcwd /home/test

Also when i tried to do chown for a bulk of files at once using below mentioned chown command, I used to get error as shown below.
Below command is used to change owner name for a bulk of files recursively in a single shot.

Command : chown -R UserName:GroupName *

Error :
chown: getcwd: Permission denied

However when I do chmod or chown for one particular folder, it runs without error.

Command : chmod -R 777 FolderName
Command : chown -R UserName:GroupName FolderName

Reason :
On some Unix variants, getcwd() will return FALSE if any one of the parent directories does not have the readable or search mode set, even if the current directory does.

Solution :
Type "groups" command and see which other groups you can access.
Go to the parent folder and change the group name.
And then try the above commands, It worked for me and hope it may even work for you.

If not lets discuss it here.