10 Replies Latest reply on Jun 17, 2008 9:40 PM by coolex

    Error with the messages example

    coolex

      Hi!


      I'm trying to make the
      message example run. I have absolutely the same code like in the example and no eclipse errors arise.


      But unfortunaly I always get an error HTTP Status 404 - /Message2/debug.jsp. I couldn't find the debug.jsp file anywhere.


      I used the seam console script (seam setup, seam create-project) to create an eclipse project.
      Then I created all the files with the appropriate package names.


      Hope you can help me.


      Thanks

        • 1. Re: Error with the messages example
          mkiel

          The debug page should be automatically handled by the Seam servlet, so you don't have to have any such page in your project. Did you try accessing the page(s) with .seam instead of .jsp?


          Whatever is wrong with the debug page - you might want to simply observe the output from the application server (JBoss I assume), which should also be written to the file jboss/log/stdout.log. You should find verbose debug information in jboss/server/default/log/server.log.

          • 2. Re: Error with the messages example
            coolex

            How should I create the Entity and Session Beans? Just create a new Java class and write the code oder should without editing any xml configuration files? Or should I use the SEAM Eclipse plugin to create them?

            • 3. Re: Error with the messages example
              mkiel

              Right, you only have to create annotated Java classes. In simple situations, there is normally no need for any XML configuration beyond what seam-gen generates for you. I haven't worked with JBoss Tools myself yet, but it should be the easiest way to start - you might want to forget seam-gen and create the whole project with the Seam plugin.

              • 4. Re: Error with the messages example
                coolex

                No, I used at the very beginning seam setup and then seam cerate-project. After this I created a new project in eclipse and imported what seam created for me.

                • 5. Re: Error with the messages example
                  mkiel

                  Sure, either way is fine. Then just create the Java source files as you would in any other project and annotate the classes as described in the tutorial and reference docs.

                  • 6. Re: Error with the messages example
                    coolex

                    Well, this is exactly what I did.
                    But the tutorial does not explain how to use packages, where (model, action) do I have to create the Java file.
                    What about the imports?
                    All this information I'm trying to find out myself.
                    So, maybe the error has something to do with that things.

                    • 7. Re: Error with the messages example
                      mkiel

                      I see. Seam doesn't care about the package names of your classes, pick whatever suits you. Place the classes of the entities (Message.java in the example) in the model folder and the session bean classes (MessageManagerBean.java) and their interfaces (MessageManager.java) in the action folder.


                      Regarding the imports: simply check the message example in the Seam distro where you can find the complete source files.

                      • 8. Re: Error with the messages example
                        coolex

                        Ok, Eclipse shows me this error message: ...Cannot find FacesContext

                        • 9. Re: Error with the messages example
                          mkiel

                          What is the precise error message and where does it appear?

                          • 10. Re: Error with the messages example
                            coolex

                            Eclipse shows me this message after trying to execute.