April 2007

You are currently browsing the articles from Java Blog - Java, J2EE, SOA, Spring and Hibernate written in the month of April 2007.

java.lang.NoSuchMethodError: weblogic.servlet.jsp.StandardTagLib.fakeEmptyBodyTag( Ljavax/servlet/jsp/PageContext; Ljavax/servlet/jsp/tagext/BodyTag;IZ

I was trying to deploy my Ear containing a war file in Weblogic 8.1, got the following exception

java.lang.NoSuchMethodError: weblogic.servlet.jsp.StandardTagLib.fakeEmptyBodyTag(Ljavax/servlet/jsp/PageContext;Ljavax/servlet/jsp/tagext/BodyTag;IZ)V
	at jsp_servlet._login.__login._jspService(__login.java:1016)
	at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
	at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
	at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:431)
	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
	at com.pearson.ph.phcore.presentation.servlets.CheckLoginFilter.doFilter(CheckLoginFilter.java:76)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
	at com.pearson.ph.phcore.presentation.servlets.CheckLoginFilter.doFilter(CheckLoginFilter.java:76)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
	at com.pearson.ph.itext.presentation.servlets.SessionFilter.doFilter(SessionFilter.java:87)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6297)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
	at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
	at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

Solution
Seems this is an issue with Weblogic server 8.1, when upgraded to Weblogic 8.1 sp4 the problem goes away.

Written by Ravi Nallakukkala on April 18th, 2007 with no comments.
Read more articles on Java/ J2EE and Servers.

IntelliJ Plugin TddTracker

This is one of those plug-in which a developer would love to have in the development environment, the main purpose of this plug-in is report the time taken to execute a JUnit.

Highlights (release 0.4)

Usage

Favorable

Unfavorable

For more information about this tool, IntelliJ plug-in repository here and user documentation here

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Tools.

UnitTest IntelliJ plugin

A tool for creating JUnit tests (class/ methods).

Highlights (based on release 0.303)

Usage

Favorable

Unfavorable

For more information on this tool here and User guide available here

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Tools.

Code generation of JUnit test cases

Found a good discussion on IBM site; but remember this is a discussion in 2003 things could have changed by now

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Uncategorized.

Fireworks IntelliJ plugin

This is a plugin meant for running all JUnits as a single test suite.

Highlights

Usage

Favorable

Unfavorable
NA

For more information on this tool here.

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Tools.

JUnitGenerator IntelliJ plugin

Continuing the quest for a JUnit generator tool, my next stop was with JUnit Generator – IntelliJ Plugin. Lets look at features and the fitments of this tool towards my requirement (Junit Generation for a given source code).

Highlights (based on 1.1.7 release)

Usage

Favorable

Unfavorable

For more information about this tool, go from here

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Tools.

JUnit 4 Synchronizer IntelliJ plugin

I started a searching for a free tool (which hopefully) will generated some JUnit test code for a given source code. In process of this search, as a first start point I started evaluating the plug-ins which are available for IntelliJ; JUnit 4 Synchronizer is my first stop in the evaluation process.

Highlights (based on release 0.1.1)

Usage

Favorable

Unfavorable

For more information about the plugin, go here

Written by Ravi Nallakukkala on April 16th, 2007 with no comments.
Read more articles on Tools.

Equals and hashcode Approach/ Implementation for Business Objects (Bo)

A common source for bugs while writing code Business Objects for relational database using Object Relation Mapping tools is the implementation of the Equals and Hashcode methods.

If you would like to know more about the Equals and Hashcode importance for an ORM Click here.

To summarize the ORM implementation, There are two types of keys: Technical Keys and Business keys.

Technical keys are the primary key on the for a table to uniquely identify a database row, these numbers are auto generated sequence number (Item Unique IDentification/ IUID).

Business keys are the Business primary (/ composite) keys which uniquely identify the business objects in the database tables.

One of the important factor while writing a equals and hashcode method is to decide on what attributes needs to go into these methods; Some guidelines for deciding the attributes for Equals and hashcode methods.

Implementation wise, Apache commons-lang has a very good implementation for hashcode and equals method. Here’s an example of equals and hashcode methods using the apache commons-lang.

@Entity
@Table(name = "APP_CONFIGURATION")
@SequenceGenerator(name = "OPS_SEQ", sequenceName = "SQ_CONFIGURATION_CNTR")
public class ConfigurationBo extends AbstractBo {

private static final long serialVersionUID = -5098377177228374794L;

@Column(name = “ITEMNAME”, length = 100)
private String name;

@Column(name = “STRINGVALUE”, length = 100)
private String stringValue;

@Column(name = “INTVALUE”)
private Integer intValue;

@Column(name = “TYPENAME”, length = 20)
private String type;

public Integer getIntValue() {
return intValue;
}

public void setIntValue(Integer intValue) {
this.intValue = intValue;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getStringValue() {
return stringValue;
}

public void setStringValue(String stringValue) {
this.stringValue = stringValue;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj.getClass() == this.getClass())) {
return false;
}
ConfigurationBo other = (ConfigurationBo) obj;

return new EqualsBuilder()
.appendSuper(super.equals(obj))
.append(this.name, other.name)
.append(this.type, other.type)
.isEquals();
}

