Pranav Pal

Ranch Hand
+ Follow
since Nov 04, 2007
Merit badge: grant badges
For More
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 Pranav Pal

What is the difference between Oracle Certified Professional Java Web Component Developer (1Z0-858) and Oracle Certified Expert Java Web Component Developer (1Z0-899) exams with regards to topics covered and difficulty level?
Which of these exams should one take?

I am using Quartz scheduler for scheduling purposes in my project. I need to gather statistics like when, for how long, and how many times a job was run. I want to use Spring AOP for the same. For this, I am making Job classes spring-managed beans. Spring creates a Proxy class for each of the Job classes. But now when Quartz tries to execute this spring-managed Job, I am getting InstantiationException for the Proxy class created for the Job by Spring.

org.quartz.SchedulerException: Problem instantiating class '$Proxy6' [See nested exception: java.lang.InstantiationException: $Proxy6]

Can anybody please suggest a solution for this problem?
11 years ago
I have following code:

Compiling the above code gives following error: process(java.util.Map<java.lang.String,java.util.HashMap<java.lang.Long,? extends core.Fruit>>) in core.Test2 cannot be applied to (java.util.Map<java.lang.String,java.util.HashMap<java.lang.Long,core.Fruit>>)
1 error
Can anybody please explain the reason of this error?
11 years ago
The eth0 interface of my system is assigned the IP address
I have several logical interfaces on eth1 physical interface, with different IP addresses assigned.

When I run wget command, it takes default bind-address as the address of eth0 (

What should I do to make the default bind address for wget as the address of one of the logical interfaces (without specifying the --bind-address option)?

11 years ago

In my program, I am trying to open a new file for writing.
But while creating the file I am getting the following exception:
IOException:Too many open files.

Contents of the /proc/sys/fs/file-nr while running the program is:
2550 0 736700

Can anybody explain the cause of this exception?

12 years ago
If I have to use sockets, does it have to be SSLSocket?
I have a server running for requests from client.
Client will send requests using cURL or browser and it uses HTTPS protocol.
In this case, is it mandatory for my server to use SSLSocket for establishing a connection or a normal Socket would work?
I am getting the exception:

java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader

while executing following line:

sessionFactory = new Configuration().configure().buildSessionFactory();

What can be the reason for this exception?
I am developing a web-appliction using NetBeans IDE.

Also, I am using hibernate for database access.

Where should I put the hibrnate.cfg.xml file and other configuration(mapping) files for hibernate in the default directory structure provided by NetBeans?

Thanks in advance..
I have UserDomain class corresponding to table user_domain and having fields userId and domainId.

In a function I have following code:

When I run this code, passing questionId and doaminId as arguments to the function, I am getting exception
java.lang.ClassCastException: java.lang.String
at this line:

What can be the reason for this exception?

Thanks in advance

[ May 19, 2008: Message edited by: Pranav Pal ]

[ May 19, 2008: Message edited by: Pranav Pal ]
[ May 19, 2008: Message edited by: Pranav Pal ]
I have found that the reason why I was getting exception was that I had mapped a primitive property (active - boolean) to a nullable column (ISACTIVE). Since primitives cannot be null, one cannot map it to a nullable ccolumn. I was not getting the same excpetion for isPaidUser because the type declared for isPaidUser was Boolean (Wrapper class) and not boolean (primitive).

Thank you Mark and Jaikiran for your help

Originally posted by Jaikiran Pai:

I don't know, how you have changed the column definition. But have you also ensured that when you changed the column from varchar to boolean, you even cleared off this column contents (might be dumb question, if the database already takes care of clearing the contents of the column when you change its schema definition )

I didn't need to change the contents as the values for STATUS was NULL in all the tuples.
I have changed attribute name to "active" and getter/setter methods are now isActive() and setActive()

Still I am geting exception:
org.hibernate.PropertyAccessException:exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.bean.User.setActive

Code for user.hbm.xml

Code for (Bean)

I have an User table in my MySQL database. I changed one column of that table from STATUS(varchar) to ISACTIVE(boolean).

Now when I call any getter method of the User bean, which corresponds to the User table, I get following exception:

exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.bean.Expert.setIsActive

What can be the reason for this?

I have appropriately chaned the user.hbm.xml file and bean class

Thanks in advance