[jboss-user] [JBoss Seam] - Remoting exception
msduk
do-not-reply at jboss.com
Tue Apr 3 19:30:28 EDT 2007
Hi I am trying my hand a bit of remoting and am stuck here. It is so close to the example code in section 19 I really cant see a problem.
This is 1.2.0 PATCH + Icefaces + 4.0.5 AS + JAAS
Cheers
Exception:
00:10:50,328 ERROR [Remoting] Error
| java.lang.RuntimeException: Type cannot be determined for component [Component(stockCheck)]. Please ensure that it has a local interface.
| at org.jboss.seam.remoting.InterfaceGenerator.appendComponentSource(InterfaceGenerator.java:284)
| at org.jboss.seam.remoting.InterfaceGenerator.generateComponentInterface(InterfaceGenerator.java:131)
| at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:101)
| at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110)
| at org.jboss.seam.servlet.ResourceServlet.doPost(ResourceServlet.java:76)
| at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:58)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at halvor.filter.RoleFilter.doFilter(RoleFilter.java:48)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at halvor.filter.TimerFilter.doFilter(TimerFilter.java:42)
| 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:432)
| 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(Unknown Source)
|
Javascript (the ../ is correct)
| <script type="text/javascript" src="../seam/resource/remoting/resource/remote.js"></script>
| <script type="text/javascript" src="../seam/resource/remoting/interface.js?stockCheck"></script>
| <script type="text/javascript">
| //<![CDATA[
|
| function checkStock() {
| var name = prompt("What is your name?");
| Seam.Component.getInstance("stockCheck").checkStock(name, checkStockCallback);
| }
|
| function checkStockCallback(result) {
| alert(result);
| }
|
| // ]]>
| </script>
|
java :
| package halvor.session;
|
| import javax.ejb.Stateless;
|
| import org.jboss.seam.annotations.Name;
|
|
| @Stateless
| @Name("stockCheck")
| public class StockChecker implements StockCheckerI {
|
| public String checkStock (String itemCode) {
| return "jkjhjk";
| }
|
| }
|
| package halvor.session;
|
| import org.jboss.annotation.ejb.Local;
| import org.jboss.seam.annotations.WebRemote;
|
| @Local
| public interface StockCheckerI {
|
| @WebRemote
| public String checkStock(String itemCode);
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034351#4034351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034351
More information about the jboss-user
mailing list