1 Reply Latest reply on Nov 25, 2002 1:35 PM by steveconley

    Petstore 1.1.2, setters, remote interface type

    steveconley

      (Hope fully this is not a duplicate post - it errored out the first time).

      Hi, this is my first post here and I thought I would share some knowledge as I ask for answers. I could not find any answers, although I found a few references (unsolved) to this first problem anywhere on the net:

      Environment:
      Win2K, Workstation, current patch level on everything from Microsoft.

      j2sdk1.4.0_01
      j2sdkee1.3.1
      jakarta-ant-1.5.1
      jboss-3.0.4_tomcat-4.1.12

      Java Petstore: jps-1_1_2.zip
      JBOSS Petstore Patch: jps112-01.zip

      The problem was that I got the error message:

      "unable to find setter method for numItems"
      on the page "productcategory.jsp" when it was referenced and compiled.

      The answer is is that in one of these packages, I suspect JDK1.4 or Tomcat, somebody FIXED the JSP compiler to require that "setters" arguments match "getter" return type. Which is of course legal Java Beans. Someone was lax in a prior version.

      To fix, you must fix ListTag (change the setter's argument), and then fix all the classes that inherit from it. (Take out the overloaded methods for setNumItem and setStartIndex, replace the direct references with the appropriate calls).

      Then it works like a champ.

      My QUESTION is the following:

      Every OTHER time I build the petstore application and deploy it, it gets an error like the following:

      12:31:36,137 INFO [EJBDeployer]
      Bean : TheCart
      Method : public abstract ShoppingCart create(HashMap) throws RemoteException, CreateException
      Section: 7.10.6
      Warning: The return type for a create(...) method must be the session bean's remote interface type.

      12:31:36,288 INFO [EJBDeployer]
      Bean : TheCart
      Method : public abstract ShoppingCart create() throws RemoteException, CreateException
      Section: 7.10.6
      Warning: The return type for a create(...) method must be the session bean's remote interface type.

      12:31:36,568 INFO [EjbModule] Creating

      They always come in pairs and it is not the same module. And if you build and deploy again WITH NO CHANGES, it will be gone. But back on a potentially different module the next time.

      What is going on here?

      Any thoughts appreciated. Thanks.

      And last, I would like to thank the JBOSS team for the work on this. It looks good. I am going to be evaluating it for speed to use it on an upcoming project. If it works out,I will make sure you get some of the $$$ flowing your way.

      I will probably try Petstore 1.3 in the near future and will post the results if I do ...