francesco umani

+ Follow
since Aug 07, 2013
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by francesco umani

Try to change the annotation as follow...
Could you provide the stack trace?

The problem is that somewhere in your code (but I can't find where) you are trying to persist an already existing Entity Statemst maybe because you are persisting a Companymst Entity that is cascading the operation on the linked Class and the error is the

You say that you are selecting a row:
Editing an Item (executing this part of code)

that do nothing, and save the item calling

where the only thing done is calling the entityManager.getTransaction().commit(). I can't figure out which operations are going to be commited at this time. Maybe having you previously pushed the addNew button, entityManager.persist(c) is the operation you're trying to commit. If so, you should try to change that in entityManager.merge(c); or try to block the cascade type from master to detail, things that I can see you have already done setting the comment on:

And by default, JPA does not cascade any persistence operations to the target of the association.

I usually create a

public class SingletonBean { ... }

Why not convinced?
I think the problem is here:

why do you merge before the remove operation?
Does D:\SRS - JAVA Success 2013\Softie Installed - 2013\Weblogic 10.3\bea10\user_projects\domains\srsdomain\config\config.xml exist?
If yes, you should try to change file permissions.
You should split your test method in more methods marked Transactional without mixing direct and undirect control on transaction (baseDao.getCurrentSession().getTransaction().commit();)
Please provide the code (exernal link needs authentication).
You hould code something like:

Yes, please post the client code.
4 years ago
The url: http://localhost:9090/TimeServiceWS/services/TimeServerImplService is reachable? It Seems that the application server is down or the service is not deployed.
4 years ago
The image is too small I can't read. What's the message?
yes, in fact:


This is the default content type. Forms submitted with this content type must be encoded as follows:

Control names and values are escaped. Space characters are replaced by `+', and then reserved characters are escaped as described in [RFC1738], section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A').
The control names/values are listed in the order they appear in the document. The name is separated from the value by `=' and name/value pairs are separated from each other by `&'.
4 years ago
Maybe with the REQUIRES_NEW is only rolled back the new transaction created?
Transaction is rolled back in case you throw a RuntimeException or any Exception which have @ApplicationException annotation with rollback attribute set to true, so:

public class MyException extends Exception {
// ...

will rollback the current transaction.

By default ApplicationException doesn't rollback your transaction.

If you don't want to methodB to rollback your transaction you can either change the rollback behavior of your ApplicationException or prevent the transaction sharing.

The latter is achievable by changing the TransactionAttribute of methodB i.e. to RequiresNew. Then methodA transaction (Tx1) will be suspendend and in case methodB throws an exception which results in rollback of its transaction (Tx2), you can still catch it in methodA and prevent rollback of your methodA transaction (Tx1).