Ashok Mor

Ranch Hand
+ Follow
since Jul 17, 2007
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 Ashok Mor


I get hibernate exception “illegally attempted to associate a proxy with two open Sessions”. I tried many wayto resolve this issue but could not find any solutions.

Scenario which I follow is as below:

• Hibernate transaction is stated
• I create new instance of class A
• Load object from DB using HB session, and associates them to newly created instance of A
• Now I create new hibernate transaction and try to save instance of A, on hibernate save here it throws “illegally attempted to associate a proxy with two open Sessions”

Can anyone please suggest way to get out of this HB exception?

Note: I really need to save instance of A into separate transaction then where I created instance of A and loaded it’s associated instances.

Ashok Mor
Hi I am getting following error

org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.exe.ProcessInstance.instances

My mapping for map is something like below

So any clue in this?
It resolved with the setting like, LANG=en_GB.UTF-8
10 years ago
It get resolved as it was the problem with jvm considering charsetfor linux based on LANG proeprty, so i set it as LANG=en_GB.UTF-8, and issue get resolved.

10 years ago

We have FTP server setup at server side which is of Apache Mina,

I have Apache FTPClient to communicate with FTP server, and sending file with special char (UTF-8) to store, I have already setup encoding as UTF-8 at client side, now FTP server receive the file and store it into destination folder but it replace ‘?’ into filename wherever special char is found.

Does any body have an idea what can solve this problem?

My file name e.g: På følgende du yderligere information og hjæ
FTP server store it as P?_f?lgende_du_yderligere_information_og_hj?
10 years ago
You can format or change the log level, to do so you need change into file ‘’, this file would be available inside lib folder of your jre.
i.e. C:\Program Files\Java\jre6\lib
11 years ago


We are using ehcache in our J2EE web application deployed on Jboss server. The application is deployed on 10 servers in cluster. Ehcache is replicating cache data in 10 servers in cluster. Would replicating cache data on many server(10 servers) can create performance issue?


11 years ago
Is it possible to POST request data from browser to server in compressed format? If yes, How can we do that?
11 years ago
Does ResourceBundle automatically cache language property files or do we need to write codes to cache language property files?
ResourceBundle bundle_1 = ResourceBundle.getBundle(BUNDLE_NAME, locale);
ResourceBundle bundle_2 = ResourceBundle.getBundle(BUNDLE_NAME, locale);

Will above code load the property file again if the locale is same? Or do we need to write our code to cache ResourceBundle object, and return ResourceBundle object if it is loaded for given locale?
11 years ago

I am facing requirements like:
-> Select properties of any file (i.e. right click on file and select properties option)
-> A property window will be opened.
-> In that property window we often find some common tabs like (General, Summary etc)
    But in case of some specific file like pdf, winrar we find some extra tab(s) (i.e. in case of properties window of PDF file we find one extra tab with title “PDF”).
-> So I need to add one more tab into property window of file through java program, so may I have some idea how to do it.
I have tried using VC++, but I want to implement it in java.

So is this possible in a JAVA?
12 years ago
In terms to understand portlet first you need to understand Portal.

Portal is nothing but a web application in which we can create many portlet which render actual web content.

So Portlet is just like one web page which run top of Portal.
12 years ago

I am using table per class hierarchy with discriminated column

So I need to map subclass using <subclass> element, and member of subclass will be mapped using <join>, but what can happen when we have list as a member in subclass. so I got stuck here that how to map list inside <subclass> element , so if any one knows
About it please let me know.

~ Ashok
What you can do is, add following line in web.xml


<display-name>Example Security Constraint</display-name>
<web-resource-name>Protected Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<!-- If you list http methods, only those methods are protected -->

<!-- Anyone with one of the listed roles may access this area -->

13 years ago

But that can also be done through overriding Interceptor i.e.

Configuration configuration = new Configuration();
configuration.setInterceptor(new UserInterceptor());
sessionFactory = configuration.configure().buildSessionFactory();

public class UserInterceptor extends EmptyInterceptor{

public Boolean isTransient(Object object) {
return Boolean.TRUE;

So here we have override the method called isTransient(), which return true, that means this object is transient no need to save.

In this case it also does not generate select, but again it leads to another problem that, it does not store reference for referencing of object being save.

A has reference of C,
First we store C,
Then we store A, but while storing A it does not save reference of C into table of A, instead of that it saved that as a null value.
This happens in case of JTA transaction only.
Hi Angel,

I did not get you properly, so can you please describe your solution in further details.