[jboss-user] [JBoss Seam] - Seam saying Datamodel saying row is Unavailable... WHY???
tony.herstell@gmail.com
do-not-reply at jboss.com
Sat Apr 21 23:50:46 EDT 2007
Given:
| @DataModel("displayableCategoryDatamodel")
| private LinkedHashSet<DisplayableCategory> displayableCategorySet;
|
| @DataModelSelection("displayableCategoryDatamodel")
| private DisplayableCategory selectedDisplayableCategory;
|
| @DataModel("keywordsDatamodel")
| private LinkedHashSet<Keyword> keywordsSet;
|
| @DataModelSelection("keywordsDatamodel")
| private Keyword selectedKeyword;
|
| |
| |
| | The first time a member is added to keywordsSet and a page is displayed using the Datamodel then I get this:
| |
| |
| | | Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: row is unavailable
| | | at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| | | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| | | at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| | | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| | | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| | | at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| | | at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| | | at $Proxy113.isAdTypeComplete(Unknown Source)
| | | at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
| | | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| | | at java.lang.reflect.Method.invoke(Method.java:597)
| | | at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| | | at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| | | at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| | | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| | | at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
| | | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| | | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| | | at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
| | | at org.javassist.tmp.java.lang.Object_$$_javassist_7.isAdTypeComplete(Object_$$_javassist_7.java)
| | | ... 51 more
| | |
| |
| |
| | The initial set is created using:
| |
| | | // Create the default set of Keywords.
| | | keywordsSet = new LinkedHashSet<Keyword>();
| | |
| |
| | a member is added using
| |
| |
| | | public void addKeyword() {
| | | Keyword newKeyword = new Keyword();
| | | newKeyword.setKeyword(getNewKeyword());
| | | keywordsSet.add(newKeyword);
| | | }
| | |
| |
| | Keyword is:
| |
| | | @Entity // Defines this as an Entity that is a class mapped to the Datastore.
| | | @Name("keyword") // Name used within SEAM for an instance of this class.
| | | @Role(name="keywordSearchCriteria", scope=SESSION) // Another named instance of this class (used in the session scope).
| | | public class Keyword implements Serializable {
| | |
| | | private Long id;
| | | private Integer version; // Hiberante Docs: EJB3 sais Timestamp actually but recommend Integer
| | | private String keyword;
| | | private Administration administration;
| | |
| | | public Keyword() {
| | | }
| | |
| | | @Id
| | | @GeneratedValue
| | | public Long getId() {
| | | return id;
| | | }
| | |
| | | public void setId(Long id) {
| | | this.id = id;
| | | }
| | |
| | | @Version
| | | @Column(name="version4OptLock")
| | | public Integer getVersion() {
| | | return version;
| | | }
| | |
| | | public void setVersion(Integer version) {
| | | this.version = version;
| | | }
| | |
| | | @NotNull(message="required")
| | | @Length(max = 30)
| | | public String getKeyword() {
| | | return keyword;
| | | }
| | |
| | | public void setKeyword(String keyword) {
| | | this.keyword = keyword;
| | | }
| | |
| | | @Embedded
| | | public Administration getAdministration() {
| | | return administration;
| | | }
| | |
| | | public void setAdministration (Administration administration) {
| | | this.administration = administration;
| | | }
| | |
| | | @Override
| | | public String toString() {
| | | return getKeywordAsText(this);
| | | }
| | |
| | | public static String getKeywordAsText(Keyword keyword) {
| | | StringBuffer infoToReturn = new StringBuffer("Keyword");
| | | infoToReturn.append(" (Id => " + keyword.getId());
| | | infoToReturn.append(", Version => " + keyword.getVersion());
| | | infoToReturn.append(", Keyword => " + keyword.getKeyword());
| | | if (keyword.getAdministration() != null) {
| | | infoToReturn.append(", Administration --> " + keyword.getAdministration());
| | | }
| | | infoToReturn.append(")");
| | | return infoToReturn.toString();
| | | }
| | |
| | |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039579#4039579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039579
More information about the jboss-user
mailing list