[jboss-user] [JBoss Seam] - Component Not getting Initialized by Seam

klsateesh do-not-reply at jboss.com
Thu Aug 3 17:00:37 EDT 2006


Hi All,
 
  I have a Stateless SessionBean which is not getting initialized by Seam when i depoly the .ear File..

  The SesionBean is


  | 
  | @Name("dpaSliderListener")
  | @Stateless
  | @Interceptors(SeamInterceptor.class)
  | 
  | public class SliderListener implements ISliderListenerLocal {
  |   
  |     public String setValue(String selectedVal){
  |         return "You selected "+selectedVal;
  |     }
  |     
  | }
  |  

 My components.xml is
  
  | <components>
  |     <component name="org.jboss.seam.core.init">
  |         <property name="debug">true</property>
  |         <property name="myFacesLifecycleBug">true</property>
  |         <property name="jndiPattern">DPA/#{ejbName}/local</property>
  |     </component>
  |     <component name="org.jboss.seam.core.manager">
  |         <property name="conversationTimeout">120000</property>
  |     </component>
  |     <component class="org.jboss.seam.core.Ejb" installed="false"/>
  | </components>
  |  

  In my .xhtml file i have the java script as listed below
  
  |    <script type="text/javascript" src="seam/remoting/resource/remote.js">
  |         </script>
  |         <script type="text/javascript" src="seam/remoting/interface.js?dpaSliderListener">
  |         </script>
  |         <script type="text/javascript">
  |             //<![CDATA[
  |             function sendData(document.currentSlider.valueX) {
  |                 Seam.Component.getInstance("dpaSliderListener").setValue(document.currentSlider.valueX, setValueForSlider);
  |             }
  |             function setValueForSlider(result) {
  |                 alert(result);
  |             }
  |             
  |             // ]]>
  |         </script>  
  |   

  Here is the Console log
  
  | 
  |      16:37:17,688 INFO  [EARDeployer] Init J2EE application: file:/D:/MyServers/JBoss4.0.4P1/server/default/deploy/DPA.ear
  | 16:37:23,767 WARN  [MainDeployer] Found non-jar deployer for jboss-seam.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deploy
  | er]
  | 16:38:47,039 INFO  [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarke
  | r to com.lmco.dpa.SliderListener org.jboss.annotation.internal.DefaultInterceptorMarkerImpl at 1fc6dc6
  | 16:38:47,211 INFO  [Ejb3Deployment] EJB3 deployment time took: 1031
  | 16:38:47,289 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DPA.ear,jar=DPA-ejb.jar,name=SliderListener,s
  | ervice=EJB3 with dependencies:
  | 16:38:47,461 INFO  [EJBContainer] STARTED EJB: com.lmco.dpa.SliderListener ejbName: SliderListener
  | 16:38:47,523 INFO  [EJB3Deployer] Deployed: file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp46165DPA.ear-co
  | ntents/DPA-ejb.jar
  | 16:38:47,742 INFO  [TomcatDeployer] deploy, ctxPath=/DPA-war, warUrl=.../tmp/deploy/tmp46165DPA.ear-contents/DPA-war-exp
  | .war/
  | 16:38:49,242 INFO  [FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
  | 16:38:49,461 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/jboss-seam.jar!/META-INF/faces-config.xml
  | 16:38:49,461 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/jboss-seam-ui.jar!/META-INF/faces-config.xml
  | 16:38:49,477 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/jboss-seam-debug.jar!/META-INF/faces-config.xml
  | 16:38:49,492 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/jsf-facelets.jar!/META-INF/faces-config.xml
  | 16:38:49,492 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/DPA-war-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/faces-config.xml
  | 16:38:49,508 INFO  [FacesConfigurator] Reading config jar:file:/D:/MyServers/JBoss4.0.4P1/server/default/tmp/deploy/tmp4
  | 6165DPA.ear-contents/DPA-war-exp.war/WEB-INF/lib/jboss-seam.jar!/META-INF/faces-config.xml
  | 16:38:49,524 INFO  [FacesConfigurator] Reading config /WEB-INF/faces-config.xml
  | 16:38:49,758 WARN  [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_US
  | 
  | 16:38:50,180 INFO  [StartupServletContextListener] ServletContext 'D:\MyServers\JBoss4.0.4P1\server\default\.\tmp\deploy
  | \tmp46165DPA.ear-contents\DPA-war-exp.war\' initialized.
  | 16:38:50,180 INFO  [ServletContextListener] Welcome to Seam 1.0.1.GA
  | 16:38:50,242 INFO  [Initialization] no components.xml file found
  | 16:38:50,242 INFO  [Initialization] reading properties from: /jndi.properties
  | 16:38:50,258 INFO  [Initialization] initializing Seam
  | 16:38:50,399 INFO  [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jbos
  | s.seam.core.Init
  | 16:38:50,539 INFO  [Component] component =Component(org.jboss.seam.core.init) and hashCode =3723432 BeanClass =class org
  | .jboss.seam.core.Init getClass =class org.jboss.seam.Component
  | 16:38:50,539 INFO  [Component] result    =org.jboss.seam.core.Init at adb3f getClass=org.jboss.seam.core.Init at adb3f hashCod
  | e =711487
  | 16:38:50,539 INFO  [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jbo
  | ss.seam.core.Pages
  | 16:38:50,555 INFO  [Component] Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Events
  | 
  | 16:38:50,571 INFO  [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.s
  | eam.core.Manager
  | 16:38:50,602 INFO  [Component] Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
  | 16:38:50,617 INFO  [Component] Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Red
  | irect
  | 16:38:50,617 INFO  [Component] Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Htt
  | pError
  | 16:38:50,633 INFO  [Component] Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core
  | .UserPrincipal
  | 16:38:50,649 INFO  [Component] Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.
  | IsUserInRole
  | 16:38:50,664 INFO  [Component] Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core
  | .Conversation
  | 16:38:50,680 INFO  [Component] Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Con
  | versationList
  | 16:38:50,680 INFO  [Component] Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Co
  | nversationStack
  | 16:38:50,696 INFO  [Component] Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.
  | FacesContext
  | 16:38:50,696 INFO  [Component] Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.P
  | ageContext
  | 16:38:50,711 INFO  [Component] Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.
  | EventContext
  | 16:38:50,711 INFO  [Component] Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.cor
  | e.SessionContext
  | 16:38:50,727 INFO  [Component] Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.c
  | ore.StatelessContext
  | 16:38:50,727 INFO  [Component] Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam
  | .core.ApplicationContext
  | 16:38:50,742 INFO  [Component] Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.sea
  | m.core.ConversationContext
  | 16:38:50,742 INFO  [Component] Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.
  | seam.core.BusinessProcessContext
  | 16:38:50,805 INFO  [Component] Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
  | 16:38:50,805 INFO  [Component] Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
  | 
  | 16:38:50,821 INFO  [Component] Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.In
  | terpolator
  | 16:38:50,821 INFO  [Component] Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.cor
  | e.FacesMessages
  | 16:38:50,836 INFO  [Component] Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Re
  | sourceBundle
  | 16:38:50,867 INFO  [Component] Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Lo
  | caleSelector
  | 16:38:50,883 INFO  [Component] Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiC
  | omponent
  | 16:38:50,899 INFO  [Component] Component: org.jboss.seam.remoting.messaging.subscriptionRegistry, scope: APPLICATION, ty
  | pe: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
  | 16:38:50,914 INFO  [Component] Component: pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Poj
  | oCache
  | 16:38:51,102 INFO  [Component] component =Component(applicationContext) and hashCode =4990595 BeanClass =class org.jboss
  | .seam.core.ApplicationContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.ApplicationContext at 1748ba4 getClass=org.jboss.seam.core.Ap
  | plicationContext at 1748ba4 hashCode =24415140
  | 16:38:51,102 INFO  [Component] component =Component(isUserInRole) and hashCode =8116333 BeanClass =class org.jboss.seam.
  | core.IsUserInRole getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.IsUserInRole at bdff3b getClass=org.jboss.seam.core.IsUserInR
  | ole at bdff3b hashCode =12451643
  | 16:38:51,102 INFO  [Component] component =Component(statelessContext) and hashCode =907329 BeanClass =class org.jboss.se
  | am.core.StatelessContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.StatelessContext at f09995 getClass=org.jboss.seam.core.State
  | lessContext at f09995 hashCode =15767957
  | 16:38:51,102 INFO  [Component] component =Component(userPrincipal) and hashCode =10135900 BeanClass =class org.jboss.sea
  | m.core.UserPrincipal getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.UserPrincipal at 1e4d960 getClass=org.jboss.seam.core.UserPri
  | ncipal at 1e4d960 hashCode =31775072
  | 16:38:51,102 INFO  [Component] component =Component(sessionContext) and hashCode =24859001 BeanClass =class org.jboss.se
  | am.core.SessionContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.SessionContext at 121f956 getClass=org.jboss.seam.core.Sessio
  | nContext at 121f956 hashCode =19003734
  | 16:38:51,102 INFO  [Component] component =Component(facesContext) and hashCode =24686841 BeanClass =class org.jboss.seam
  | .core.FacesContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.FacesContext at aab87f getClass=org.jboss.seam.core.FacesCont
  | ext at aab87f hashCode =11188351
  | 16:38:51,102 INFO  [Component] component =Component(businessProcessContext) and hashCode =3587082 BeanClass =class org.j
  | boss.seam.core.BusinessProcessContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.BusinessProcessContext at 17360be getClass=org.jboss.seam.cor
  | e.BusinessProcessContext at 17360be hashCode =24338622
  | 16:38:51,102 INFO  [Component] component =Component(eventContext) and hashCode =30698528 BeanClass =class org.jboss.seam
  | .core.EventContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.EventContext at 106e02e getClass=org.jboss.seam.core.EventCon
  | text at 106e02e hashCode =17227822
  | 16:38:51,102 INFO  [Component] component =Component(pageContext) and hashCode =6819952 BeanClass =class org.jboss.seam.c
  | ore.PageContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.PageContext at f3387 getClass=org.jboss.seam.core.PageContext
  | @f3387 hashCode =996231
  | 16:38:51,102 INFO  [Component] component =Component(conversationContext) and hashCode =735 BeanClass =class org.jboss.se
  | am.core.ConversationContext getClass =class org.jboss.seam.Component
  | 16:38:51,102 INFO  [Component] result    =org.jboss.seam.core.ConversationContext at bc839a getClass=org.jboss.seam.core.Co
  | nversationContext at bc839a hashCode =12354458
  |      16:38:51,117 INFO  [Initialization] done initializing Seam
  | 16:38:51,196 INFO  [EARDeployer] Started J2EE application: file:/D:/MyServers/JBoss4.0.4P1/server/default/deploy/DPA.ear
  |   


  How ever in my .xhtml page when i view the source i don't see the dpaSliderListener.js File and hence it is giving a JavaScript Error ..

  I don't see any Error in the server console..

  I see the stateless session bean in my JNDI View..

 
  |      Global JNDI Namespace
  | 
  |   +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  |   +- DPA (class: org.jnp.interfaces.NamingContext)
  |   |   +- SliderListener (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- local (proxy: $Proxy62 implements interface com.lmco.dpa.ISliderListenerLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
  |   +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
  |  


Thanks
Sateesh

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963025



More information about the jboss-user mailing list