[JBoss Seam] - Javascript error using Seam Remoting (JMS subscription)
by dkane
Dear colleagues,
Web-page is subscribed to JMS topic.
I have configured debug=true for Remoting, and when page is being loaded first time xml envelopes starts to run in pop-up window. So I conclude that JMS subscription itself is ok.
But when I click button on this page (form submission), Javascript error occures. FireBug provides the following details :
[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
| [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location:
| "JS frame :: http://localhost:8080/traceadm/seam/resource/remoting/resource/remote.js :: anonymous :: line 608" data: no]
|
| remote.js (line 608):
| if (req.status == 200)
|
My UI is template-based. template.xhtml :
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core">
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| <title>Terminal control</title>
| <link href="css/screen.css" rel="stylesheet" type="text/css" />
| </head>
|
| <body id="pgMainMenu">
| <div id="document">
| <div id="header"><span>Terminal control</span></div>
| <div id="nav">
| <ui:insert name="topnav">
| TODO: Navigation menu
| </ui:insert>
| </div>
|
| <div id="container">
| <div id="sidebar">
| <ui:insert name="sidebar">
| TODO : Login form
| </ui:insert>
| </div>
|
| <div id="errors">
| <ui:insert name="errors">
| <h:messages globalOnly="true"
| layout="table"
| styleClass="cntError" />
| </ui:insert>
| </div>
|
| <div id="content">
| <ui:debug hotkey="D"/>
| <ui:insert name="body">
| PAGE BODY
| </ui:insert>
| </div>
| </div>
| </div>
|
|
| <script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
| <script type="text/javascript">
| //<![CDATA[
| function subscriptionCallback(message)
| {
| Seam.Remoting.log('Got the message !!! ');
| }
|
| Seam.Remoting.subscribe("CommandTraceTopic", subscriptionCallback);
| // ]]>
| </script>
|
|
| </body>
| </html>
|
The html page in question contains form in <ui:insert name="body"> tag above. Submission of that form causes the error.
Thank you in advance for ideas.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080523#4080523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080523
18 years, 7 months
[JNDI/Naming/Network] - Error invoking old rmi server
by analorite
Hi everyone.
I've got this cliente code, running on JBoss:
anonymous wrote : Registry registry = LocateRegistry.getRegistry("10.95.18.121");
|
| if (registry != null){
| String[] entries = registry.list();
| if (entries != null){
| for (int x = 0; x < entries.length; x++){
| log.debug("Vinculos disponibles[" + x + "]:" + entries[x]);
| }
|
| Properties env = new Properties(); env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
| env.put("java.naming.provider.url","jnp://localhost:1099"); env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
| ctx = new InitialContext(env);
| log.debug("Naming lookup....");
| Object obj = ctx.lookup("HelloServer");
|
|
And i have the following error:
Vinculos disponibles[0]:HelloServer
Naming lookup...
Receive timed out
javax.naming.CommunicationException
Any idea?
Thanks in advance. Ana.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080520#4080520
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080520
18 years, 7 months
[JBoss Seam] - A4J is not defined and seam
by kgoedert
Hello,
I´m trying to use ajax4jsf in my seam project. I put ajax4jsf-1.1.1.jar and oscache-3.2.jar in WEB-INF/lib and in components.xml
<web:ajax4jsf-filter force-parser="true"
enable-cache="true"
log4j-init-file="custom-log4j.xml"
url-pattern="*.sig"/>
In my xhtml page where I want to use a commandButton with ajax4jsf suport I have:
...
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
...
<a4j:commandButton action="#{identity.login}" value="Login" styleClass="large-button"/>
.....
and my web.xml looks like this
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<listener-class>
org.jboss.seam.servlet.SeamListener
</listener-class>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-name>Seam Resource Servlet</servlet-name>
<servlet-class>
org.jboss.seam.servlet.SeamResourceServlet
</servlet-class>
<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>*.sig</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>10</session-timeout>
</session-config>
</web-app>
When I click on the commandButton on the page I get: A4J is not defined
What I did wrong?
Thanks
Kelly
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080518#4080518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080518
18 years, 7 months
[JBoss Seam] - Running 2.0.0 beta1 on jetty question
by mail.micke@gmail.com
Hi,
can someone give me some advice on how to run seam 2.0.0 beta1 on Jetty.
I'm currently trying to run it using the maven jetty plugin and get the following exception on each request:
| ERROR (org.jboss.seam.jsf.SeamPhaseListener) - swallowing exception
| java.lang.IllegalStateException: Could not start transaction
| at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:568)
| at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:307)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
| at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
| at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
| at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
| at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
| at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
| at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
| at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
| at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
| at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
| at org.mortbay.jetty.Server.handle(Server.java:285)
| at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
| at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
| at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
| at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
| at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
| at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
| at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
| Caused by: java.lang.UnsupportedOperationException: no transaction
| at org.jboss.seam.transaction.NoTransaction.begin(NoTransaction.java:23)
| at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:563)
| ... 37 more
|
|
|
Found a wiki page [1] with details about getting seam running on tomcat, and I wonder if there are similar techniques for jetty.
[1] http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedAndTomcat
Many thanks,
Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080517#4080517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080517
18 years, 7 months