Saturday, 29 March 2014

Increase Default Size limit of WAR files in Tomcat 7+

Correct me if am wrong, ever since Tomcat 7.0.x versions and above, the minimum size for a deployable WAR file is set to 50 MB by default. So if you're WAR file exceeds 50 MB limit, you will get the IllegalStateException error.

There is a fix for this problem. This file size limit can be increased to a value higher than 50 MB.

Go to the location : TOMCAT_HOME/webapps/manager/WEB-INF folder. We need to edit the web.xml file here.

Before editing, I suggest you create a backup of the original web.xml ( cp web.xml web.xml.bkp )... Just in case...

Now open the web.xml and search for the attribute "max-file-size". You see the default value is set to 52428800 i.e 50MB. Increase it to let's say 100 MB (104857600 in bytes).

Also increase the value of the attribute "max-request-size" to 100 MB (104857600 in bytes).

Restart tomcat to bring the changes into effect.

Now you can deploy a 100 MB WAR file onto Tomcat without getting any error.

Friday, 28 March 2014

Travel Bytes - Chicago Subway - O'Hare Airport

Chicago O'Hare International Airport was in the news recently, when one of the subway trains crashed, derailed and stepped onto an elevator. The incident injured many people. The live survellaince video capturing the accident can be seen here. In the meantime, I thought I'll just post a few images of how the O'Hare subway station originally looks like.




As you see in the image, this is exactly where the train crashed. Apparently, the train driver dozed off and was actually sleeping when the incident occurred. As you see the blue color indicates that the subway's Blue line is available.

Well, if you're visiting the city, you may have to get down at the LaSalle Street station in 'The Loop" neighborhood, depending on your destination. Check out the CTA Blue line station map below. Also please check google maps and plan accordingly.


Saturday, 22 March 2014

Find youngest revision number in Subversion

In Subversion, in order to find the youngest revision number, the command is :

svnlook youngest

It will show the latest (youngest) revision number. In better words, the latest version which contains the most recent changes.

Eg : 

svnlook youngest /Users/IronCladZone/SubRepo1
25

Thursday, 20 March 2014

Show hidden .classpath .project files in Eclipse

If you're using Eclipse IDE for any Java based projects, you might want to make .classpath or .project files visible.

In order to do so, click the small triangle on the right top side of Project Explorer and select Customize View.

Just deselect / un-tick the .* resources option and refresh your project.

Now you will be able to see the .classpath & .project files, which are hidden by default. Note that the .classpath file will contain information about the classpath and build info while the .project file will contain the project metadata.

This is useful while working with Maven. When you use the command mvn eclipse:eclipse, it creates .classpath & .project files, which are not visible in the project explorer by default. You can make them visible in Eclipse Project Explorer like this.


Wednesday, 19 March 2014

Unsupported IClasspathentry kind=4 error in Maven

While importing a Maven project into eclipse, you may sometimes get an error like "Unsupported IClasspathentry kind=4".

The best solution was found on this StackOverflow page. The 2nd solution provided by Sagar worked for me and fixed the issue.

Quick Fix : 

In Eclipse, Right click the project -> Maven -> Disable Maven Nature

Open Terminal, go to the project directory and type mvn eclipse:clean

Now, again right click the project in Eclipse -> Configure -> Convert to Maven Project

Note that when you type mvn eclipse:clean in terminal, it deletes the old .classpath, .project files

[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules

Maven Environment Variables

In order to make Maven work perfectly, we need to define 2 distinct environment variables. They are M2_HOME and M2_REPO. Let's see the basic difference between the two.

M2_HOME is the variable which defines the Maven installation directory.

M2_REPO is the variable which defines the location of your local repository.

Eg : 

So, for instance, if you installed Maven in /usr/local directory, then M2_HOME should be set to /usr/local/apache-maven-3.x.x

If you want to use some local directory (at any location) as your local repository, the M2_REPO should point to it.

Let's say for example, you created a directory /Users/IronCladZone/Maven/Repos which you intend to use as your local repository, M2_REPO should point to this location.

Also, If you use Eclipse IDE to work on, you should define the same in the preferences as well.

Go to Preferences -> Java -> Build Path -> Classpath Variables and create a New entry for M2_REPO, which points to your local repository and a new entry for M2_HOME which points to Maven installation directory.

Go to Preferences -> Maven -> User Settings and check if the Local Repository is set to the desired location.

Also check if the settings.xml location is rightly pointed. Sometimes, the settings.xml is not located in the ~/.m2/repository location. If not, then it must be located at your M2_HOME/conf location. ( Eg : /usr/local/apache-maven-3.x.x/conf ).

Monday, 17 March 2014

True Detective - Season 2 Casting

True Detective Season 1 was over too fast too soon. The suspense build-up was great with clues pointing to multiple people. The finale however seemed too rushed up. The last episode where all the action took place seemed like a hush-hush attempt to end the first season. Anyways, with the season 1 ending, there's a lot of speculation on who will star in the series' season 2. The cast pairings is all about chemistry.

Here's an IronCladZone exclusive dream wish-list :

1. John Travolta & Denzel Washington - This duo starred in the 2009 train hijack thriller - The Taking of Pelham 1 2 3. These two guys seem to have a silver tongue. They are too good in silvery conversations. Good qualities for detectives, who want to elicit a certain desired response for the questions they ask. They manage to capture the flow of your thoughts and compel you to think in their directions.



2. Leonardo Di'Caprio & Mark Ruffalo - The duo was quite charming in Shutter Island. Though the story was quite a mindf**k, the pair perform the investigations with good amount of rationality, logic and reasoning. The edginess of Di'Caprio and supportive calmness of Ruffalo seemed contrasting.

3. Jamie Foxx & Colin Farrell - This duo was cool enough as undercover cops in Miami Vice. The chemistry between them seemed quite good i.e they seemed to get along well. Farrell adds a coolness quotient to the whole scene and has a good screen presence.




4. Al Pacino & Robert De Niro - This pair rocked in the crime thriller Heat. Their restaurant scene is like the handprints on Hollywood's Walk of Fame. It will never be washed away. They came back again as buddies in Righteous Kill. Carla Gugino added a dash of glamor to the plot. I'd love to see them just to watch their friendly chemistry.

TD Fans, do not forget to comment or suggest which other pairs you want to see in Season 2. Any female leads in mind? Any other actor who can essay the role of a detective convincingly? Ping in your thoughts and suggestions. Ciao.
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker