facebook

Scaffolding fails – MyEclipse Version: 8.6, Flex4, MySQL

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

    npopov
    Member

    Looks like the scaffolding is failing during the DAO generation.
    No entries in the ErrorLog.

    MySQL 5.0.77 server running on CentOs 5.
    MyEclipse Version: 8.6
    Windows 7 32 bit

    For data source I use one created in the DB browser. Here is the connection string.
    jdbc:mysql://xx.xx.xx.xx:3306/acman
    I can open connection in the DB Browser
    During the wizard run, I can see/select tables.

    MySQL driver is installed in:
    <user_home>\.myeclipse\libs\mysql-connector-java-5.1.13\mysql-connector-java-5.1.13-bin.jar

    Selected all needed tables from the schema – scaffolding failed.
    Removed project/workspace.
    Selected just one table – scaffolding failed again.
    Removed project/workspace.
    Attempted the DERBY connection and the scaffolding is working just fine.

    Let me know if you need the schema script.

    Please help ASAP.

    Regards,
    -Nick

    #313406 Reply

    npopov
    Member

    some more info:

    after scaffolding:

    /generated folder is empty
    -dao.properties is empty
    -dao-context.xml does not have DS definition in it

    Regards,
    -Nick

    #313408 Reply

    npopov
    Member

    Reinstalled 8.6.1 – same problem.

    #313422 Reply

    npopov
    Member

    Here is how I made it work …. if this can be considered a workaround at all.
    1. During wizard run-time had to specify dialect:
    Strangely the dialect that worked was: org.hibernate.dialect.MySQLInnoDBDialect
    One would expect with MySQL 5.0.77 to use: org.hibernate.dialect.MySQL5InnoDBDialect
    This took a problem of the code generation part.
    2. During start-up:
    * Driver not found – as memory serves me, in the previous 8.5 version this have been taken care of. Added manually driver to classpath. Why now the wizard adds Postgress JBDC no mater what DB is used???
    * After driver problem was fixed – new hump – dialect class not foud. The *-dao.properties file had the dialect property blank. Removed it. The *-generated-dao-context.xml contained reference to this property – removed the reference.

    3. Now the app is up and running, but all child tables are missing from the interface. I’ll simplify the schema (non-ident to ident relations, non-mandatory to mandatory FK values, etc.) and continue to publish my results.

    Just want to mention that this is awfully lot of tweaking and QA work to make tutorial app with small divination work. Those results are way under satisfactory levels even for POC app.

    Any word or help from the support team is greatly appreciated.

    Regards,
    -Nick

    #313575 Reply

    jkennedy
    Member

    Nick, thanks for the update, sorry for the delay in responding.

    First the easy part, you will need to add the MySQL Driver to your projects. We are working to make the libs that are selected automatically at the end of the wizard smarter but in the 8.x releases there is just a default set and Postgres is one of the default options.

    Regarding the issue you ran into with the Dialect, you may need to set the dialect differently for different DB’s, but once you do, that should carry through into what is generated. By your description is sounds like there was still an issue in the scaffolding process that caused relationships to not be picked up, and the dao properties to not be emitted correctly.

    Your correct, we wouldn’t expect you to have to do too much on the far side of the scaffolding process itself.

    We get the database meta data through Hibernate and so the dialect that works in this case is largely up to hibernate, but I would like to make sure I have the details we need to solve the problem.

    One thing we have found is that you may see an issue in scaffolding against older versions of MySQL if the database connection does not have the same name in the “database name” field as it does at the end of the connect String. e.g. jdbc:mysql://localhost:3306/databasename.

    Can you verify that this was not the issue.

    Thanks,
    jack

    #313578 Reply

    npopov
    Member

    Hi Jack,

    In order to your suggestions::
    1. The driver is in the project class path and is added to the exploded deployment
    2. The server side runs MySQL 5.0.77 on CentOs 5. Does that qualifies for an “older” database?
    3. As stated on older post, I made sure that the database name matches the database (including case) in the JDBC connection string. I use connection that does already exists on in the DB explorer.
    4. The code generation halts after producing the spring config artifacts. No DAO related classes are generated. No flex code is generated. No errors generated in the log.
    3. The schema that causes the code gen to fail is a bit more complex than the one on the tutorial.

    What I’ll do is:
    1. I’ll simplify the schema (2 tables, single 1-to-many identifying relationship between them) and try to generate. I’ll not make any other changes (driver, db name, etc.) so I can put apples to apples.
    2. I’ll send you (please instruct how) the “failing” schema so you can try it yourself.

    Let me know if I can get you any more info(logs, screen-shots, etc.) to resolve this issue.

    Regards,
    -Nick

    #313661 Reply

    jkennedy
    Member

    Nick,
    Thanks can you please email those file to [email protected].

    Sorry, 5.0.77 is not an older database really, I should have said previous version rather than older version.

    Thanks,
    Jack

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Scaffolding fails – MyEclipse Version: 8.6, Flex4, MySQL

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