Nikhil Pasupukuntla

Greenhorn
+ Follow
since Jun 04, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Nikhil Pasupukuntla

Hello,

I am struck with a strange problem in my application since morning. When i try to run the following query using ibatis in my application



to get the total count of a database column ,the query returns null. When i remove the filters on product and customer in the query the query runs perfectly and returns the count. Its only when the filters for product or customer is present query returns a null. Below is the query generated by ibatis for the above sql map with only product filter.

SELECT SUM(message_count) AS trans_count FROM oms_product_summary
WHERE created_dt BETWEEN to_date(?,'mm/dd/yyyy') AND to_date(?,'mm/dd/yyyy')
[java.sql.PreparedStatement] - {pstm-100028} Parameters: [10/01/2011, 10/11/2011, LIDB]
[java.sql.PreparedStatement] - {pstm-100028} Types: [java.lang.String, java.lang.String, java.lang.String]

When i run the above query from SQLdeveloper it works perfectly!. Could any one with expertise on Ibatis point me what am i doing wrong here.

Mark,

Thanks again. EHcache and seems like an easy standard solution for my problem. I see that EHcache integrates easily with Hiberate, its just some simple configurations.I am using ibatis for my project, i dont see any articles for integrating ibatis with EHcache on their website. Could you point me to good tutorials for integrating EHcache with ibatis.
13 years ago
Mark,

Thanks for the input. I didnt know of tools like Ehcache. Was reading the documentation and code samples but too much to get it in a day. My reason for creating a daemon was to periodcally(say every 2mins) query the database to get the latest data from it which keeps changing. While Ehcache solves my problem of caching the data but i wanted to know can it refresh the data in the cache periodcially from the database or do i need to force it using a process? I am using Ibatis and Spring for the implementation.
13 years ago
Hi,

I am new to Spring and here is what I want to do.
I want to create a daemon thread on application startup which periodically pings the database and gets the data into the memory(collections) to be used up by the web application.
This thread must have access to the other beans (to update the DB for instance).

Here is my problem:
I am planning to use Spring for the dependency injection including for my "daemon bean". However, i can do it easily through a servletcontextlistener to start up my thread. If i do that then I will not be able to leverage the dependency injection if I start my thread this way.

My question is therefore the following:
How to start a daemon thread at application startup time in a Spring application?

Your help would be greatly appreciated.
13 years ago
Found the answer if anyone come across the same problem . We need to add mapping to the "weblogic.servlet.ServletServlet" in the web.xml. This servlet is similar to the invoker in tomcat.
14 years ago
Hello,

Currently we use the invoker servlet for the servlet mapping in apache tomcat server and now we are planning to move to the weblogic server 11g . I wanted to know is there invoker servlet available in weblogic server similar to the one in apache tomcat. I did some research online but i dont see much information on this. If there is a invoker servlet in websphere, where to find more information about this?

14 years ago
Hi,
I am new to Maven. our company is switching from ant to maven for creating the application builds . We use the subversion repository for storing the code. I wanted to know is there any plugin in maven to automatically check out the code from the SVN repository and compile and create the build. Also, i read that it is recommended to follow the standard directory structure of maven for storing the code. Does that mean the repository directory structure also should follow the maven standard(i.e; src/main/java for java code and src/main/config etc), since we are using maven for creating the build. Any suggestions on this would be appreciated.

14 years ago
Hi David,

Click on the open perspective button( a small square box) usually on the right top corner in eclipse window and select the perspective you want.
Hi Gaurav,

If you are using any IDE like eclipse or NetBeans you can debug your program by adding NullPointerException breakpoint and see where the problem is.
14 years ago
Hi Sravani
Try request.getParameter("jsessionId"). That should work.
14 years ago
JSP
Hi Rajani,

First of all the class to be instantiated must follow all the rules of java bean. http://en.wikipedia.org/wiki/JavaBean
14 years ago
JSP
Hi Jill,

You can store the username as a session attribute in the servlet .
14 years ago
Hi Rahul,

Do you get null values for both color and brand? This sentence is little confusing "I Get null values for color ie "col",so is there any way that I can get this values of color & brand." If its just color value that is null then may be its the issue with not using the right attribute name while retrieving the value.
14 years ago
You have to set the classpath variable i.e; point the JAVA_HOME variable to the java lib directory
14 years ago