Naresh Shanmugam

Ranch Hand
+ Follow
since Jul 16, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Naresh Shanmugam

Thank you Carey Brown.

Some times the upstream can send additional name value pair, which we dont know. since we dont know all the possible keys of student class, can we use any other datastructure like HashMap<String, Object> ? The value here is Object type because emailList, phoneList is of object type but studId and Name are string type. Is there any other datastructure we can use since we dont know all the possible keys?
4 years ago
Hi,

can you please share your recommendation:
I am getting an XML in the below format from upstream system. I would like to convert into a JAVA POJO object. Since it is a key value pair,
1. Is it ok to use HashMap?
2. Is HashMap<String, Object> ok for this? since the value can again hold another name value pair? Is it a good practive to "Object" generic data type in Hashmap?

4 years ago
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?
6 years 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.
6 years 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!!
6 years 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?
6 years 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?
6 years 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?
8 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?

<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
</servlet>
8 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.
10 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.

10 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..
11 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

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

has anyone faced this exception before or any idea how to overcome this
Thank you Bill, will implement your suggestions.