[JBoss Seam] - Re: JBoss 4.0.5.GA: java.lang.NullPointerException: serialF
by rithmaa
Hi
I am using seam1.1.5GA and icefaces 1.6.0DR3. I have been trying like for eternity to get the configuration to work.
Now the deploy happens without any problem but when I try to load the application I get the following error. Please Help!
7:43:04,954 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) beforePhase.
java.lang.IllegalStateException: No active application scope
at org.jboss.seam.core.Init.instance(Init.java:75)
at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsBeforePhase(TransactionalSeamPhaseListener.java:22)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:45)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:26)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:121)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:31)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.SingleViewServlet.service(SingleViewServlet.java:54)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:41)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:18)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:41)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:18)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046952#4046952
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046952
18 years, 11 months
[J2EE Design Patterns] - Re: Concurent creating problem
by wpernath
Hi,
I was having quite the same problem some years ago. This is because jboss is using more threads when it is on load (i.e. if there are more than one item in the queue - you can test this really easily if you simulate heavy load).
I think you should separate the creation of the entities. If your MDB realizes the task does not exist and must be created, you should put the task into another queue and wait until it exists.
The second MDB which creates the tasks should search for a mark saying "Creating task xyz" and only if this mark does not exist, the task should be created. Or in short form:
1. Is task xyz is currently created?
2a. No, try to find task with this id. If not found, create mark, create task and delete mark, else skip
2b. Yes, skip
HTH,
Wanja
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046951#4046951
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046951
18 years, 11 months
[Persistence, JBoss/CMP, Hibernate, Database] - Unique entity classes mapped to same table
by asmithJBoss
Greetings,
I have the following scenario:
* Two distinct entity classes (A and B) are mapped to the same table
* Each entity class is mapped to distinct columns, except for two: the primary key, and another field that is updated by the database itself when the submit occurs, are both in each entity class
I have one method that does a find() on an instance of class A and updates it, and another method that does a find() and update on class B.
Within the same transaction context, I call the method that updates Class A with a given primary key, then I call the other method that updates Class B using the same primary key.
When there are updates to both entities I get a StaleObjectStateException - is there any way that I can update two entity classes mapped to the same row within the same transaction context?
I have tried a merge after updating the second bean, but that obviously doesn't work.
Thanks,
Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046948#4046948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046948
18 years, 11 months
[JBoss Seam] - Component Binding don't work in Seam?
by smithbstl
I am trying to bind a couple Trinidad InputText components (UIXInput) in a SFSB.
I keep getting an error message that the Backing Bean (SFSB) resolved to null. Do component bindings just not work in Seam? I know they are discouraged (sited in the documentation somewhere), but I don't remember anything saying they just don't work.
Essentially what I am trying to do is clear out a couple of values on my form after I submit.
Use case is two input components add data to a dataTable on form submit. I would like to clear the inputs after the data is added to the table, so if someone has a way to do this without bindings, I am all ears. I was under the impression I had to call setSubmittedValue(null) on the Input components to achieve this.
I am using Seam 1.2.1GA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046946#4046946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046946
18 years, 11 months
[JBoss Seam] - Re: Mail sending error
by demetrio812
Hi, thanks for the answer!
Yes I have it, I generated the project using seam-gen and I'm using JBoss AS, this is my web.xml:
| <?xml version="1.0"?>
| <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
| <context-param>
| <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
| <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
| </context-param>
| <context-param>
| <param-name>org.ajax4jsf.SKIN</param-name>
| <param-value>black</param-value>
| </context-param>
| <!-- Facelets development mode (disable in production) -->
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
| <!-- JSF -->
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
| <!-- Ajax4jsf (must come first!) -->
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
| <!-- Seam -->
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
| <!-- MyFaces -->
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
| </servlet>
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
| <security-constraint>
| <display-name>Restrict raw XHTML Documents</display-name>
| <web-resource-collection>
| <web-resource-name>XHTML</web-resource-name>
| <url-pattern>*.xhtml</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <role-name>NONE</role-name>
| </auth-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| </login-config>
| </web-app>
|
Demetrio Filocamo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046944#4046944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046944
18 years, 11 months
[Messaging, JMS & JBossMQ] - Re: Asynchronous send to MDB
by fastbob
It's possible thread scheduling is coming into play (runnining on WinXP), but I think some of my experiments indicate something else is having an effect.
By way of background, the app uses CMP EJB 2 beans and is deployed under JBoss 4.0.4, UIL2, and JDK 1.6. UI is JSF/MyFaces and DB is MySQL 5.0.18. The queue is the default configuration queue A. The intent is to send messages from the UI thread to an analysis queue MDB without waiting for the results.
Tried adding a sleep() as suggested to the MDB (there was already a yield() there). Still acted synchronous. Modified the sender to spawn a low priority thread to perform the send (I know, bad EJB practice). Still synch.
Created a standalone sender from the JBoss examples sending to the app. Acted asynch - the sender posted the messages without waiting for the MDB to process them. Ran a standalone receiver with simulated load and app sending. Acted asynch, sender posted messages without waiting. Reverted to app sending and receiving. Still synch, with or without transacted messages.
So it appears something is going on when the app UI thread is sending to the MDB. They are entirely separate thread groups (main vs. RMI Runtime), so it's not clear to me where the scheduling issue is arising. Might it have something to do with CMP? Something else? Thanks.
Bob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046941#4046941
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046941
18 years, 11 months