facebook

HIbernate Reverse Eng – Generating Artifacts eror

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #349395 Reply

    raydawg2000
    Participant

    I am doing a very simple test and this is not working for me. I am using spring and hibernate facets, my DB is only a single table but I cannot reverse engineer it. I get the following error in the log

    !ENTRY org.eclipse.core.jobs 4 2 2014-05-16 13:56:21.690
    !MESSAGE An internal error occurred during: "Generating Artifacts".
    !STACK 0
    java.lang.NullPointerException
        at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:40)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:187)
        at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
        at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:72)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$7.execute(GenerateArtifactsJob.java:893)
        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.buildConfiguration(GenerateArtifactsJob.java:874)
        at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:411)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    

    I am using the latest mysql driver – mysql-connector-java-5.1.30-bin
    I am able to connect to the database fine using the DB explorer.

    Below is my simple schema as well as my db conection info that I configure via spring

    CREATE TABLE `system_settings` (
        `id` INTEGER NOT NULL,
        `name` VARCHAR(40) NOT NULL,
        `value` VARCHAR(40) NOT NULL,
        `comments` VARCHAR(40),
        CONSTRAINT `PK_system_settings` PRIMARY KEY (`id`)
    )
    ENGINE=INNODB;
    
    <bean id="mainDataSource" 
            class="org.apache.commons.dbcp.BasicDataSource"
            destroy-method="close">
    
            <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property>
            <property name="url"><value>jdbc:mysql://localhost/apc</value></property>
            <property name="username"><value>apc</value></property>
            <property name="password"><value>apc</value></property>
            <property name="defaultAutoCommit"><value>false</value></property>
    
            <property name="maxActive"><value>50</value></property>
            <property name="maxIdle"><value>10</value></property>
            <property name="minIdle"><value>2</value></property>
            <property name="maxWait"><value>5000</value></property>
            <property name="validationQuery"><value>select 0</value></property>
        </bean>
    
        <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource">
                <ref bean="mainDataSource" />
            </property>
            <property name="hibernateProperties">
                <props>
                    <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
                    <prop key="hibernate.show_sql">false</prop>
                    <prop key="hibernate.jdbc.batch_size">50</prop>
                </props>
            </property>
            <property name="mappingLocations">
                <list>
                    <value>/mappings/*.hbm.xml</value>
                </list>
            </property>
        </bean>
    
    

    Though I have noticed that it doesn’t matter what I put in my spring config, i get the same error. I tried putting bad connection info to see if that changed the error but it didn’t. So it seems to ignore what is in that file. When i reverse engineer I select my spring file for generated DAO files.

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

    raydawg2000
    Participant

    summary details:
    *** Date:
    Friday, May 16, 2014 2:19:22 PM PDT

    *** System properties:
    OS=Windows7
    OS version=6.1.0
    OS arch=x86
    Profile arch=x86
    Window system=win32
    Java version=1.7.0_45
    Workspace=file:/C:/Users/rholguin/Workspace/
    VM Args=-Xmx768m
    -XX:MaxPermSize=320m
    -XX:ReservedCodeCacheSize=64m
    -Dosgi.nls.warnings=ignore
    -Djava.class.path=C:\Users\rholguin\AppData\Local\MYECLI~2\plugins/OR8508~1.JAR

    *** Subscription information
    Product Id: E3MP (MyEclipse Professional Subscription)
    License version: 3.0
    Full Maintenance Included
    Subscription expiration date (YYYYMMDD): 20150213
    Number of users: 6

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 2014
    Build id: 12.0.0-20131202

    Blueprint: N/A

    com.genuitec.myeclipse.database – 12.0.0.me201311281640
    com.genuitec.myeclipse.enterprise.workbench – 12.0.0.me201311281640
    com.genuitec.myeclipse.jsf – 12.0.0.me201311281640
    com.genuitec.myeclipse.persistence – 12.0.0.me201311281640
    com.genuitec.myeclipse.tomcat – 12.0.0.me201311281640
    org.eclipse.datatools.connectivity.feature – 1.11.1.me201311281640
    org.eclipse.datatools.enablement.feature – 1.11.1.me201311281640
    org.eclipse.datatools.modelbase.feature – 1.11.1.v201306041610-7707GCcNBHLDaKTEcRi
    org.eclipse.datatools.sqldevtools.feature – 1.11.1.me201311281640
    org.eclipse.emf – 2.9.1.v20130902-0605
    org.eclipse.gef – 3.9.1.201308190730
    org.eclipse.graphiti.feature – 0.10.1.v20130918-0838
    org.eclipse.jpt.jpa.feature – 3.3.1.me201311281640
    org.eclipse.jpt.jpadiagrameditor.feature – 1.2.0.me201311281640
    org.eclipse.jst.common.fproj.enablement.jdt – 3.4.0.me201311281640
    org.eclipse.jst.enterprise_ui.feature – 3.5.0.me201311281640
    org.eclipse.jst.server_adapters.ext.feature – 3.3.103.me201311281640
    org.eclipse.jst.server_adapters.feature – 3.2.201.me201311281640
    org.eclipse.jst.server_ui.feature – 3.4.1.me201311281640
    org.eclipse.sapphire.platform – 0.6.6.201310081535
    org.eclipse.wst.common.fproj – 3.4.0.me201311281640
    org.eclipse.wst.server_adapters.feature – 3.2.300.me201311281640
    org.eclipse.xsd – 2.9.1.v20130902-0605
    org.springframework.ide.eclipse.feature – 3.3.0.me201311281640

    org.eclipse.cvs – 1.4.0.v20130911-1000
    org.eclipse.draw2d – 3.9.1.201308190730
    org.eclipse.e4.rcp – 1.2.1.v20130910-2014
    org.eclipse.egit – 3.1.0.201310021548-r
    org.eclipse.epp.mpc – 1.2.1.I20130917-2019
    org.eclipse.equinox.p2.core.feature – 1.2.1.v20130827-1605
    org.eclipse.equinox.p2.discovery.feature – 1.0.100.v20130502-0334
    org.eclipse.equinox.p2.extras.feature – 1.2.0.v20130827-1605
    org.eclipse.equinox.p2.rcp.feature – 1.2.0.v20130828-0031
    org.eclipse.equinox.p2.user.ui – 2.2.0.v20130828-0031
    org.eclipse.help – 2.0.1.v20130911-1000
    org.eclipse.jdt – 3.9.1.v20130911-1000
    org.eclipse.jgit – 3.1.0.201310021548-r
    org.eclipse.jsf.feature – 3.7.0.me201311281640
    org.eclipse.mylyn.bugzilla_feature – 3.9.1.v20130917-0100
    org.eclipse.mylyn.commons – 3.9.1.v20130917-0100
    org.eclipse.mylyn.commons.identity – 1.1.1.v20130917-0100
    org.eclipse.mylyn.commons.notifications – 1.1.1.v20130917-0100
    org.eclipse.mylyn.commons.repositories – 1.1.1.v20130917-0100
    org.eclipse.mylyn.context_feature – 3.9.1.v20130917-0100
    org.eclipse.mylyn.cvs – 1.1.1.v20130917-0100
    org.eclipse.mylyn.discovery – 3.9.1.v20130917-0100
    org.eclipse.mylyn.git – 1.1.1.v20130917-0100
    org.eclipse.mylyn.ide_feature – 3.9.1.v20130917-0100
    org.eclipse.mylyn.java_feature – 3.9.1.v20130917-0100
    org.eclipse.mylyn.monitor – 3.9.1.v20130917-0100
    org.eclipse.mylyn.tasks.ide – 3.9.1.v20130917-0100
    org.eclipse.mylyn.team_feature – 3.9.1.v20130917-0100
    org.eclipse.mylyn.versions – 1.1.1.v20130917-0100
    org.eclipse.mylyn_feature – 3.9.1.v20130917-0100
    org.eclipse.pde – 3.9.1.v20130911-1000
    org.eclipse.platform – 4.3.1.v20130911-1000
    org.eclipse.rcp – 4.3.1.v20130911-1000
    org.zeroturnaround.eclipse.feature – 5.5.3.RELEASE-201404211541
    org.zeroturnaround.eclipse.wtp.feature – 5.5.3.RELEASE-201404211541

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Users\rholguin\AppData\Local\MyEclipse Professional 2014\myeclipse.exe
    -name
    Myeclipse
    –launcher.library
    C:\Users\rholguin\AppData\Local\MyEclipse Professional 2014\plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_3.2.0.v201103301700\eclipse_3215.dll
    -startup
    C:\Users\rholguin\AppData\Local\MyEclipse Professional 2014\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
    -install
    C:\Users\rholguin\AppData\Local\MyEclipse Professional 2014
    -vm
    C:\Users\rholguin\AppData\Local\MyEclipse Professional 2014\binary/com.sun.java.jdk7.win32.x86_1.7.0.u45/jre/bin/client/jvm.dll

    #349412 Reply

    raydawg2000,

    Sorry that you are facing this. We couldn’t replicate this at our end after following this tutorial. Can you please follow the tutorial and let us know if you can replicate the issue ?

    If you are still seeing issues after following the tutorial, can you please share your project, which will help us reproduce the issue internally ? You can send a mail to support@genuitec.com. Please add ATTN: Pradeep in the subject and refer to this thread.

    #349417 Reply

    raydawg2000
    Participant

    Hi, I ended up deleting the project and starting over and that fixed it somehow.

    #349428 Reply

    raydawg2000,

    There could be some configuration issue in the earlier project. Anyways glad that you got it working.
    Let us know if you see any issues or have any questions.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: HIbernate Reverse Eng – Generating Artifacts eror

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