Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- EJB 3.0 Seam Component Not Found

- EJB 3.0 Seam Component Not Found

2007-08-09       - By birwin

 Back
I have an EJB 3.0 Stateful Session Bean that I am unable to see from my web
page (JSP at the moment). From the log files it is apparent the bean is not
being detected by the seam deployment scanner.

My EJB:
@(protected)
 | @(protected)(CONVERSATION)
 | @(protected)("divisionListener")
 | public class DivisionListenerBean implements DivisionListener
 | {
 |     @(protected) (unitName="spike")
 |     private EntityManager em;
 |    
 |     @(protected)
 |     private Log log;
 |    
 |     private int clientID = 5133;
 |    
 |     public void setClientID(int clientID)
 |     {
 |         this.clientID = clientID;
 |     }
 |    
 |     public int getClientID()
 |     {
 |         return this.clientID;
 |     }
 |    
 | }


My ejb-jar.xml file:
<ejb-jar>
 |   <interceptors>
 |     <interceptor>
 |       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
 |     </interceptor>
 |   </interceptors>
 |   <assembly-descriptor>
 |     <interceptor-binding>
 |       <ejb-name>*</ejb-name>
 |       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
 |     </interceptor-binding>
 |   </assembly-descriptor>
 | </ejb-jar>




On the web client:
my web.xml:
<web-app>
 |   <!-- Listeners -->
 |   <listener>
 |     <!-- Seam -->
 |     <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
 |   </listener>
 |   <listener>
 |     <!-- JSF -->
 |     <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
 |   </listener>
 |   <!-- Faces Servlet -->
 |   <servlet>
 |     <servlet-name>Faces Servlet</servlet-name>
 |     <servlet-class>javax.faces.webapp.FacesServlet Source code of javax.faces.webapp.FacesServlet</servlet-class>
 |     <load-on-startup>1</load-on-startup>
 |   </servlet>
 |   <servlet-mapping>
 |     <servlet-name>Faces Servlet</servlet-name>
 |     <url-pattern>/faces/*</url-pattern>
 |   </servlet-mapping>
 |   <taglib>
 |     <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
 |     <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
 |   </taglib>
 |   <taglib>
 |     <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
 |     <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
 |   </taglib>
 |   <taglib>
 |     <taglib-uri>http://java.sun.com/jsp/jstl/core </taglib-uri>
 |     <taglib-location>/WEB-INF/c.tld</taglib-location>
 |   </taglib>
 |   <context-param>
 |     <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
 |     <param-value>/spike-ear-0 (See http://ear-0.ora-code.com).1.0/#{ejbName}/local</param-value>
 |   </context-param>
 | </web-app>

My Faces-Config file:
<faces-config>
 |
 |   <lifecycle>
 |     <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
 |   </lifecycle>
 | </faces-config>

My Components.xml file:
<components xmlns="http://jboss.com/products/seam/components"
 |             xmlns:core="http://jboss.com/products/seam/core">
 |      <core:init jndi-name="spike-ear-0 (See http://ear-0.ora-code.com).1.0/#{ejbName}/local" />
 | </components>


My JSP file:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 | <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 |
 | <html>
 |   <head>
 |     <title>SOS Trax</title>
 |     <link href="../../css/trax.css" rel="stylesheet" type="text/css" />
 |   </head>
 |   <body>
 |     <h2>Payroll Export Parameters</h2>
 |     <f:view>
 |       <h:form>
 |         <h:inputText value="#{divisionListener.clientID}" />
 |       </h:form>
 |     </f:view>
 |   </body>
 | </html>

My log file indicates the EJB is not detected and deployed and when I hit the
JSP I get this in my log file:
DEBUG [org.jboss.seam.Component] seam component not found: divisionListener

I have verified that my EJB is available as an ejb with the JNDI name: "spike
-ear-0 (See http://ear-0.ora-code.com).1.0/DivisionListenerBean/local". This is displayed in my Global JNDI
Namespace section of the JBoss JMX Console. I also wrote an application that
used this EJB as a plain EJB and I had no problems.

Any ideas what I have done wrong?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4072777#4072777

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4072777
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.