facebook

Can not do JPA/Hibernate … Reverse Engineering with MySQL

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #298887 Reply

    duylamng
    Member

    Hello,
    I’m using MyEclipse 7.1.1 and MySQL 5.1.34. The MySQL connector with java is mysql-connector-java-5.1.7-bin. I tried so many time to generate Hibernate/JPA class by MyEcipse but it still did not work. Here below are my error log (which i copied from workspace error log):

    !ENTRY org.eclipse.core.jobs 4 2 2009-05-29 22:07:20.709
    !MESSAGE An internal error occurred during: "Generating Artifacts".
    !STACK 0
    java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
        at java.util.HashMap$ValueIterator.next(HashMap.java:871)
        at com.genuitec.eclipse.hibernate.tool.MESingleClassExporter.doStart(MESingleClassExporter.java:59)
        at com.genuitec.eclipse.hibernate.tool.hbm2x.VAbstractExporter.start(VAbstractExporter.java:97)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$3.execute(GenerateArtifactsJob.java:582)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:417)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    These information below are my system information that i copied from Myeclipse Installation Summary:

    *** Date: 
    Friday, May 29, 2009 10:37:27 PM CDT
    
    ** System properties:
    OS=MacOSX
    OS version=10.5.7
    Java version=1.5.0_16
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 7.1.1
    Build id: 7.1.1-20090310
    
    
    *** Eclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 7.1.1
    Build id: 7.1.1-20090310
    
    
    
    
    Eclipse Platform
    
    Version: 3.4.1.r341_v20080731-9I96EiDElYevwz-p1bP5z-NlAaP7vtX6Utotqsu
    Build id: M20080911-1700
    
    
    Eclipse Java Development Tools
    
    Version: 3.4.1.r341_v20080709-0800-7o7tEAfEF_U5qyUgrb2HAp539P97
    Build id: M20080709-0800
    
    
    Eclipse Graphical Editing Framework GEF
    
    Version: 3.4.1.v20080806-67718083A56B4H2A3213573
    Build id: 200809101400
    
    
    Eclipse RCP
    
    Version: 3.4.100.r341_v20080814-989JESIEdAciFYfkZZsBfSwQ2341
    Build id: M20080703-0800
    
    
    Eclipse Plug-in Development Environment
    
    Version: 3.4.1.r341_v20080731-7T7U0E9mlRIuGUYviF_VP
    Build id: M20080703-0800
    
    
    
    
    Eclipse startup command=-os
    macosx
    -ws
    carbon
    -arch
    x86
    -showsplash
    -launcher
    /Library/Genuitec/MyEclipse 7.1 1/myeclipse.app/Contents/MacOS/myeclipse
    -name
    Myeclipse
    --launcher.library
    /Library/Genuitec/MyEclipse 7.1 1/myeclipse.app/Contents/MacOS//../../../../Common/plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731/eclipse_1115.so
    -startup
    /Library/Genuitec/MyEclipse 7.1 1/myeclipse.app/Contents/MacOS/../../../../Common/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
    -clean
    -configuration
    ../../../configuration
    -keyring
    /Users/lamnguyen/.eclipse_keyring
    -consoleLog
    -showlocation
    -vm
    /System/Library/Frameworks/JavaVM.framework
    
    

    Please help me to resolve this problem. I tried so many ways such as: change others mysql connector driver version, refresh, re-install myeclipse… Someone who have any solutions please help me.
    Thank you!

    #298899 Reply
    #298922 Reply

    duylamng
    Member

    Hello Shalini,
    I checked it before i posted this topic here. Thank for your reply but i dont still get it. What that mean about DB permission? I connect DB with root account. When this error occurs, i thought it caused by DB connector Drivers. But, i tried with others version of drivers but it did not work in my case. I used to work with myeclipse 5.x, and it had no error with hibernate reverse engineering. But when i work on Mac with myeclipse 7.x, i can not do that anymore.
    Can you just tell me more about this error, and how to fix it?

    #298932 Reply

    support-joy
    Member

    Hello duylamng,

    Your error log and installation summary shows that you are using JDK1.5. Investigation over the net shows that there is an existing issue with JDK1.5 version(http://bugs.sun.com/view_bug.do?bug_id=6377302) which was fixed in JDK1.6.
    I would recommend you to upgrade your JDK version from 1.5 to 1.6. In case you don’t have JDK1.6, I would recommend you to download complete JDK1.6. I am guessing your MyEclipse installation dir to be /Library/Genuitec/MyEclipse 7.1 1/myeclipse.app/…….Look for MyEclipse.ini config file. If you open the config file, look for the -vm argument or the JDK setup in the .ini file. Update this to point to the complete JDK1.6. Since this is an extra sensitive file, please ensure that you have not added any extra spaces/special characters.
    Let me know if this works for you.

    #299072 Reply

    duylamng
    Member

    Hello hoy,

    Thanks for reply, i will try to upgrade it and tell you if it works.

    #299076 Reply

    duylamng
    Member

    Hello Joy,

    This is complete content of file myeclipse.ini. I dont know how to change this one.

    
    -startup
    ../../../../Common/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
    --launcher.library
    ../../../../Common/plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731
    -clean
    -configuration
    ../../../configuration
    -vmargs
    -Xmx512M
    -XX:MaxPermSize=192M
    -Dorg.eclipse.swt.internal.carbon.smallFonts
    -XstartOnFirstThread
    

    I really need help to config it.

    #299082 Reply

    Unfortunately you can’t use JDK 1.6 on Mac with any Eclipse-based product (including MyEclipse) as Carbon is not available for 64-bit applications and Java6 is 64bit-only on Mac.

    So we don’t have a fix for this problem on Mac. We are monitoring state of the SWT-Cocoa and hoping that it will be possible to use Java6 with MyEclipse8 when it comes out.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Can not do JPA/Hibernate … Reverse Engineering with MySQL

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