Rajasekhar Karanam

Greenhorn
+ Follow
since Sep 18, 2011
Rajasekhar likes ...
Hibernate Spring Java
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajasekhar Karanam

In our project, we have an entity 'Restaurant' with nearly 30 fields(some have relationships with other entities). So, every time we need a 'Restaurant' object even for a few fields, all the others are retrieved. This effects the performance. So, in the hbm file we wrote two classes both pointing to the same physical class and same table in database as shown below.



In one of the DAO implementations, we are using Criteria which takes 'RestaurantLite' and returning list of restaurants as we have to work with only restaurant objects as shown below.



Now we want to remove all hbm files and use annotations. So how the same can be done using annotations for entites? Do we need to create an extra class 'RestaurantLite'? If then, how the above criteria returns 'Restaurant' objects??
Hi Guys,

In Kathy and Bates book, it is given that "Once the control jumps to catch block from the try block, the balance part of the try block is never executed."

After a few paras, it is given that, "One of the benefits of using exception handling is that code to handle any particular exception that may occur in the governed region(try block) needs to be written only once. There may be three different places in our try block that can generate a particular exception, but wherever it occurs it will be handled by the same catch block."

My question is, if the control never returns from catch block, how can it handle the same exception in the remaining part of the try block?
8 years ago
Hi Guys,

I am getting this error while executing a C program in NetBeans IDE.

CLEAN SUCCESSFUL (total time: 64ms)

mkdir -p build/Debug/MinGW-Windows/_ext/198714583
rm -f build/Debug/MinGW-Windows/_ext/198714583/HelloWorld.o.d
mingw32-gcc-4.7.2 -c -g -MMD -MP -MF build/Debug/MinGW-Windows/_ext/198714583/HelloWorld.o.d -o build/Debug/MinGW-Windows/_ext/198714583/HelloWorld.o ../Interview\ Preparation/HelloWorld.c
make: mingw32-gcc-4.7.2: Command not found
make: *** [build/Debug/MinGW-Windows/_ext/198714583/HelloWorld.o] Error 127


BUILD FAILED (exit value 2, total time: 462ms)

Also can someone explain me about executing multiple C programs in the same project.

Thanks in Advance!
8 years ago
Here is a simple solution for your problem.
9 years ago
Actually I checked it in some browsers but couldn't find any clue! May be bug is in the javascript code!!
Acutally empdetails.jsp is working! It is showing emp details in xml file! But when this html is run in NetBeans IDE, the browser couldn't show the required result in boxes when button is pressed!
I couldn't get empname and empsal in the textboxes, when 'Get Details' button is pressed!
Thanks guys!

I have used javax.mail.PasswordAuthentication and edited 3 mistakes
Line 12 smtp.gmail.com
Line 29 Authentication is corrected
Line 30 Password must be string!

And Now Its working! Thanks a lot!
10 years ago
Here is the error message:
Exception in thread "main" javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at javax.mail.Service.connect(Service.java:329)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:194)
at javax.mail.Transport.send(Transport.java:124)
at GoogleToYahoo.main(GoogleToYahoo.java:39)
10 years ago
10 years ago
Guys, Please make me clear about these topics in Servlets.
10 years ago
Guys, I got it! Its a silly mistake! I haven't included the ojdbc14 file in this project!

I try to read data from this xml file and post it into the table in database!

<?xml version="1.0" encoding="UTF-8"?>
<jobs>
<job>
<id>jp</id>
<title>Java Programmer</title>
<minsal>30000</minsal>
<maxsal>80000</maxsal>
</job>
<job>
<id>Dp</id>
<title>.Net Programmer</title>
<minsal>20000</minsal>
<maxsal>60000</maxsal>
</job>
</jobs>
Thanks Suhrid! You made me more ambitious in taking the test. I am planning to take the test within 5 months.
10 years ago