Ashok Mor

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

Hi

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.

Thanks
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
Hi,

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ælp1.mov
FTP server store it as P?_f?lgende_du_yderligere_information_og_hj?lp1.mov.md5
10 years ago
You can format or change the log level, to do so you need change into file ‘logging.properties’, this file would be available inside lib folder of your jre.
i.e. C:\Program Files\Java\jre6\lib
11 years ago


Hi,

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?

Regards,

Ashok
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?
e.g.
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
Hi

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
Hi

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

<security-constraint>

<display-name>Example Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/jsp/*</url-pattern>
<url-pattern>/images/*</url-pattern>
<!-- If you list http methods, only those methods are protected -->
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>

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

</security-constraint>
13 years ago
Hi,

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.

Like
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.