[JBoss Seam] - Re: jboss-ejb3-all.jar StatelessRemoteProxy serialVersionUID
by nynymike
ok... figured this one out.
The jars that I needed were all in jboss-4.0.5.GA\client:
| * jbossall-client.jar
| * ejb3-persistence.jar
| * jbossall-client.jar
| * jboss-annotations-ejb3.jar
| * jboss-aspect-jdk50-client.jar
| * jboss-ejb3-client.jar
| * jboss-ejb3x.jar
|
|
| I also wrote a handy dandy python program to recursively search for classes in jar files. Make sure "jar" is in your path. Add #!... for unix.
|
| | import os, sys
| | from os.path import join
| |
| | dir = ""
| | target = ""
| |
| | try:
| | target = sys.argv[1]
| | dir = sys.argv[2]
| | except:
| | target = raw_input("What is the target string: ")
| | dir = raw_input("What is the root directory: ")
| |
| |
| | l = os.walk(dir)
| |
| | for tup in l:
| | dirName = tup[0]
| | for fn in tup[2]:
| | if fn[-3:] == "jar":
| | fullPath = join(dirName, fn)
| | f = os.popen("jar -tvf %s" % fullPath, "r")
| | text = f.read()
| | if text.find(target) > 1:
| | print "FOUND IT: %s\n" % fn
| | f = os.popen("jar -tvf %s" % fullPath, "r")
| | lines = f.readlines()
| | for line in lines:
| | if line.find(target) > 1: print line
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077979#4077979
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077979
18Â years, 8Â months
[JBoss Seam] - Re: Can action called from button avoid committing transacti
by tynor
Thanks Matt - you got me on the right track.
I've got it working by removing the begin-conversation entity in my page.xml and annotating my wire() function as:
@Begin(flushMode=FlushModeType.MANUAL, join=true)
| public void wire() {
|
This wasn't as scary as I expected it to be. The persist()/update()/remove() functions from EntityHome all explicitly flush() the transaction, so they are inherently compatible with manual flush mode. (FWIW: manual page-level commits seem more natural than the alternative now that I've run into a simple case where the alternative is so broken - I sure hope this gets standardized by the time we need to port our app to non-Hibernate JPA implemenations...
FWIW, I wasn't able to use your suggestion of adding flush-mode in the page.xml:
<begin-conversation join="true" flush-mode="manual"/>
This doesn't work for me with Seam 1.2.1-GA -- perhaps it's something added for 2.0? In any case, since I can't confirm that it works, I don't feel justified in raising a JIRA - perhaps someone who uses it under 2.0 can raise the documentation issue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077974#4077974
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077974
18Â years, 8Â months
[JBoss Seam] - Ajax race condition causes Conversation.flush NPE
by pdpantages
SEAM 1.2.1 GA
Ajax - 1.1.1-SNAPSHOT (from seam dist)
Hello forum,
I have finally a clue about my Conversation.flush() errors. This is due to a race condition between my ajax poll and my @End method, which is called when the user presses apply/cancel.
I am able to reproduce this reliably by:
(1) Starting a nested conversation, from a long running conversation.
(2) I poll the corresponding backing bean, with reRender="#{bean1.ajaxRenderList}"
(3) I End the conversation with a button action="#{bean1.apply}"
(4) Stick a Thread.sleep() in apply() to stall it for 4s
(5) Use a 2s interval on the poll to ensure it fires during an apply() call
What I think happens is:
- After I press apply, the poller attempts to access the bean "at the same time"
- Since the bean is @Synchronized, this call has to wait.
- When apply() finishes, Seam cleans up the conversation as per @End
- When the poll thread runs, tries to access the component, causing the flush() error due to an inconsistent state.
With the Thread.sleep() the error is reproducible every time.
So... Does anyone know of a good way to synchrhonize these actions (poll + command button) and avoid this problem? I would like to be able to do this on the server-side if possible.
Any ideas would be appreciated.
fyi, My beans are like so:
| @Stateful
| @Scope(CONVERSATION)
| @LoggedIn
| @Synchronized
| @Conversational
| @Name("bean1")
| public class Bean1 implements Bean1Local {
|
| @Begin(nested=true)
| public String edit () {
| return "page1";
| }
| ...
|
| @End
| public String apply () {
|
| // Delay, so that poller will come in before we are done.
| Thread.sleep (4000);
|
| return "page2";
|
| }
|
| public String getAjaxRenerList () {
| return "a4jPanel1";
| }
|
|
| <a4j:region id="pollRegion" renderRegionOnly="false">
| <a4j:poll
| id="poller"
| interval="2000"
| enabled="true"
| eventsQueue="pollerQueue"
| reRender="#{bean1.ajaxRenderList}">
| </a4j:poll>
| </a4j:region>
|
| java.lang.NullPointerException
| at org.jboss.seam.core.Conversation.flush(Conversation.java:122)
| at org.jboss.seam.core.Manager.prepareBackswitch(Manager.java:1165)
|
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:229)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 2007-08-23 19:16:29,615 ERROR [http-0.0.0.0-8080-2] org.jboss.seam.jsf.SeamPhaseListener
| swallowing exception
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077973#4077973
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077973
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Problem with JBoss portal setup
by senenami
Sorry, when I start the server I get the above error. When I open the portal page, the following error is dispalyed:
java.lang.IllegalStateException: Cannot get portal server
I tried deploying the latest portal jboss-portal-2.6.1.GA and when I start the server, I get the following error:
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\Program Files\jboss-4.0.3SP1\bin\\..
.
JAVA: C:\j2sdk1.4.2_15\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
.
CLASSPATH: C:\j2sdk1.4.2_15\lib\tools.jar;C:\Program Files\jboss-4.0.3SP1\bin\
\run.jar
.
===============================================================================
.
17:08:12,241 INFO [Server] Starting JBoss (MX MicroKernel)...
17:08:12,256 INFO [Server] Release ID: JBoss [Zion] 4.0.3SP1 (build: CVSTag=JBo
ss_4_0_3_SP1 date=200510231751)
17:08:12,256 INFO [Server] Home Dir: C:\Program Files\jboss-4.0.3SP1
17:08:12,256 INFO [Server] Home URL: file:/C:/Program Files/jboss-4.0.3SP1/
17:08:12,256 INFO [Server] Patch URL: null
17:08:12,256 INFO [Server] Server Name: default
17:08:12,256 INFO [Server] Server Home Dir: C:\Program Files\jboss-4.0.3SP1\ser
ver\default
17:08:12,272 INFO [Server] Server Home URL: file:/C:/Program Files/jboss-4.0.3S
P1/server/default/
17:08:12,272 INFO [Server] Server Temp Dir: C:\Program Files\jboss-4.0.3SP1\ser
ver\default\tmp
17:08:12,272 INFO [Server] Root Deployment Filename: jboss-service.xml
17:08:12,990 INFO [ServerInfo] Java version: 1.4.2_15,Sun Microsystems Inc.
17:08:12,990 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_15-b02
,Sun Microsystems Inc.
17:08:12,990 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
17:08:13,568 INFO [Server] Core system initialized
17:08:14,943 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
ce:log4j.xml
17:08:18,067 ERROR [MainDeployer] Could not create deployment: file:/C:/Program
Files/jboss-4.0.3SP1/server/default/deploy/jboss-portal.sar/portal-cms.sar/porta
l-workflow.sar/
org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect
.UndeclaredThrowableException)
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077971#4077971
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077971
18Â years, 8Â months