Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8347635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:25:14+00:00 2026-06-09T07:25:14+00:00

I have the dataSource configured as follows: development { dataSource { dbCreate = validate

  • 0

I have the dataSource configured as follows:

development {
    dataSource {
        dbCreate = "validate"
        url = "jdbc:sqlserver://myservername"
    }
}

My SQL Server “myservername” has a database “products” with a table “inventory” owned by “dbo”. Here is my Inventory class mapping:

static mapping = {
    table 'products.dbo.inventory'
    version false
    columns {
        id column: 'itemKey'
        itemId column: 'itemId'
        inactive column: 'inactive'
    }
}

When I try to run the app, I get this error:

nested exception is org.hibernate.HibernateException: Missing table: products.dbo.inventory

Also, when I change dbCreate from “validate” to “update” or any other ones, it works fine.

Any ideas why?

Thanks in advance,
Skudder

Edit to respond to question –

I merged the changes to my object and I still get the error. Here is my object:

class Inventory {

Integer id
String itemId
String description
Boolean inactive

static mapping = {
    table 'products.dbo.inventory'
    version false
    columns {
        id column: 'itemKey'
        itemId column: 'itemId'
        description column: 'description'
        inactive column: 'inactive'
    }
}

static constraints = {
    itemId (maxSize: 30)
    description (maxSize: 100)
}

static hasMany = [productInventoryDefaults: ProductInventoryDefaults, productTreeNodes: ProductTreeNodes]

String toString() {
    return this.itemId
}

}

and table:

CREATE TABLE [dbo].[inventory](
[itemKey] [int] NOT NULL,
[itemId] [varchar](30) NOT NULL,
[description] [varchar](100) NOT NULL,
[inactive] [bit] NOT NULL,
 CONSTRAINT [PK_Inventory] PRIMARY KEY CLUSTERED 
(
[itemKey] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:25:16+00:00Added an answer on June 9, 2026 at 7:25 am

    I believe here Hibernate has no means to see how to generate primary keys.

    I’d try to either:

    • alter id field to IDENTITY;
    • or/and tweak id field mapping to use Java-side generator;
    • or, even simpler, try connecting to a test database with dbCreate = "create" and proper permissions, see what table structure will Hibernate create, and alter your table to that one.

    If you need to retain the table structure intact, then only the second way is the way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For JAAS authentication I have configured a datasource as follows: <?xml version=1.0 encoding=UTF-8?> <datasources>
I have a listview which has its datasource changed after update of a search
On JBoss 5.1.0 I have Datasource (PostgreSQL 8.3.11) configured using *-ds.xml (standard jboss DS).
I am using jsf and spring together in web application. I have configured datasource
i have a gridview which is populating from sql datasource defined at designed, i
I have an tomcat 6 with an configured JNDI Tomcat JDBC Data Sources Resource
I have configured for the MySql database in grails by installing MySql in my
I have Hibernate Transaction manager configured inside Spring MVC controller. <bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close>
currently we have an application that is configured by using a datasource inside a
The Weblogic servers we are using have been configured to allow JNDI datasource names

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.