[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4488) Datamodel: casting exception on @Destroy
by Jeff Wexler (JIRA)
Datamodel: casting exception on @Destroy
----------------------------------------
Key: JBSEAM-4488
URL: https://jira.jboss.org/jira/browse/JBSEAM-4488
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.2.GA
Environment: Windows Server 2003, Jboss AS 5.1.0.GA, PostgreSQL 8.4
Reporter: Jeff Wexler
Priority: Minor
Getting the following error for a datamodel when it is used to display an h:dataTable. The dataTable is displayed fine. However, in the log, I receive:
15:04:42,312 WARN [Component] Exception calling component @Destroy method: deliveryDeadlineOptionList
javax.ejb.EJBException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to javax.faces.model.DataModel
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)
...
The bean for this is used for the following purposes:
1. Value of an s:selectItems
2. Value of an h:dataTable (i.e., as mentioned above)
3. Injected and used in another bean
The bean:
@Stateful
@Scope(CONVERSATION)
@Name("deliveryDeadlineOptionList")
@TransactionAttribute(REQUIRES_NEW)
public class DeliveryDeadlineOptionListAction implements DeliveryDeadlineOptionList, Serializable
{
@PersistenceContext(type=PersistenceContextType.EXTENDED)
@In(create=true)
private EntityManager entityManager;
@DataModel
private List<DeliveryDeadlineOption> deliveryDeadlineOptionsList;
@DataModelSelection
private DeliveryDeadlineOption deliveryDeadlineOption;
@Create
public void create() {getDeliveryDeadlineOptionsList();}
@Factory
public List<DeliveryDeadlineOption> getDeliveryDeadlineOptionsList(){
return (List<DeliveryDeadlineOption>) entityManager.createQuery("select c from DeliveryDeadlineOption c")
.getResultList();
}
public DeliveryDeadlineOption getDeliveryDeadlineOption(){return deliveryDeadlineOption;}
@Destroy
@Remove
public void destroy() {}
}
Relevant portions of the bean where deliveryDeadlineOptionList is injected and used:
@Stateful
@Name("quoteCalculate")
@Scope(ScopeType.CONVERSATION)
public class QuoteCalculatingAction implements QuoteCalculating
{
@PersistenceContext(type=PersistenceContextType.EXTENDED)
@In(create=true)
private EntityManager entityManager;
...
@In(value="deliveryDeadlineOptionsList", create=true)
private List<DeliveryDeadlineOption> deliveryDeadlineOptions;
@DataModel
private List<DeliveryDeadlineOption> selectedDeliveryDeadlineOptions;
...
(Standard getters and setters for above)
public void selectedDeliveryDeadlineOptionsChange(ValueChangeEvent valueChangeEvent) {
setSelectedDeliveryDeadlineOptions((List<DeliveryDeadlineOption>) valueChangeEvent.getNewValue());
...
}
...
@Destroy
@Remove
public void destroy() {}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (JBSEAM-4491) ant target initresteasy is failing - dependency com/sun/xml/stream/sjsxp/1.0.1 is missing
by Marek Novotny (JIRA)
ant target initresteasy is failing - dependency com/sun/xml/stream/sjsxp/1.0.1 is missing
-----------------------------------------------------------------------------------------
Key: JBSEAM-4491
URL: https://jira.jboss.org/jira/browse/JBSEAM-4491
Project: Seam
Issue Type: Bug
Components: WS
Reporter: Marek Novotny
Priority: Blocker
Fix For: 2.2.1.CR1
Resteasy in branch https://svn.jboss.org/repos/seam/branches/community/Seam_2_2 is blocking build. There is missing com/sun/xml/stream/sjsxp/1.0.1 in jboss.org repository
initresteasy:
[echo] Build JBoss Seam resteasy 2.2
[artifact:dependencies] Downloading: com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.pom from central
[artifact:dependencies] Downloading: com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.pom from repository.jboss.org
[artifact:dependencies] Downloading: com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.pom from snapshots.jboss.org
[artifact:dependencies] Downloading: com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.pom from central
compileresteasy:
[javac] Compiling 7 source files to /home/mnovotny/workspaces/jboss/jboss-seam_2_2/classes/resteasyclasses
[javac] error: error reading /home/mnovotny/.m2/repository/com/sun/xml/stream/sjsxp/1.0.1/sjsxp-1.0.1.jar; error in opening zip file
[javac] 1 error
BUILD FAILED
/home/mnovotny/workspaces/jboss/jboss-seam_2_2/build.xml:395: The following error occurred while executing this line:
/home/mnovotny/workspaces/jboss/jboss-seam_2_2/build.xml:1046: Compile failed; see the compiler error output for details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months