1 Reply Latest reply on Feb 18, 2009 1:21 PM by blabno

    Session Bean could not be instantiated

    ben27

      Hi,


      I have a problem with a session bean. Maybe anybody can help me. I did it in a similar way with Seam 2.0.2 SP1 and JBoss 4.2.2 GA App Server.


      Here is the code of the bean:




      @Name("entitiesList")
      public class EntitiesList extends EntityQuery<Entities>
      {
      
              @Logger
              Log log;
      
              @DataModelSelection
              private Entities selectedStructure;
      
              @DataModel
              private List<Entities> structures;
              
              @In(create=true)
              private int[] results;
      
              public List<Entities> getStructures() {
                      return structures;
              }
      
              public void setStructures(List<Entities> structures) {
                      this.structures = structures;
              }
      
              public Entities getSelectedStructure() {
                      return selectedStructure;
              }
      
              public void setSelectedStructure(Entities selectedStructure) {
                      this.selectedStructure = selectedStructure;
              }
      
          private static final String[] RESTRICTIONS = {... };
      
          private Entities entities = new Entities();
      
          public EntitiesList()
          {
              if(results == null) {
                              System.out.println("RESULTS = NULL");
                              setEjbql("");
                      } else {
                              setEjbql("select entities from Entities entities where cd_id IN " + EjbQueryUtil.convertIdArrayToInString(results));
                      }
              setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
              setMaxResults(25);
          }
      
              @Destroy @Remove
              public void destroy(){}
      
          public Entities getEntities()
          {
              return entities;
          }
      
          public void searchNotify(ActionEvent event){
                      log.info("Inside Search Notify");
                      Events.instance().raiseEvent("resetResults");
              }
      }




      The searchNotify method is called from a xhtml page. It notifies another method where the results array is filled. I got the following exception:



      WARN  [lifecycle] Could not instantiate Seam component: entitiesList
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: entitiesList
              at org.jboss.seam.Component.newInstance(Component.java:2106)
              at org.jboss.seam.Component.getInstance(Component.java:1988)
              at org.jboss.seam.Component.getInstance(Component.java:1950)
              at org.jboss.seam.Component.getInstance(Component.java:1944)
              at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
              at ...
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.dom4j.InvalidXPathException: Invalid XPath expression: 'Actions'. Caused by: org.jaxen.dom4j.DocumentNavigator.getInstance()Lorg/jaxen/Navigator;
              at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:362)
              at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:59)
              at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
              at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
              at org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:183)
              at chemaxon.reaction.StandardizerConfiguration.read(StandardizerConfiguration.java:137)
              at chemaxon.reaction.StandardizerConfiguration.readXML(StandardizerConfiguration.java:119)
              at ...
      org.jboss.seam.Component.callComponentMethod(Component.java:2211)
              at org.jboss.seam.Component.callCreateMethod(Component.java:2134)
              at org.jboss.seam.Component.newInstance(Component.java:2094)
              ... 70 more





      Can anybody help me?