This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Naresh Shanmugam

Ranch Hand
+ Follow
since Jul 16, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Naresh Shanmugam

When STS tries to connect to HTTPS repository it throws the following error

I tried adding the certificate to the cacerts file using the following command

keytool -import -alias mavencertder -keystore "C:\Users\a183924\Downloads\Java\jre1.8.0_152\lib\security\cacerts.jks" -file C:\opt\apps\msgctr\certs\maven_der_cert.cer

but sill STS(Eclipse) is unable to download the maven dependencies. Does any one know how to get rid of this?
5 months ago
Thank you Tim and Stephan for your response.

As Tim mentioned,

It isn't the jar you think it is. In some instances, there's an API jar that defines the standard interfaces and an implementation jar that actually provides the services themselves. So you might be pulling in an API jar from some other part of the POM and thinking it's the implementation jar.

the JMS Jar that I had mentioned in my post was getting downloaded as a transitive dependency of some other dependent component. I figured this out by opening the pom.xml in STS (Dependencies Hierarchy View) that showed all the transitive dependencies. 
Since we dont have control over the external pom. We used the following code to remove that JAR file from the WAR file.

I am positing this so that it would be helpful to some one else.
7 months ago
I was under the impression that when I make the "scope" of a "Jar" as "provided" in maven, then that would not be included in the WAR file(available only at the compile tile). Hence I mentioned scope as "provided"(JMS jar) in the pom.xml file, but I still see that jar file in the lib folder of WAR file. Does anybody know What I am missing here or is my understanding incorrect?

Thank you!!
7 months ago
Thank you for your response Jeanne. I meant class with full of static methods. Is there any difference between a class with full of static methods and a singleton class where only one instance exists per JVM. In my project service classes and DAO classes are singletons, why cant they be static methods in a class?
11 months ago
Is there any reason why business service classes(stateless) are designed as singletons(just once instance in the application). If the business service is stateless it could be designed as a static class as well. Can someone share some information on why it has been designed as a singleton please? What advantage does a singleton class has over the static class?
11 months ago
In the SOAP Payload, is there any specific parameter which 'AxisServlet' especially look for? If yes what is that parameter? How does a specific skeleton be mapped for that operation?
Say for an instance, in the Struts application, we pass the action name to be executed in the URL and struts.xml contains the mapping between the action name and fully qualified java class name, likewise is there anything in AXIS2?
2 years ago
In JAX-WS the URL is the same, no matter how many operation an web service supports. How does Axis servlet identify the operation that has to be executed for a specific request, as in the right Skeleton?

From the web.xml I can make out all the requests are sent to 'org.apache.axis2.transport.http.AxisServlet'. How does AxisServlet know the operation to be executed. Is there any specific parameter which it especially look for in the request XML? If yes what is that parameter? How does a specific skeleton be mapped for that operation?


<display-name>Apache-Axis Servlet</display-name>
2 years ago
This has been resolved. I am posting the solution so that it might be helpful for some one else:

We had updated “UploadReadAheadSize” property of IIS server to 100 KB, whose default size was 48 KB. As it was just 48 KB, we were unable to get past the IIS Server.
4 years ago
We use apache soap 2.3 jar in our project to make a web service call. When we try to send over an XML of size 58 KB with HTTPS Webservice URL we end up with an exception, however we could successfully transfer the same XML file with HTTP webservice call. Just wondering if there is a limit in the size of data sent over HTTPS?
Stack Trace:

We tried using AXIS Jar too, however ended with similar kind of exception:

We use Weblogic 10 server. If there is a way to increase the size of data sent over HTTPS,, Please let me know.

4 years ago
Thanks for your reply Vanessa and Bill, We finally found the root cause of this issue, it is because the user does a double click on a link within a nano seconds(duplicate click), so the application receieves couple of requests, where the first request ends up with the exception due to the business requirement and it invalidates the session, and the second request(which is nothing but a duplicate submit by the user) is trying to access the same session which was invalidated, thats the reason for this exception. I am posting this because it might be useful for someone else,, thank you..
5 years ago
We get this exception very frequently, it says something like "HttpSession is invalid" and then "ReplicatedSessionData.setAttribute", does anybody have any idea on this?. What i understood is if we try to get/set from the session after invalidating it, we would get "HttpSession is invalid", but in our current flow we didnt invalidate the session at all. Is it something to do with "Weblogic" (ReplicatedSessionData) or cluster?? Please advice

5 years ago
I am getting the following exception, from the following code, the exception is at line 12(com.project.findList(, "tx.rollback()"

has anyone faced this exception before or any idea how to overcome this
Thank you Bill, will implement your suggestions.
First of all thank you Bill for your time in responding to this, the problem with the current code is the session management, i.e even though we open a new session by using "sessionFactory.getCurrentSession();", the session is getting closed automatically, the session object is not available for us, we are not finding any difficulty in managing the transaction. I think the code below is something to do for transaction management

Please advice if this is going to solve the session object issue
In our application, we get this "org.hibernate.SessionException: Session is closed!" very frequently and it is not consistent, at some point we would get this exception, and at some point we dont get this, Well i googled about this exception and also searched in Javaranch site, but didnt help me. if some body knows what is causing the issue please advice.
The actual exception:

ApplicationContext.xml File:

hibernate.cfg.xml file

sessionFactory object created in the applicationcontext.xml file is injected to all the DAO classes and we get the session object using the following statement in the DAO classes:

The exception is thrown at "Transaction tx = session.beginTransaction();" line, since the session is already closed, when we try to begin the transaction, but it is very clear that we are getting the new session object, but some how for some reason it is automatically getting closed, not sure why, main problem is this exception is not consistent, for a single use case it throws this exception at some time and it doesn't at other times, I am not even sure like how to reproduce this. I learnt that a session object has to be created for a request level, some how it has not been followed in ours. If some one have any thoughts to get rid of this exception please share