[jboss-user] [JBoss Seam] - Component being dropped from list of Components in JNDI

tony.herstell@gmail.com do-not-reply at jboss.com
Wed May 23 19:08:08 EDT 2007


NOTE: This is with IceFaces DR#4 but appears to be Seam bug or my code!

anonymous wrote : 
  | 10:48:08,937 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=risingstars.ear,jar=risingstars_jar.jar,name=UploadControllerImpl,service=EJB3 with dependencies:
  | 

anonymous wrote : 
  | 10:48:12,859 INFO  [Component] Component: uploadController, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: nz.co.risingstars.actions.upload.UploadControllerImpl, JNDI: risingstars/UploadControllerImpl/local
  | 

anonymous wrote : 
  | Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: uploadController
  | 	at org.jboss.seam.Component.newInstance(Component.java:1740)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1643)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1610)
  | 	at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
  | 	at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
  | 	at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
  | 	at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
  | 	at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
  | 	... 47 more
  | Caused by: javax.naming.NameNotFoundException: UploadControllerImpl not bound
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
  | 	at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
  | 	at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
  | 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
  | 	at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
  | 	at org.jboss.seam.Component.instantiate(Component.java:1093)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1736)
  | 	... 54 more
  | 10:48:55,765 ERROR [DebugPageHandler] redirecting to debug page
  | javax.naming.NameNotFoundException: UploadControllerImpl not bound
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
  | 	at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
  | 	at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
  | 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
  | 	at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
  | 



  | @SuppressWarnings("serial")
  | @Stateful // A component stays in existance for the duration of the Scope (conversation in this instance).
  | @Name("uploadController") // Name used within SEAM for an instance of this class.
  | @Conversational // Scope that this class exists in.
  | public class UploadControllerImpl implements UploadController, Renderable, Serializable {
  | 
  |     /**
  |      * The maximum width allowed for image rescaling
  |      */
  |     private static final int MAX_IMAGE_WIDTH = 1024;
  |     
  |     /**
  |      * Inject and leverage the Seam Logger.
  |      */
  |     @Logger
  |     private Log log;
  |     
  |     /**
  |      * Inject the EJB3 Persistance context in EXTENDED mode so will remain "current" over 
  |      * multiple clinet/server round trips.
  |      */
  |     @PersistenceContext(type = EXTENDED)
  |     private EntityManager em;
  |     
  |     /**
  |      * Inject the Seam Conversation coponent so that I can report on it for logging purposes.
  |      */
  |     @In(required = false)
  |     private Conversation conversation;
  |     
  |     /**
  |      * Inject the Faces Messages component so that messages (errors and info) can be sent to the View
  |      */
  |     @In(create = true)
  |     private transient FacesMessages facesMessages;
  |     
  |     /**
  |      * Outject the Primary Key of the required Image
  |      */
  |     @SuppressWarnings("unused")
  |     @Out
  |     private Long picturePrimaryKey = new Long(-1);
  | 
  |     private enum ParentObjectKind {ORGANISATION, USER};
  |     
  |     @Out
  |     private ParentObjectKind parentObjectKind = null;
  | 
  |     private long parentObjectPrimaryKey;
  |     
  |     private int percent = -1;
  | 
  |     private PersistentFacesState state = null;
  |     
  |     private Image image = null;
  | 
  |     /**
  |      * An instance of the Inner Calss to support the progress.
  |      */
  |     private InnerProgressMonitor innerProgressMonitor;
  |     
  |     @Create // Is run whenever this bean is created.
  |     @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  |     public void getFacesState() {
  |         innerProgressMonitor = new InnerProgressMonitor();
  |         state = PersistentFacesState.getInstance();
  |     }
  |     
  |     /* (non-Javadoc)
  |      * @see nz.co.risingstars.actions.upload.UploadController#startUpload(java.lang.Object)
  |      */
  |     @Begin
  |     @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  |     public String startUpload(Object selectedObject) {
  |         log.info("> startUpload");
  |         image = null;       
  |         String theValueToBeReturned = null;
  |         state = PersistentFacesState.getInstance();
  |         if (selectedObject instanceof Organisation) {
  |             parentObjectKind = ParentObjectKind.ORGANISATION;
  |             Organisation organisation = (Organisation)selectedObject;
  |             parentObjectPrimaryKey = organisation.getId();
  |             log.info("Organisation Id was => " + parentObjectPrimaryKey);
  |             if (organisation.getPicture() != null) {
  |                 picturePrimaryKey = organisation.getPicture().getId();
  |             }
  |             theValueToBeReturned = "upload";
  |         } else if (selectedObject instanceof User) {
  |             parentObjectKind = ParentObjectKind.USER;
  |             User user = (User)selectedObject;
  |             parentObjectPrimaryKey = user.getId();
  |             log.info("User Id was => " + parentObjectPrimaryKey);
  |             if (user.getPicture() != null) {
  |                 picturePrimaryKey = user.getPicture().getId();
  |             }
  |             theValueToBeReturned = "upload";
  |         } else {
  |             log.error("upload called with object type not supported.");
  |         }
  |         logConversation("Upload");
  |         log.info("< startUpload");
  |         return theValueToBeReturned;
  |     }
  | etc.
  | 

launched by

  | <s:button value="#{messages.button_add_image}"
  |                         action="#{uploadController.startUpload(the_organisation)}" rendered="#{the_organisation.picture == null}"/>
  | 


Seam Component class (uploadController) (bean class = class nz.co.risingstars.actions.upload.UploadControllerImpl)

  |          Object bean = Naming.getInitialContext().lookup(jndiName);
  | 

looking up: risingstars/UploadControllerImpl/local

leads to:  (only these in the ctx.table in NamingServer class)


  | {
  | CRUDUserControllerImpl=CRUDUserControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at a01ae18, 
  | CRUDOrganisationControllerImpl=CRUDOrganisationControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 744caec9, 
  | EncryptionControllerImpl=EncryptionControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 566749c5, 
  | UserRegistrationControllerImpl=UserRegistrationControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 171c50d4, 
  | MenuImpl=MenuImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 43fe9a26, 
  | FindOrganisationControllerImpl=FindOrganisationControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 3a57aa, 
  | LoggedInUserImpl=LoggedInUserImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 76515a03, 
  | FindUserControllerImpl=FindUserControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 56ecb7a4, 
  | TransactionListener=TransactionListener: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 4f0c9c91, 
  | AuthenticationControllerImpl=AuthenticationControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 44fb1c22, 
  | AvailabilityControllerImpl=AvailabilityControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 41f41f8f, 
  | Dispatcher=Dispatcher: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 244071d, 
  | ContentControllerImpl=ContentControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 402f0214, 
  | LoginControllerImpl=LoginControllerImpl: org.jnp.interfaces.NamingContext:org.jnp.server.NamingServer at 4e318ff7}
  | 

Sow where did it go?

Am I missing something?



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

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



More information about the jboss-user mailing list