/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return new HashCodeBuilder()
.appendSuper(super.hashCode())
.append(this.name)
.append(this.type)
.toHashCode();
}

/**
* {@inheritDoc}
*/
@Override
public String toString() {
return super.toString() + “[name=” + name + “, type=” + type + “]”;
}

}

Written by Ravi Nallakukkala on April 15th, 2007 with 4 comments.
Read more articles on Design and Hibernate.

Drive from Atlanta to Birmingham

It been long time that i had got an opportunity to demonstrate my driving skills on road, and was memorizing when did I had a good test for my good driving skills, the first thing that comes to my mind is a drive from Atlanta to Birmingham.

Let me give my driving background first, I’m always fascinated by Cars and a great fan of Formula 1 and in particular to Michael Schumacher and Ferrari. I’m used for driving manual gear cars with a drive on right side, mostly driven in Asia and United kingdom where traffic is considerable good, when moved to states, needed to drive a automated gear cars, not much of traffic on streets, cars hasa left drive (rigth traffic), to make life even difficult very polite drivers , low seep limits on a good roads and photo enforcement in most of the places :-)

Sometime back I was working in Atlanta, GA, the one place where I love to drive. Here most of the traffic drives is very very aggressively. I’m a frequent visitor to Phoenix, AZ; so any guess how does Birmingham come into picture? Yes its because of Southwest airlines. Couple of times I had to pickup my flight from Birmingham, according to maps, the drive time between the two places should be approximately to 2 hours 20Min’s (around 150 miles). After driving for a while a in Atlanta, thought its an 1 hr and 40Min’s drive and having obtained a boarding card, ideally a door to door of 2 hours and 30 - 40 min’s is an ideal time for drive (need to be a bit careful in time calculations, Alabama is in CST and Georgia in EST).

Already, I missed couple of factors,

The drive from Atlanta to Birmingham is on I20 from east to west; for most part of the freeway official speed-limit is 75miles/ hour. Every time I had driven from Atlanta to Birmingham, it was definitely never without action, excitement!

My Trip to Birmingham started on a bad note, Got stuck in traffic in Atlanta Just before I could enter I 20 freeway, It was a delay of 6Min’s, was getting nervous as I knew I’m on road which I have no knowledge about, and that’s the last southwest flight from Birmingham to Phoenix; so pretty much knew what should I do if I miss my flight :) . Once Entered into I 20, well its all mine, Friday traffic was there, but as long as I was in Georgia, the whole traffic moves at a higher speed so no real problems till 50miles, all of sudden a “Work Zone” sign for next 6miles; hmm getting interesting :) drove about a mile at reduced speed, then another surprise, slow traffic and eventually no movement in the car (may be 10feet) for 25 minutes, totally frustrated, saw a small gap in front of me, so moved around 3feet, here you goo….bang!!! its from the back, someone hit me from back! hmm stopped the car to check the damage, a small dent and its was a old lady driver who expressed her apology, considering time constraints immediately back to car; after 40 Min’s of near stand still situation, suddenly found my car running at 40miles/hour then slowly to hitting the speed limit on the road, car speed limit slow traffic, a quick mathematics says I need an “average speed” of 80miles + 10-15minutes for car parking and security + boarding (Assumption was Birmingham is a small airport). May times, was revisiting my decision, would it be good to return back ? but same time wanna to give a try.

The opportunity to test driving skill was presented to me in a most beautiful way, drove to the potential of my car for next 50miles, the expected average speed was so high that my speed is not making any significant impact on the overall time, so complete 100miles; here comes another surprise, “work zone next 6miles”, hmm I don’t remember if I had followed the speed limits, but mostly it was a empty work zone roads! after that its all driving on I20 in a deep forests no sharp turns and not many narrow roads, but once reached the outskirts of Birmingham, traffic was there, not so crowded, comparatively, the average speed seems to be low in Birmingham, reached airport 13Min’s before my flight schedule, car parking in Birmingham was the best (just 1min walk), I parked in C12 slot (which later realized is the nearest place to reach airport security), a 30sec run, I’m in airport, a minute to find the security location and if my flight was still there, around 10 Min’s left at in front of security, Luckily, I’m the lone one at security counter (small airports are handy ah :-) ) 6minutes left,1 minute run to boarding area, “well, you are too close sir” was the greeting I got! Sounded like honey to ears, ” I made it”.

Now thinking back, the only thing, I was missing the other day was “Rain”, I love driving in rainy conditions, it would have been awesome had it rained, although I wasn’t sure If I could have make it to my flight :-)

Written by Ravi Nallakukkala on April 13th, 2007 with no comments.
Read more articles on Uncategorized.

Things I hate in IntelliJ compared to Eclipse

I come from a strong Eclipse background and in my new assignment, my project team uses IntelliJ IDE; So thought let me check this IntelliJ editor. As expected (after being loyal to Eclipse for many years) first I noticed all the bad things about IntelliJ, Here’s my list of bad things (Let me know if there is a better way of using IntelliJ to get around my problems)

Written by Ravi Nallakukkala on April 11th, 2007 with 2 comments.
Read more articles on Editors.

« Older articles

No newer articles