Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion MyBatis generator with sqlite gives "did not resolve to any tables"

Received: by 10.43.53.144 with SMTP id vq16mr1108379icb.26.1350670845044;
        Fri, 19 Oct 2012 11:20:45 -0700 (PDT)
X-BeenThere: mybatis-user@googlegroups.com
Received: by 10.50.189.161 with SMTP id gj1ls4289857igc.3.gmail; Fri, 19 Oct
 2012 11:20:42 -0700 (PDT)
Received: by 10.43.88.135 with SMTP id ba7mr1132830icc.19.1350670842790;
        Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
Received: by 10.43.88.135 with SMTP id ba7mr1132828icc.19.1350670842778;
        Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
Return-Path: <jeffgbut...@gmail.com>
Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173])
        by gmr-mx.google.com with ESMTPS id rf8si356263igb.2.2012.10.19.11.20.42
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
Received-SPF: pass (google.com: domain of jeffgbut...@gmail.com designates 209.85.214.173 as permitted sender) client-ip=209.85.214.173;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jeffgbut...@gmail.com designates 209.85.214.173 as permitted sender) smtp.mail=jeffgbut...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-ob0-f173.google.com with SMTP id wc18so957163obb.32
        for <mybatis-user@googlegroups.com>; Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=HxZBDc7sVvFtymIlRGqRk7ZDGFq4r2MMvMJyCTB4apw=;
        b=YqhkyHWbC821VMv0aS9oW2vQ50rgb2XAMiWTtJuQPCViZYXyPE8tXhVUAXKs82sHDU
         ZXaOwpgkrQ+CA0EWDi+f1280XrEqudblLPewGWz/0B88OXO6DFEek5BdItbYeM5DylIv
         bujaSVQzXcQeYVMlzTrU3HMH6aCTOCU1YF0Yce26ROKx1za2jaNjNweQx55fU+GJzW2R
         bMBvyNIxUyh+n/VXRtjTrshjK7mttGu7QH/K3y7XD4HfgohPBKl/xumuP40h8iPx0LeH
         I/i5SmJtBpz2cZF/9wh9n5hOIplpYvJqLoBb5z+z3/yARshJ/QQFvQnLCpuhOwhE80qg
         VfmQ==
MIME-Version: 1.0
Received: by 10.182.184.102 with SMTP id et6mr1131294obc.102.1350670842549;
 Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
Received: by 10.76.83.98 with HTTP; Fri, 19 Oct 2012 11:20:42 -0700 (PDT)
In-Reply-To: <9e508b39-9111-491e-acbc-e26b1bde8ad4@googlegroups.com>
References: <0afa865a-4d6e-45e0-9c9b-426b18b2bc97@googlegroups.com>
	<CAKpaNj5twucpyFV=EnAhgajcxAO2DyiAo-o28k6VwT9RghS...@mail.gmail.com>
	<9e508b39-9111-491e-acbc-e26b1bde8ad4@googlegroups.com>
Date: Fri, 19 Oct 2012 14:20:42 -0400
Message-ID: <CAKpaNj7PtsyP_Np6R6t+Rq=KsDJFkbuTA7LA564ZJRaxUPy...@mail.gmail.com>
Subject: Re: MyBatis generator with sqlite gives "did not resolve to any tables"
From: Jeff Butler <jeffgbut...@gmail.com>
To: mybatis-user@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1

I'm not an SQLite user, so I don't know for sure.  You might try
setting schema to "testDB.sqlite".  You might also try setting catalog
to "testDB" and schema to "sqlite". It's really dependent on how they
implemented the JDBC driver.

Jeff Butler

On Fri, Oct 19, 2012 at 1:55 PM, cha <chaf...@gmail.com> wrote:
> Thanks for the reply. Originally, I left catalog and schema off and got
>
> "Generation Warnings Occured
>   Table configuration with catalog null, schema null, and table testTable
> did not resolve to any tables"
>
> Which made me think I needed schema/catalog settings. The entire
> generatorConfig.xml is
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis
> Generator Configuration 1.0//EN"
> "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
> <generatorConfiguration >
>   <context id="context">
>     <jdbcConnection driverClass="org.sqlite.JDBC"
> connectionURL="jdbc:sqlite:testDB.sqlite" userId="" password=""
>></jdbcConnection>
>     <javaModelGenerator targetPackage="model" targetProject="test/src"
>></javaModelGenerator>
>     <sqlMapGenerator targetPackage="model" targetProject="test/src"
>></sqlMapGenerator>
>     <javaClientGenerator targetPackage="model" targetProject="test"
> type="XMLMAPPER" ></javaClientGenerator>
>     <table tableName="afloatplantest" >
>
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>   </context>
>
>
> On Friday, October 19, 2012 10:05:37 AM UTC-7, Jeff Butler wrote:
>>
>> sqlite does not have catalogs - leave that off.
>>
>> Only use the schema if you create tables like schema.table_name.  Else
>> leave that off too.
>>
>> You probably only need to specify the tableName.
>>
>> Jeff Butler
>>
>>
>> On Fri, Oct 19, 2012 at 12:10 PM, cha <cha...@gmail.com> wrote:
>> > Hello, I am having a problem with MyBatis generator on sqlite.
>> > When I try to generate, I get
>> >
>> > "Generation Warnings Occured
>> >   Table configuration with catalog main, schema sqlite_master, and table
>> > testTable did not resolve to any tables"
>> >
>> > The table config that I am using is
>> >
>> > <table catalog="main" schema="sqlite_master" tableName="testTable" >
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> > I have also tried variations like
>> >
>> > <table catalog="main" schema="sqlite" tableName="testTable" >
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> > <table schema="sqlite" tableName="testTable" >
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> > Has anyone used succesfully used MyBatis generator with sqlite and know
>> > the
>> > schema settings?