Crazy Idea


java.lang.VerifyError in a tomcat 7.x webapp
April 25, 2012, 11:46 pm
Filed under: Uncategorized | Tags: , , ,

Ahoy there! 

I have a webapp(built using maven 3.0.3) deployed into Tomcat 7.0.23. After I log into the app, I get this error

javax.servlet.ServletException: java.lang.VerifyError: (class: org/apache/jsp/ChLogin_jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Inconsistent stack height 0 != 1

Just to be sure, the WAR/web-inf/lib folder does not contain either servlet/jsp/jstl libraries. I also don’t precompile any of the JSP files.

Here’s the sequence 

1) user goes to login.jsp page using a GET request . This works just fine

2) user enters credentials and submits it to jsp2 using a POST request

3) java.lang.VerifyError happens when jsp2 constructor is being invoked by the servlet engine.

What is the problem ? what should I be checking for ?

Just so you know, this webapp works just fine if I deploy it into Tomcat 5.5 (I just have to add jstl to the dependencies)

Thank you,



How to view certificate(s) details of a LDAP server?
March 20, 2008, 6:32 pm
Filed under: 1 | Tags: , , ,

hi there,

if I connect to a https server, I can click on the icon(status bar) and find out which certificate(SSL/TLS) is installed on the server.

How can I do the same with a LDAP server ? Which (free/opensource) client can show me the certificate information to the connected LDAP server ?

I googled for any clues — Not much help. Found some source code on novell’s site :

http://developer.novell.com/documentation/samplecode/jldap_sample/index.htm

Do users have any tips/favorite clients that they use which has such features ?

Even if you have some source code that might do the trick (java/C++/C), will work for me.

Thank you very much for the info.

BR,
~A



Jdbc : Why doesn’t Oracle’s driver support READ_UNCOMMITTED ?
September 7, 2007, 6:56 pm
Filed under: Uncategorized

hi lazy Web,

I tried to change the Transaction Isolation level to see what my unit test(spring/hibernate/dbUnit) was doing.

Class.forName(“oracle.jdbc.driver.OracleDriver”);
Connection conn = java.sql.DriverManager.getConnection(url, user, password);
if (null != conn) {
System.out.printf(“%s%n”, conn.getTransactionIsolation());
conn.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
}

and got the following exception

2
Exception in thread “main” java.sql.SQLException: READ_COMMITTED and SERIALIZABLE are the only valid transaction levels
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:1678)
at JdbcTest.main(JdbcTest.java:17)

So, why doesn’t Oracle JDBC driver let me do dirty reads ?

Does anyone out there know of a tool (java or otherwise) that can let me do this ? I have TOAD : does TOAD support a way to do this ? How about ruby/Python tools ? I’m on windows XP. So, it would help me if you could refer  me to windows specific OR cross-platform tools.

Thank you for any pointers,



openJDK/Java 7 : RFE
August 30, 2007, 12:20 am
Filed under: Uncategorized

Hi There,

Not sure if someone at sun/JCP or those who know how JCP works is listening.

On Windows/Win32, for over 10 years, we’ve had an API called DebugBreak(). At runtime, when the the program calls this function, the OS will prompt the user to activate a (specified) Debugger. For most purposes, this debugger is usually the developer’s IDE like Visual CC++ or Borland C++. If the application has debug symbols and the debugger has the associated sources, then the developer can debug with full source!

When I moved from the Windows to the java world, I’ve been yearning for something like this.  I read (http://today.java.net/pub/a/today/2007/08/09/looking-ahead-to-java-7.html) that it appears that Jdk 7 is currently slated for spring 2009. Given that we have enough time, I’m wondering if there’s enough time to add something like DebugBreak(). I know that not all OS have support to do that. What would it take to do it on Windows where the majority of Java developers live ?



Java Swing Vs VB 4.0
July 17, 2007, 5:14 pm
Filed under: Uncategorized

Java’s weak point has been its Rich client programming capabilities . Especially, the ease of use for building applications.

I used to develop for the Windows environment before doing Java. I used Borland C++, VC++ and VB. Whenever, people boasted about Java GUI apps, I always felt nostalgic about my windows IDEs and how easy it was to build a GUI.

I saw this link from http://www.jroller.com/MasterMark/entry/java_users_group_cologne_ide
talking about an IDE shootout. He talks about Netbeans Matisse Swing GUI toolkit/framework/wizard that helps people build GUIs in Java and how he feels “Hey, we’ve reached parity with VB at a last! That’s great.” Followed
immediately by the thought “Wow, that only took a decade. Meh.”

Although he did not mention VB 4.0 in the above quote, it’s kinda assumed. So, when will a Java IDE going to be at parity or better than the current VB as far as GUI development capabilities go ?

Process Perfection

I still haven’t seen a single Java IDE have packaging tools like VB (Installshield lite/express). Granted Java has been better in terms of unit testing/coverage, etc but the (till now) missing “GUI building” functionality was costing it much. The fact that AJAX is making desktop apps envious and ruby/php/.NET/FLASH improving on Rich-Client functionality, there is little time to be lost if Java has to be contender for building Rich Client apps.

Europa from Eclipse is a good step in the direction. Idea is trying to keep everyone happy : it appears that they don’t share sun’s enthusiasm as far as Swing is concerned :-)

Nice Interesting times…

Powered by ScribeFire.



tags
June 22, 2007, 11:52 pm
Filed under: Uncategorized

Mark Watson, in today’s post on “Everything is Miscellaneous” book review  quotes

“Rigid tree-structured indexing allows parent/child associations but fails to allow general associations between objects. Example: multiple tags allow users to identify information the way they want to access it.

  • When applying tags indicating that an object belongs to a group, it is good to allow a numeric value. Example: Mary is a: manager (0.75), technical guru (0.9), good in meetings (0.25)

That is a cool idea! The sum of the individual components don’t quite add up to 1. Would be nice to see more examples of these!

Probably, del.icio.us should start having a new experimental site for doing it. Now that google also has a bookmarking site, it’s a good time to try this out!

 Related idea

I wish every enterprise had a tag/bookmarking site internally so that people could quickly  lookup what they were after! Wonder if google appliance has a way to search for tags ? But, in order to do that, people need to save some tags in each doc. What if they let people tag  the docs in the company implicitly and explicitly and then a user can search based on tags ?



interviewing techniques for java web developer
June 11, 2007, 10:46 pm
Filed under: Uncategorized

These days, an enterprise developer works on multiple source files

a) xml/XSL

b) java/C#

c) SQL

d) HTML

e) javascript(ECMAscript)

f) CSS

The xml itself can/will contain different grammars depending upon the payload (config, build, content, rules, etc). So, when someone interviews for a position, it is nice to give them a lot of code (say an eclipse/netbeans/idea project) and ask them to add a new feature to the code.

It’s NOT only important to know that the developer understands how to read existing code (like say quicksort/bubblesort/stringReverse) BUT also, how to add new code to existing code(http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/). If a person can cross that chasm, then such a person can go to the next stage of interviewing.

It’s important to let the interviewee(candidate) do this for all the artifacts that they are expected to create/USE(java/xml, SQL etc). It’s also good to have some sample code available for them so that they can do copy/paste. This is so that the candidate does not fail just on syntax.

If, as Joel says, it takes smarts + “getting things done” attitude to succeed at his company, the above exercise should take care of “GETTING THINGS DONE”. I guess the puzzles and related questions go a long way at testing a person’s smarts ?

Comments ?

BR,

~A




Follow

Get every new post delivered to your Inbox.