yes, that's what I wanted to remove. I changed my code like this and it worked smoothly now:
>From the controller bean, removed the code:
| public void removeAnItem(Item anItem){
| entityManager.remove(anItem);
| }
|
In the entity bean ShoppingPlan, added this method:
| public void removeAnItem(Item anItem){
| this.items.remove(anItem);
| }
|
And in the .xhtml page, call the removeAnItem(item) method from the entity bean instead of from the controller bean. Things are working, the item is removed from both the database and the web page, I'm happy.
But I'm not sure _why_ the first approach, i.e. using entityManager to remove the item always resulted in that exception....
Regards,
Ellen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071923#4071923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071923
Ok, maybe I've found it. Look at this:
| queue = new PriorityBlockingQueue<QueueItem>(result.size(), new Comparator<QueueItem>() {
| public int compare(QueueItem o1, QueueItem o2) {
| // This will cause the queue to be sorted in the inverse natural order
| // i.e. higher numerical value of priority attribute gives higher priority
| return -o1.getPriority().compareTo(o2.getPriority());
| }
| });
|
The stacktrace says the problem is to instanciate
CallHandlerActionBean$1, i.e. an anonymous inner class of CallHandlerActionBean. I had searched for it before but didn't find it until now.
This kind of constructions are quite common in example code but obviously easy to blow a big hole in the foot...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071914#4071914
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071914