[jbosstools-users] Catalog "" cannot be resolved for table ""
Michael Salvatore
jbosstools-users at lists.jboss.org
Wed Oct 15 16:11:21 EDT 2014
Hello,
I've seen a similar problem in forums from a couple years ago but it was never completely answered.
I'm trying to generate Entities from Tables. I've tried both with right-clicking the project and selecting JBoss Tools -> Generate Entities from Tables... as well as by creating a Hibernate Code Generation Configuration. Either way I get an error on line 8 of TestTable.java (below) of: Catalog "testdb" cannot be resolved for table "test_db"
If I'm missing any necessary information I'd be happy to provide it.
IDE: Eclipse Luna
Project Name: testdb
JBoss/Hibernate Tools: v4.3.1
JDK: jdk1.7.0_67
Target Runtime: JBoss 7.1 Runtime
Facets:
Dynamic Web Module -> 3.0
Java -> 1.7
JavaScript -> 1.0
JavaServer Faces -> 2.1
JAX-RS -> 1.1
JPA -> 2.1
Platform: Hibernate (JPA 2.1)
JPA Implementation: Library Provided by Target Runtime
Connection: testuser at testdb
Connection: testuser at testdb
Driver: MySQL JDBC Driver
Database: testdb
URL: jdbc:mysel://localhost:3306/testdb
User: testuser
h6. persistence.xml
h6. <?xml version="1.0" encoding="UTF-8"?>
{code:modifiedtitle=true|jivemacro_uid=_14133955210829564|class=jive_text_macro jive_macro_code _jivemacro_uid_14133955210829564}
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="testdb">
</persistence-unit>
</persistence>
{code}
h6. hibernate.properties
{code:modifiedtitle=true|jivemacro_uid=_14133959402398722|class=jive_text_macro jive_macro_code _jivemacro_uid_14133959402398722}
hibernate.default_schema=testdb
hibernate.default_catalog=testdb
{code}
h6. TestTable.java
{code:modifiedtitle=true|jivemacro_uid=_14133961894508111|class=_jivemacro_uid_14133961894508111 jive_text_macro jive_macro_code}
package com.company.model;
// Generated Oct 15, 2014 1:25:32 PM by Hibernate Tools 4.3.1
import *;
@Entity
@Table(name="test_table")
public class TestDatum implements java.io.Serializable
{
private Integer id
private String code;
private String description;
...
}
{code}
Thanks,
Mike
Posted by forums
Original post: https://developer.jboss.org/message/907162#907162
More information about the jbosstools-users
mailing list