sonalika kulkarni

Greenhorn
+ Follow
since Dec 10, 2010
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sonalika kulkarni

In my case Object is getting saved in a blob format but while we try to read and save that blob in a file it is not getting read giving EOFException and available() method of ObjectInputStream shows 0 that means there is nothing to be read . Then I checked in DB there was data in a blob format.
Can anyone help in in understanding that how hibernate stores an object in a blob format. What I analyzed is it is adding some special character while saving object in DB so that not able to convert byte to object format, as it is giving EOFException . The code I am writting is

ByteArrayInputStream bais;
ObjectInputStream in;
try {
bais = new ByteArrayInputStream(rcmCommunicationBean1);
in = new ObjectInputStream(bais);
ObjectStreamClass myObject = ObjectStreamClass.lookup(
Class.forName("com.successfactors.rcmcommon.bean.email.RCMCommunicationBean"));
resolveClass(myObject);
Object obj = new Object();
while ((obj = in.readObject()) != null) {
if (obj instanceof RCMCommunicationBean) {
rcmCommunicationBean = (RCMCommunicationBean)obj;
}
}
in.close();
} catch (IOException ex) {
ex.printStackTrace();
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
Hey after taking with H.R. I made a negociation and he approves and send me the salary structure which I have accepted may receive offer letter in 1-2 days. Thanks coderanch rocks
10 years ago
Actually the issue is that in my DB I have blob that refers to class location with some different classpath say "A.b.c.myclass.java" and after the code has been refactored the location for myclass.java has been changed to "d.g.f.myclass.java" so while data fetched from DB tried to find "A.b.c.myclass.java" which is not there now as its new location is "d.g.f.myclass.java" and hence giving me SerializationException. So what is the best way to handle this exception in this case.

Arun Kumarr wrote:That's exactly why we need to use serialversionUid in our class when we are implementing serialization.


how using serialversionUid can help us in serialization.
I in our project we have a refactoring of package structure recently. Now the thing is that we have blobs in the table and templates that refer to earlier package structure. and now its giving SerializationException while reading blob which stores Serialized objects in it. What should be the best way to handle and update this exception?
Sorry I missed that.
My question is why and how reflection causes performance issue making it down by 90%
10 years ago
When the reflection is used the performance on code involving reflection can decrease even to 10% of the perfomance of a non reflection code.
10 years ago
Thanks all of you for advice and concern. Will update you if i am able to negociate and get offer.
10 years ago

Jeanne Boyarsky wrote:
Well are you? Are you willing to join at the package they are offering? You have to know this to be able to negotiate.


yes i am because the cmpny is gud but i dont want to sound like one, i wanna go for little negotiation. What should be my move to take ball little in my court. your suggestion will be helpful as this is my first chance to go for negotiation.
10 years ago

Thakur Sachin Singh wrote:multiple catch block gives us more specific information for any exception...if we put super class then we lost that information...so multiple catch is good for real life problems if we want more related information about any exception...you got it.


I that could be the case but not always say we are using like IO operation then it will be helpful to catch specific exception or we are working for date formatting. But in case of we are just logging the exception then also we should go for catching specific exceptions?
10 years ago

Lester Burnham wrote:
I'd advise to wait as long as you can (meaning, as long as you don't have to make a decision regarding the other company). Unless they specifically say to contact them sooner, wait at least a week between being in touch. And finally, don't make it sound as if the decision hinges completely on the CTC; companies don't like to hear that, and they don't like to hire employees who think that way.


But the thing is that i don't want to loose this opportunity of joining this MNC also if i call them again then it means i am ready to join at package they are offering so my negociation chances will be less. and in case i dont call them then they may hire someone else so i b loosing my ticket there. What should be the best way to go for.
10 years ago
Yes i tried that
public class Test {
public static void main(String[] args) {
throeException();
}

private static void throeException() {
int arr[] = new int[5];
try {
System.out.println(arr[22]);
} catch (IndexOutOfBoundsException e){
System.out.println("caugh t: "+e);
}
}
}
it gives : caugh t: java.lang.ArrayIndexOutOfBoundsException: 22

so it means that i can get the information of the exception by catching it in any super type of exception. So how does it matter if i caught it in IndexOutOfBoundsException or ArrayIndexOutOfBoundsException
10 years ago
HI,

We know that we should have multiple catch blocks with specific catches the code can throw. I have 1 simple query
say we are working with indexes and we can have either ArrayIndexOutOfBoundsException or
StringIndexOutOfBoundsException then why cannot we catch them by saying 'IndexOutOfBoundsException'. If say in both the cases we are printing the error to log.
In general if we say why we should have multiple catches if same catch can be caught by super class.
10 years ago
Hey henry then in that case will h.r. still says that he will check and get back or will he simply says no. because not saying no is something that makes it complex and restricting me to go for negociation.
10 years ago
On the day of interview only they have asked me to sign 1 form where they have asked my current CTC , I told them that in few months i b getting more they asked me to write that also. and then asked my expected CTC and if i have any other offer in-hand. that time i said i have no offer and told them my expected ctc he checks my cmpny and clg name there itself and told his offer and then he himself said that its less than what i am expecting and said that he needs to check and let me know. But after 3 days where over i called and asked him he said its salary issue and he will check and get back at that time i said i have other offer which is paying more but still i wanna work with your cmpny but with my expected CTC . My expected CTC is double my current CTC and what they are offering is (my current CTC + 30% of my current CTC). They also know that i want to relocate where there cmpny is.
10 years ago