Ankit Chandrawat

Ranch Hand
+ Follow
since Jan 03, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ankit Chandrawat


I am trying to call a REST web service on https and using the jks file as shown below:



I am getting a "javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure" error. Interestingly, when the same program runs in Java 1.6 everything works fine. Is there a different way of implementing this in Java 1.7 ?


I executed the standalone java file with VM -Djavax.net.debug=ssl and below is the chunk of the console output

>
6 years ago
Hi Bear,

Thanks for the response. But the object here is to first fetch those list into different variables. As those lists will have to be used further for different purpose.

7 years ago
JSP
Hi,

I have an object of type List<List<String>> on JSP. This object has 3-5 List<String> objects. I want to iterate List<List<String>> object using <c:forEach> and assign the List<String>>objects to variables using <c:set>. How can I achieve this?

Thanks in advance
Ankit

7 years ago
JSP
The correct word for it is not sorting. Apologies for the confusion. But it has an order and the order is specific. It's more like placing the element at designated places.
8 years ago
The thing is, there is an order to it. But there is no logic behind it.
8 years ago
If I had known the reason or any sort of logic behind this I would have worked on writing a Comparator on this. But there is no logic to this and that's why I am baffled.
8 years ago
There is no reason for this. It just has to be like this. That is why I am not able to understand how to work it around ?
8 years ago
Hi,

I have a Map<Object, String> that I need to sort with values in no particular order What I mean is currently the Map has the values like "A","B","C",D",E" for respective keys. I need to sort it as "C","D","E","A","B". I know we can write Comparator when there is some logic behind sorting. But I am not sure how to sort the Map this way.

Thanks in advance,
Ankit
8 years ago
Hi,

I have a list of Objects. The Object has a Map and the Map has a key lastReplicatedDate. I need to sort the list of Object using this lastReplicatedDate in descending order. How do I achieve this. I want to implement is using Collections.sort(List, Comparator) and hence want to write a Comparator for this.

Thanks in advance,
Ankit
8 years ago
Hi,

I have checked out the project using "Check out" option on the SVN branch. Now, when I am writing my code I am unable to see the autocomplete feature working on eclipse. I have tried numerous things but with no success. Let me name a few:

1) When I add the Project Facets --> Java to the project, all I can see is a bunch of errors in all over my code and then I get an error in my package declaration "The declared package "com.mercer" does not match the expected package """ and on my class declaration I am getting multiple errors:

Multiple markers at this line
- Access restriction: The type SimpleTagSupport is not accessible due to restriction on required library C:\Program Files\Java\jre7\lib\ext
\jsp-api.jar
- The type HelloWorld is already defined

I am also attaching three screenshots of my workspace.

Please let me know if I need to provide some more information.

Thanks in advance
Ankit

----------------------------------------------
Just an update:

I performed the following steps:

1) Go to the Build Path settings in the project properties.
2) Remove the JRE System Library
3) Add it back; Select "Add Library" and select the JRE System Library.

and now I am getting the error "The type HelloWorld is already defined" for all my classes but autocomplete is not working.
Hi Miku,

Can you be more precise please, exactly what and how needs to be done ?

10 years ago
But I am not using AspectJ.
10 years ago
Hi,

I am using <tx:annotation-driven /> as shown :



and the error it is giving is :

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chatSessionDAO' defined in file [/local/jboss-eap-4.2/jboss-as/server/mercer02/deploy/mercerhr.ear/mercer.war/WEB-INF/classes/com/mercer/chat/app/dao/ChatSessionDAO.class]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: com/mercer/chat/app/dao/ChatSessionDAO$$EnhancerByCGLIB$$c2bd3f90$$FastClassByCGLIB$$bc114739, method: invoke signature: (ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Inconsistent stack height 2 != 1


here is my ChatSessionDAO class :

10 years ago
Hi,

I am getting this error while I am restarting my server. I am using Jboss and Java 1.5 with Spring and hibernate 3.0. The OS is unix.



Here is my ChatSessionDAO.java



Updates: I just found out that the eror is coming due to this :

<tx:annotation-driven/>

Is there any way around to solve this issue ?


Thanks & Regards,
Ankit Chandrawat
I did a few changes like added <tx:annotation-driven/> to my applicationContext-db.xml and added @Transactional to the DAO class. I am able to go one step ahead now but facing

ERROR [LazyInitializationException] failed to lazily initialize a collection of role: com.ifs.app.model.adaptors.ScheduleGroupAdaptor.vendorServiceTransports, no session or session was closed

Its because after the data is fetched from the database I try doing a lazy loading from my code as follows:



In the while (it.hasNext()) it throws the error. Please guide me how to go about this now ?