facebook

Scaffolding w/ PostgreSQL using "Myeclipse 8.5 for spri

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

    anjanb
    Member

    hi there,

    I downloaded 8.5 for eclipse 3.5.2. here are the further steps I did to generate scaffolding code using PostgreSQL 8.4 JDBC3 type 4 driver.

    1) create a NEW “web project”.
    2) then ask for generating a Spring MVC CRUD scaffolding using “Database Schema”.
    3) setup postgreSQL as a data source(using Create Connection…) and choose
    4) Test that the data source works.
    5) In “Schema Details” dialog, select option “Display the Selected schemas” and choose public (makes sense for PostgreSQL DB)
    5) select the newly created Connection(Data Source)
    6) goto NEXT item in the Wizard “Select Database Tables”.
    7) I see that the “catalog”, “schema”, “Dialect” and “metadata Dialect” DROP-DOWN controls are all grayed out(disabled)

    However, instead of selecting PostgreSQL (the connection that I created), if I selected the inbuilt DERBY DB, I was able to see options for Schema, Dialect and “metadata dialect”.

    So, why doesn’t PostgreSQL connection work ? Are there any workarounds ?

    Thank you,

    BR,
    ~A

    #309583 Reply

    Heflin Hogan
    Member

    You shouldn’t see the Catalog dropdown at all for Postgres. Could you check your error log?

    #309606 Reply

    anjanb
    Member

    I dont’ expect Catalog dropdown on Postgres BUT even the “schema” dropdown was readonly.

    I expect something to happen. FINISH was NOT enabled.

    this was NO GO!

    #309608 Reply

    Heflin Hogan
    Member

    What you are seeing is probably a symptom of not being able to retrieve the database metadata. To determine what the actual problem is, I need you to look at your error log and provide any relevant diagnostics.

    #309618 Reply

    anjanb
    Member

    hi hogan,

    thanks for the quick response.

    “What you are seeing is probably a symptom of not being able to retrieve the database metadata. To determine what the actual problem is, I need you to look at your error log and provide any relevant diagnostics.”

    Where is the Error log ?

    Just so you know, I tried to connect to MySQL db. Even for this DB, I had an error subsequent to a SUCCESSful test.

    thank you,

    BR,
    ~A

    #309619 Reply

    anjanb
    Member

    For PostgreSQL, I tried again using the 8.6 M2 version and found that it had the same behavior as 8.5. Just so you know, I am using PostgreSQL 8.4 on Windows Vista and the DB driver is postgresql-8.4-701.jdbc3.jar.

    Thank you,

    BR,
    ~A

    #309621 Reply

    anjanb
    Member

    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.RuntimeException: Unable to connect to profile: Postgres_Nucleus)
    at org.eclipse.swt.SWT.error(SWT.java:3884)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.skyway.core.generate.ui.wizard.WizardUserInterface.show(WizardUserInterface.java:50)
    at org.skyway.core.generate.execute.GenerationInvoker.invokeUserInterface(GenerationInvoker.java:174)
    at com.skyway.scaffolding.crud.action.GenerateCrudApplicationAction.invokeUserInterface(GenerateCrudApplicationAction.java:36)
    at org.skyway.core.generate.execute.GenerationInvoker.invoke(GenerationInvoker.java:62)
    at com.skyway.scaffolding.crud.action.GenerateCrudApplicationAction.invoke(GenerateCrudApplicationAction.java:45)
    at org.skyway.core.generate.execute.GenerationActionInvoker.run(GenerationActionInvoker.java:38)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)

    #309622 Reply

    anjanb
    Member

    just so you know, while setting up the driver in the “NEW Database Connection Driver” Dialog, I pressed the button “Test Driver” and after entering the password in the prompt, I got the message box “Database connection successfully established”. The same happened with the Mysql driver as well.

    Postgresql : I selected “public” as the schema to open.

    But after pressing NEXT, i found that the schema is NOT populated for me to pick the right tables. Then I noticed the Error log with the above contents.

    SUMMARY : I am unable to select the TABLES in the “SELECT DATABASE TABLES” dialog; However, in the “NEW Database Connection Driver” dialog, it reports that there was a successful connection. I’m sure there’s a bug out there. Can you pls. test adding a mysql or postgresql db on your setup ?

    Thank you,

    BR,
    ~A

    #309624 Reply

    anjanb
    Member

    Hey guys,

    I found the bug! You guys don’t store the password to the DB and discard it. In the “SELECT DATABASE TABLES” dialog, you try to connect to the DB with an EMPTY password. That’s why it failed earlier. I tried again connecting to Mysql by using a BLANK/EMPTY password and this time it worked!!

    BR,
    ~A

    #309626 Reply

    Heflin Hogan
    Member

    I’ve generally found that checking the “save password” check box in the new connection dialog solves that problem.

    Attachments:
    You must be logged in to view attached files.
    #309633 Reply

    anjanb
    Member

    hi hogan,

    thank you.

    that is what I ended up doing after discovering that a BLANK password for the db user worked!

    ISSUE : Even thought the user does not check the “save password” checkbox, you prompt for the password 2 times (once after pressing “Test Driver” and later when selecting which schema). The user is lulled to believe that the software will prompt for the password when required. The software needs to prompt for the password even during “SELECT DATABASE TABLES” dialog.

    Thank you,

    BR,
    ~A

    #309648 Reply

    Heflin Hogan
    Member

    You are correct, we definitely need to be prompting for a password there in this situation. I’ve entered a report on it. Thank you for working through the issue!

    Regards,
    Heflin Hogan

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Scaffolding w/ PostgreSQL using "Myeclipse 8.5 for spri

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