Followers

Thursday, February 24, 2011

Yummy Spring Rolls!

Hi Java Enthusiasts,


Once in a birthday party of a friend we visited one of the posh Restaurants of Hyderabad. Now, when in a party (F.R.E.E) we often resort to a methodology which never comes to our mind when we have to pay for ourselves. Here, therefore, we fell to our whims and fancies and thereby started to order "The Starters".  I was so hungry that I could have started with biscuits or even desserts, if you insisted. One of my eligible friends shouted, "I wish for Spring Rolls". 
And, today here I am. With Spring. Here in this article I am listing out the probable issues for the newbies in Spring world!


Helper Logs:
Server version: Tomcat 6.0.24
Spring version: 2.5
Notations used:
#Issue -- Mentions and describes the problem faced.
#(...) -- Describes the solution to the issue.
#Web-reference -- Refers to an article or forum thread discussing the same issue.


--------------------------------------------------------------------------------------------------------


#Issue -- The filename or extension too long: Unable to Create directory
Error trace: Cannot create spring-framework-3.1.0.M1\projects\org.springframework.integration-tests\src\test\java\org\springframework\context\annotation\jsr330\ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java


#(As a work around we have copied the original zip file to C: drive, shortened the name of the file and then unzipped it, thereby reducing the file path + file name by 50 characters.
Path limit is 248 characters.
Path+Filename limit is 260 characters.
Windows XP has a 255 character limit.
Windows Vista has a 260 character limit.)


#Web-reference: here


--------------------------------------------------------------------------------------------------------


#Issue -- Problems arising due to difference in versions of Server and Spring distribution @Omega location parallel work.


Error description:
I have been working on this project at Omega location also. I was not observing an appropriate response and results as in the tutorial. I wondered what were the problems.
#(Version matters. Sometimes in over enthusiasm, we tend to download and use the latest versions of the software and dependency libraries and jars. At the location Omega, I was using Tomcat 7 which has deprecated "InstallTask" and changed the user-Manager configurations. Therefore many features like the "List" were not working)


#Web-reference: here


--------------------------------------------------------------------------------------------------------


#Issue - Problems getting the third party jars.
#(Download the Spring 2.5 Final version with dependency jars. In the later versions the extra jars were pruned and the jar structure was made more complex and use oriented and less in number)


#Web-reference: here or to directly download the file here.


--------------------------------------------------------------------------------------------------------


#Issue
...\Spring\SpringTest\build.xml:85: taskdef class org.apache.catalina.ant.InstallTask cannot be found
#(InstallTask has been deprecated in Tomcat server 7, replaced by DeployTask. If you are working with versions before 7, it works fine)


#Web-reference: here


--------------------------------------------------------------------------------------------------------


#Issue
...\Spring\SpringTest\build.xml:85: java.lang.UnsupportedClassVersionError: Bad version number in .class file
#(Java version conflict caused due to multiple JVMs active within the system. One should always uninstall all the the JVMs and download the latest one and install. In the eclipse IDE we can then work with prior versions since the JVMs have backward compatibility for the compiler)


#Web-reference: here


--------------------------------------------------------------------------------------------------------


#Issue
Error trace: SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(1,1) The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application


#(The dependent jars with the Spring 2.5.0 binary distribution has the jstl.jar and the standard.jar of the version 1.2. Using the both the jars of the version 1.1 resolves the issue. Please download jakarta-taglibs-standard-1.1.0.zip from here)


#Web-reference: here


--------------------------------------------------------------------------------------------------------


Yours JavaMad,
Sunit Ronnie Ghosh.

No comments: