[JBoss Seam] - Exception thrown on Seam1.3.0ALPHA
by gus888
Hi all,
When I updated to Seam1.3.0ALPHA, I got the following exceptions. I checked source codes of SeamCVS20070526, and the Manager class has the method of getConversationIsLongRunningParameter(), but in Seam1.3.0ALPHA, the Manager class does not has the method. Anybody can give me a help? Thank you in advance.
JBoss4.2.0GA,
Seam1.3.0ALPHA
ICEfaces 1.6DIV#5
23:45:35,812 INFO [Lifecycle] starting up: org.jboss.seam.core.servletSession
| 23:45:35,859 ERROR [SeamUtilities] Exception loading seam environment:
| java.lang.NoSuchMethodException: org.jboss.seam.core.Manager.getConversationIsLongRunningParameter()
| at java.lang.Class.getMethod(Class.java:1581)
| at com.icesoft.util.SeamUtilities.loadSeamEnvironment(SeamUtilities.java:321)
| at com.icesoft.util.SeamUtilities.<clinit>(SeamUtilities.java:63)
| at com.icesoft.faces.webapp.http.servlet.ServletExternalContext.insertNewViewrootToken(ServletExternalContext.java:431)
| at com.icesoft.faces.webapp.http.servlet.ServletExternalContext.<init>(ServletExternalContext.java:98)
| at com.icesoft.faces.webapp.http.servlet.ServletView.<init>(ServletView.java:44)
| at com.icesoft.faces.webapp.http.servlet.SingleViewServlet.service(SingleViewServlet.java:39)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
| at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:89)
| at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
| at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:65)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054940#4054940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054940
18Â years, 10Â months
[JBoss Seam] - Seam 1.3.0.ALPHA UI example doubt
by fernando_jmt
I lost a lot of time trying to find out the reason for the problem I described here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=110611
(Problem of UnsupportedOperationException when using @ManyToMany and <s:convertEntity/>)
I tried a lot of things (debug, simplify my code, with EJB, with POJO) but I did not found the reason.
Well I do the following in order to show you the problem, and maybe you can tell me what is happening:
a) I have got Seam 1.3.0.ALPHA
b) I check UI example has the right enviroment I want to test (@ManyToMany between Person and Colour).
c) I deployed it to Jboss 4.2.0.GA and all work fine. Note that s:selectItems sample uses Seam Framework.
d) I made a POJO action component in the UI example, it looks like:
| @Name("personAction")
| @Scope(ScopeType.CONVERSATION)
| public class PersonAction {
|
| @In(create=true)
| private EntityManager entityManager;
|
| private Person person;
|
| private Integer id;
|
|
| @Transactional
| public String update() {
| entityManager.joinTransaction();
| entityManager.merge(person);
| entityManager.flush();
| return "Success";
| }
|
| public Person getInstance() {
| if (person != null) {
| return person;
| } else {
| entityManager.joinTransaction();
| person = entityManager.find(Person.class, id);
| return person;
| }
| }
|
| public Integer getId() {
| return id;
| }
|
| public void setId(Integer id) {
| this.id = id;
| }
|
| }
|
e) I created a selectItemsAction.xhtml based on selectItems.xhtml, it looks like:
| <h:form>
|
| <s:decorate template="decorateField.xhtml">
| <ui:define name="label">Favourite Colours</ui:define>
| <ui:define name="description">A colour is an entity</ui:define>
| <h:selectManyListbox value="#{personAction.instance.favouriteColours}" >
| <s:selectItems value="#{colours.resultList}" var="colour" label="#{colour.name}" />
| <s:convertEntity />
| </h:selectManyListbox>
| </s:decorate>
|
| <h:commandButton value="Apply" action="#{personAction.update}">
| <s:conversationPropagation type="join" />
| </h:commandButton>
|
| <h:messages globalOnly="true" />
| <p><s:link view="/index.xhtml" propagation="end">Back to index</s:link></p>
| </h:form>
|
|
f) Minor changes:
pages.xml
| <page view-id="/selectItemsAction.xhtml">
| <begin-conversation join="true"/>
| <param name="personId" converterId="javax.faces.Integer" value="#{personAction.id}" />
| </page>
|
template.xhtml (link to start the update process, exactly like selectItems):
| <li><s:link view="/selectItemsAction.xhtml" propagation="join">
| <code>s:selectItems POJO Action</code>
| <f:param name="personId" value="1" />
| </s:link></li>
|
g) I just deploy again and trying selectItemsAction.xhtml it does not work, it gives UnsupportedOperationException (stacktrace is in the post I put at the beginning of this post) .
Now, my question is why POJO action which I added to UI example does not work?
What am I doing wrong?
As I tell you before, this also does not work using EJB(my case), and this only happens with Seam 1.3.0.ALPHA, because it works fine in Seam 1.2.1. And as I tell above, it works with Seam Framework.
Please help me, at this time I don't know how to solve this.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054937#4054937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054937
18Â years, 10Â months
[EJB 3.0] - Which approach to fully access EJB3 Entities from within JSP
by icordoba
Hi there,
after reading lots of posts trying to find a solution to access EJB3 Entity beans from JSTL I haven't been able to get a valid approach.
I can't use Lazy loading as that would make my JSP need a scriptlet to make a UserTransaction surround all data access.
When using Eager loading, I have to make all data be returned as Set's, and not Lists or Collections (solutions for this involve Hibernate specific annotations, outside EJB 3 standard; I want to stick to EJB3 I've also found very "ugly" using @IndexColumn or @ColumnId Hibernate annotations).
As I just said, and because I am using Struts, the only solution I've found is attaching EJBs in the request/session with there relations as Set types. This works but I have a big small problem. I can't access data using Expression Language. For example, I am getting a:
Unable to find a value for "0" in object of class "org.hibernate.collection.PersistentSet" using operator "[]"
When trying to do:
${newsArticle.textBlocks[0]}
Can anybody thing of an approach to be able to access EJBs in JSP pages without any limitations, conforming to EJB3 standard and without using scriptlets in my page? (Of course working with JBoss).
I can't believe that such a simple goal is not actually possible with JBoss (and maybe other AS's) implementation of EJB3.
Thanks for any help,
Ignacio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054931#4054931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054931
18Â years, 10Â months