facebook

Generating App from POJO does not work

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #317625 Reply

    Mork
    Participant

    I tried to create a new application with just a POJO as the scaffolding target. I scaffold-ed the web and service layers, but when I run it (As a MyEclipse Application), it just hangs.

    What to do?

    ——————–

    Since there are no demos or documentation using POJOs with MyEclipse for Spring that I can find (either with a new project or adding one later after an original scaffolding), it would be great if you could add that additional documentation.

    Look forward to your reply.

    m

    #317631 Reply

    jkennedy
    Member

    Hmm, sorry to hear that you encountered an issue here.
    So I am assuming that there are no compile errors in the code, and that when the Tomcat server starts the project that you see the server console starting.
    Do you see any errors in the server console, or any messages to indicate how far the server got when it started?
    If you would like to share your POJO model I can try to recreate the issue.
    There is no difference in the generated code between Pojo and DB. Really, we just see the two as being two different ways to get at the same “input” information. The name of an entity, its fields, and their types.

    Also, just to verify a few house keeping items, can you confirm:
    1. There are no breakpoints in the project and you are running it and not debugging it?
    2. That there are no other projects in the server’s deploy folder. (Right click on your project under the server, browse deployment location, back up one level, look for old projects in this folder and delete them)

    Let me know if you can see any of these additional details.

    Thanks,
    Jack

    #317633 Reply

    Mork
    Participant

    Hi Jack

    Thanks for your reply.

    Nope, I didn’t see any deployed projects in the server folder and I never got a chance to set a breakpoint.

    I’ll email you that project.

    What’s now happening is that a “View” button does come up, but clicking on it crashes the app. (Will send you the error information as well).

    Thanks,

    m

    #317635 Reply

    jkennedy
    Member

    M,
    Thanks for the additional details.

    Please let me know if my last response is incorrect, but I wanted to update the forum with our latest notes.

    In this case, I believe we are running through the scaffolding process but unchecking the “dao” layer and only generating the Web and Service layers.
    When we do that, the code that is generated is wired up with “//TODO – xxx for the methods that would normally store or retrieve data.

    Since we don’t have a DAO layer to talk to, you would need to provide the logic to load your objects, and then set your view.
    You can refer to a generated project with a persistence layer to see the view names and variables names that you should use, in the future it would be ideal if we generated code that was commented out with this information to make that a bit easier.

    I believe that if you either scaffold with the DAO layer in place, or your implement your methods to review the correct variables and view names in the ModelAndView objects from the generated Controller, that you will get the results you are looking for.

    Thanks,
    Jack

    #317636 Reply

    Mork
    Participant

    I was expecting to be able to at least click the button shown and see the scaffolded JSP. I wouldn’t expect the JSP to actually POST or have any real functionality until I implemented those TODO methods.

    Is this correct of do I need to implement the controller methods even before the scaffolded JSP will display and not crash when I click the single “view” button shown?

    Thanks,

    #317638 Reply

    jkennedy
    Member

    It would be better to return the view name with an empty Object instance to avoid a failed page load.

    Most of our users generate the persistence layer, and so this has been considered a bit of an “advanced option” for developers who intend to open their controllers and put in their own code. It was built with that use case in mind, but the step above would be a fine improvement.

    Thanks,
    Jack

    #317716 Reply

    jkennedy
    Member

    We will not be able to get this issue resolved in 9.1 because the change is too large given our current release schedule, we will push to get it in the next maintenance window.

    #317718 Reply

    Mork
    Participant

    @jkennedy wrote:

    We will not be able to get this issue resolved in 9.1 because the change is too large given our current release schedule, we will push to get it in the next maintenance window.

    Thanks for this update.

    Can you give me an estimate on when the next maintenance window will be so I can report back to the team?

    Would the release that fixes this problem be say in July or August?

    – m

    #317720 Reply

    jkennedy
    Member

    I will update you when we have a date targeted, we are also working on MyEclipse 10.0 which may intersect. I want to be sure that we are not impacting your team negatively by NOT pushing this into 9.1. Can you confirm for me that your team is not significantly impacted in the near term given the work around to implement the empty methods with their own code in this case, and that this represents a training issue?

    Thanks,
    Jack

    #317722 Reply

    Mork
    Participant

    Hi Jack,

    Yes, we can get by in the near term with no difficulties. We can manually create any POJO and scaffold those until MyE for Spring can do this without overwriting our other artifacts. 🙂

    Thanks for your excellent followups and support.

    – m

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Generating App from POJO does not work

You must be logged in to post in the forum log in