8 Replies Latest reply on Aug 15, 2007 2:13 AM by maxandersen

    The type Iterator is not generic; it cannot be parameterized

    maykellff

      Hi all, i think i've discovered a bug in Eclipse, ExadelStudio or Subclipse.
      The error is the following:
      If share a Web JSF Exadel project enterely, with the .classpath, the .project,
      ect everything go ok. I can Check out the project
      and work with it without problems.
      But if i share only the JavaSource and the Webcontent of the same project
      and the other files and folders like the .classpath, the .project, the ant folder,
      ect are added to the subversion then appear the problem. When i Check out the project and build it (not with shift-alt-x Q but with the Build Project option of the Projec Menu in Eclipse)
      appear an strange error that say: "The type Iterator is not generic; it cannot be parameterized with arguments ".


      If i build the project using the build.xml file that came with the project everything is ok, but when i run the project into the Exadel the error
      appear againt.

      The error appear with all the eclipse versions from 3.1 to 3.3 and with all the ExadelStudio Pro versions from 3.5 to 4.0.4

      Any idea will be very appreciated.



        • 1. Re: The type Iterator is not generic; it cannot be parameter
          maxandersen

          sounds like you are trying to run eclipse with a non-java 5 jdk...

          • 2. Re: The type Iterator is not generic; it cannot be parameter
            maykellff

            That's the problem, i use the jdk 1.5, beside i proved with the jdk 1.6 and the error is the same, i ensured myself of be using the rigth jdk.

            Even more i get to build the application with ant, i modified the build.xml that Exadel attach to the application, it build ok and deploy the war into a Tomcat 5.5 server, but when i run the server the error appeared againt, the browser show the following error:


            org.apache.jasper.JasperException: Unable to compile class for JSP

            Generated servlet error:
            The type Collection is not generic; it cannot be parameterized with arguments <? extends E>


            org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
            org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
            org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ........ and go on

            I know that the code is ok, this same code 4 weeks ego didn't have any problem, since them i haven touched it, the problem come when we upgrade the Exadel and the Eclipse, from Eclipse 3.1 with ExadelStudio Pro 3.5 to Eclipse 3.2.1 with ExadelStudio Pro 4.0.1 and 4.0.4.




            • 3. Re: The type Iterator is not generic; it cannot be parameter
              maykellff

              Hi, i think i found a clue to discover the mistery, i deployed the same .war in the ExadelStudio Pro 3.5.1 tomcat and in the ExadelStudio Pro 4.0.1(and 4.0.4) tomcat in the first one everythink work fine but in the second i get the error i described above.
              The ExadelStudio Pro 3.5.1 use Tomcat 5.0 and ExadelStudio Pro 4.0.1 and 4.0.4 use Tomcat 5.5

              ?There are some problem with the new versions of Tomcat?
              ?Something related to the use of an old version of the JVM by default?

              • 4. Re: The type Iterator is not generic; it cannot be parameter
                maxandersen

                Your errors are purely related to mixing pre-jdk 1.5 libraries with jdk5 compiled code.....

                • 5. Re: The type Iterator is not generic; it cannot be parameter
                  maykellff

                  I don't know what exactly you refer to. When you say that :
                  "Your errors are purely related to mixing pre-jdk 1.5 libraries with jdk5 compiled code....."
                  i think that you are refering to the fact that the jar files i'm using were compiled with an old jdk and my code is compiled with the jdk1.5, is it?

                  What exactly you refer to?
                  How can i eliminate this problem?

                  • 6. Re: The type Iterator is not generic; it cannot be parameter
                    maxandersen

                    You are getting those errors because you are running code with generics in them on a collection library that is only JDK 1.4

                    • 7. Re: The type Iterator is not generic; it cannot be parameter
                      maykellff

                      I don't understand very well, i can compile the project without problems using ant, and the jdk i use to compile the code is the only one i have instaled the jdk1.5, everything came when i deploy the application in Tomcat 5.5 and try to run it, it rise the error.

                      How can i aboid this?

                      • 8. Re: The type Iterator is not generic; it cannot be parameter
                        maxandersen

                        it is in tomcat the error is.

                        your tomcat seem to be running jdk 1.4 libraries.