facebook

Generate Entities and DAOs from DB2 Database Failing

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #336516 Reply

    mangelo123
    Participant

    I am trying to create JPA entities and DAOs from a DB2 database. No classes are generated. Here are the errors reported:

    2013-03-11 13:35:49,057 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in approver. Asking rev.eng. strategy
    2013-03-11 13:35:49,057 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for approver
    2013-03-11 13:35:49,317 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in brief. Asking rev.eng. strategy
    2013-03-11 13:35:49,317 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for brief
    2013-03-11 13:35:49,567 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in brief_approval. Asking rev.eng. strategy
    2013-03-11 13:35:49,567 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for brief_approval
    2013-03-11 13:35:49,813 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in brief_contact. Asking rev.eng. strategy
    2013-03-11 13:35:49,813 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for brief_contact
    2013-03-11 13:35:50,077 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in business_unit. Asking rev.eng. strategy
    2013-03-11 13:35:50,077 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for business_unit
    2013-03-11 13:35:50,323 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in contact. Asking rev.eng. strategy
    2013-03-11 13:35:50,323 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for contact
    2013-03-11 13:35:50,566 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in email_template. Asking rev.eng. strategy
    2013-03-11 13:35:50,566 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for email_template
    2013-03-11 13:35:50,811 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in email_template_category. Asking rev.eng. strategy
    2013-03-11 13:35:50,811 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for email_template_category
    2013-03-11 13:35:51,061 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in financial_expense. Asking rev.eng. strategy
    2013-03-11 13:35:51,061 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for financial_expense
    2013-03-11 13:35:51,311 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in keyword. Asking rev.eng. strategy
    2013-03-11 13:35:51,311 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for keyword
    2013-03-11 13:35:51,571 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in location. Asking rev.eng. strategy
    2013-03-11 13:35:51,571 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for location
    2013-03-11 13:35:51,822 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in market. Asking rev.eng. strategy
    2013-03-11 13:35:51,822 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for market
    2013-03-11 13:35:52,070 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in merge_field. Asking rev.eng. strategy
    2013-03-11 13:35:52,070 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for merge_field
    2013-03-11 13:35:52,326 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in metrics_actual. Asking rev.eng. strategy
    2013-03-11 13:35:52,326 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for metrics_actual
    2013-03-11 13:35:54,875 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in metrics_planned. Asking rev.eng. strategy
    2013-03-11 13:35:54,875 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for metrics_planned
    2013-03-11 13:35:55,119 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in user_profile. Asking rev.eng. strategy
    2013-03-11 13:35:55,120 WARN Worker-64 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for user_profile
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.approver) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.brief) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.brief_approval) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.brief_contact) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.business_unit) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.contact) as no columns were found.
    2013-03-11 13:35:56,562 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.email_template) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.email_template_category) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.financial_expense) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.keyword) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.location) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.market) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.merge_field) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.metrics_actual) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.metrics_planned) as no columns were found.
    2013-03-11 13:35:56,565 WARN Worker-64 org.hibernate.cfg.JDBCBinder - Cannot create persistent class for org.hibernate.mapping.Table(BASE.user_profile) as no columns were found.

    MyEclipse Bling Installation Summary:

    *** Date: 
    Monday, March 11, 2013 1:39:21 PM EDT
    
    *** System properties:
    OS=WindowsVista
    OS version=6.1.0
    OS arch=x86
    Profile arch=x86
    Window system=win32
    Java version=1.6.0_13
    Workspace=file:/C:/Users/Michael/Workspaces/MyEclipse Bling Edition 10/
    VM Args=-Xmx1024m
    -Xms512m
    -XX:MaxPermSize=256m
    -XX:ReservedCodeCacheSize=64m
    -Dosgi.nls.warnings=ignore
    -Djava.class.path=C:\java\MYECLI~1\MYECLI~1\../Common/plugins/ORB7B5~1.JAR
    
    
    
    *** Subscription information
    Your 30-day trial period expires on  Mar 16, 2013
    
    *** Eclipse details:
    MyEclipse Blue Edition
    
    Version: 10.7.1 Blue
    Build id: 10.7.1-Blue-20130201
    
    
    Blueprint: MyEclipse Bling Edition 10
    
    com.genuitec.myeclipse.blue.feature - 10.7.0.me201302031636
    com.genuitec.myeclipse.database - 10.7.0.me201302031636
    com.genuitec.myeclipse.db2 - 10.7.0.me201302031636
    com.genuitec.myeclipse.desktop - 10.7.0.me201302031636
    com.genuitec.myeclipse.editor - 10.7.0.me201302031636
    com.genuitec.myeclipse.geronimo - 10.7.0.me201302031636
    com.genuitec.myeclipse.glassfish - 10.7.0.me201302031636
    com.genuitec.myeclipse.icefaces.feature - 10.7.0.me201302031636
    com.genuitec.myeclipse.iedebugger - 10.7.0.me201302031636
    com.genuitec.myeclipse.imageeditor - 10.7.0.me201302031636
    com.genuitec.myeclipse.jboss - 10.7.0.me201302031636
    com.genuitec.myeclipse.jetty - 10.7.0.me201302031636
    com.genuitec.myeclipse.jonas - 10.7.0.me201302031636
    com.genuitec.myeclipse.jrun - 10.7.0.me201302031636
    com.genuitec.myeclipse.jsf - 10.7.0.me201302031636
    com.genuitec.myeclipse.matisse - 10.7.0.me201302031636
    com.genuitec.myeclipse.maven - 10.7.0.me201302031636
    com.genuitec.myeclipse.oracle - 10.7.0.me201302031636
    com.genuitec.myeclipse.orion - 10.7.0.me201302031636
    com.genuitec.myeclipse.persistence - 10.7.0.me201302031636
    com.genuitec.myeclipse.pulse - 10.7.0.me201302031636
    com.genuitec.myeclipse.reports - 10.7.0.me201302031636
    com.genuitec.myeclipse.resin - 10.7.0.me201302031636
    com.genuitec.myeclipse.struts - 10.7.0.me201302031636
    com.genuitec.myeclipse.sun - 10.7.0.me201302031636
    com.genuitec.myeclipse.tomcat - 10.7.0.me201302031636
    com.genuitec.myeclipse.uml2 - 10.7.0.me201302031636
    com.genuitec.myeclipse.visualvm - 10.7.0.me201302031636
    com.genuitec.myeclipse.visualvm.server - 10.7.0.me201302031636
    com.genuitec.myeclipse.weblogic - 10.7.0.me201302031636
    com.genuitec.myeclipse.ws - 10.7.0.me201302031636
    com.genuitec.myeclipse.ws.blue - 10.7.0.me201302031636
    com.skyway.myeclipseforspring.feature - 10.6.0.201208211643
    org.eclipse.birt - 2.6.1.me201302031636
    org.eclipse.datatools.connectivity.feature - 1.9.0.me201302031636
    org.eclipse.datatools.enablement.feature - 1.9.0.me201302031636
    org.eclipse.datatools.modelbase.feature - 1.9.0.v201106031100-77078CcNBHCBYKYEbNV
    org.eclipse.datatools.sqldevtools.feature - 1.9.0.me201302031636
    org.eclipse.emf - 2.7.0.v20110606-0949
    org.eclipse.gef - 3.7.0.v20110425-2050-777D-81B2Bz0685C3A6E34272
    org.eclipse.graphiti.feature - 0.8.0.v20110607-1252
    org.eclipse.jpt.jpa.feature - 3.0.0.me201302031636
    org.eclipse.jpt.jpadiagrameditor.feature - 1.0.0.me201302031636
    org.eclipse.jst.common.fproj.enablement.jdt - 3.3.0.me201302031636
    org.eclipse.jst.enterprise_ui.feature - 3.3.0.me201302031636
    org.eclipse.jst.server_adapters.ext.feature - 3.3.0.me201302031636
    org.eclipse.jst.server_adapters.feature - 3.2.100.me201302031636
    org.eclipse.jst.server_ui.feature - 3.3.0.me201302031636
    org.eclipse.jst.ws.axis2tools.feature - 1.1.200.me201302031636
    org.eclipse.m2e.feature - 1.0.0.me201302031636
    org.eclipse.sapphire.platform - 0.3.0.201106221325
    org.eclipse.wst.common.fproj - 3.3.0.me201302031636
    org.eclipse.wst.server_adapters.feature - 3.2.100.me201302031636
    org.eclipse.xsd - 2.7.0.v20110606-0949
    org.springframework.ide.eclipse.feature - 2.9.1.me201302031636
    
    
    fr.obeo.acceleo.bridge.feature - 2.6.0.200906261742
    org.eclipse.cvs - 1.3.100.v20110520-0800-7B78FHl9VF7BD7KBM4GP9C
    org.eclipse.draw2d - 3.7.0.v20110425-2050-46-7w3122153603161
    org.eclipse.equinox.p2.core.feature - 1.0.1.v20110906-1605-8290FZ9FVKHVRKtmx3fpNuo02129
    org.eclipse.equinox.p2.extras.feature - 1.0.1.v20110906-1605-7A4FD4DiVOMap8cHSc6vPuny4gqO
    org.eclipse.equinox.p2.rcp.feature - 1.0.1.v20110906-1605-782EqBqNKGVkiV-PUsgz-uny4gqO
    org.eclipse.equinox.p2.user.ui - 2.1.2.R37x_v20110815-1155-6-Bk8pYWZz0qUTX5I15GZWwbXkrl
    org.eclipse.help - 1.3.0.v20110530-0844-7i7uFFmFFl8nvqbDpEqTvx
    org.eclipse.jdt - 3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1
    org.eclipse.jsf.feature - 3.3.0.me201302031636
    org.eclipse.ocl - 3.1.0.v20110606-1427
    org.eclipse.pde - 3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0
    org.eclipse.platform - 3.7.2.v20120207-1839-9gF7UHPDFxGjd-PqDr2jX_4yKaumkoHTz04_q-q
    org.eclipse.rcp - 3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272
    
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Java\MyEclipse Bling Edition\MyEclipse Bling Edition 10\myeclipse-blue.exe
    -name
    Myeclipse-blue
    --launcher.library
    C:\java\MyEclipse Bling Edition\MyEclipse Bling Edition 10\../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_4.2.0.v201201111650\eclipse_4201.dll
    -startup
    C:\java\MyEclipse Bling Edition\MyEclipse Bling Edition 10\../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    -install
    C:\java\MyEclipse Bling Edition\MyEclipse Bling Edition 10
    -configuration
    C:\java\MyEclipse Bling Edition\MyEclipse Bling Edition 10\configuration
    -showLocation
    -vm
    C:\java\MyEclipse Bling Edition\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll
    
    #336535 Reply

    support-swapna
    Moderator

    mangelo123,

    Please take a look at these links which discuss similar issue and try the suggestions :

    https://forum.hibernate.org/viewtopic.php?p=2445569
    http://zenu.wordpress.com/2009/12/22/fixing-generating-hibernate-mappings-files-and-pojos-from-database/

    I suggest you also cross post to related development forums for better support.

    Hope it helps.

    #336547 Reply

    mangelo123
    Participant

    I had already found both of these posts and still I cannot generate the artifacts due to the primary key and / or no columns found issue.

    #336586 Reply

    support-swapna
    Moderator

    mangelo123,

    This looks like an issue with Legacy databases and Hibernate/JPA. It seems that the DB2/400 will not report (primary) keys when tables are created using native AS/400 methods such as DDS. However creating tables and keys using SQL DDL will work just fine.

    The problem is detailed in Hibernate JIRA :
    https://hibernate.onjira.com/browse/HBX-428

    I suggest you cross post to Hibernate/JPA forums for better support on this issue.

    Hope this helps.

    #336610 Reply

    mangelo123
    Participant

    I have resolved this issue. I was attempting to use lowercase table and column names from my data model. I generated the database using quoted identifiers which maintained the lowercase in the database. This is what seemingly causes the error when generating artifacts with the DB2 JDBC driver.

    I’ve recreated the database not using quoted identifiers, hence everything is now in uppercase. I thought this was going to affect the generated class and property names, but everything worked out fine.

    #336621 Reply

    support-swapna
    Moderator

    mangelo123,

    Glad that you got it working.
    Do let us know if you see any other issues.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Generate Entities and DAOs from DB2 Database Failing

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