Quantcast

How to use mybatis eclipse plugin

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to use mybatis eclipse plugin

Richard-2
Hi,

I'm very new to mybatis and I've just installed the mybatis generator
eclipse plugin. I've searched the web but can't find out how to use
it. Could someone point me to a link that will give me simple
instruction on how to use it, please?

Thank you in advance,

Richard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Jeff Butler
Open the eclipse help, there should be a "MyBatis Generator User's
Guide" in the help.  There is a quick start guide page that should get
you started.

Jeff Butler


On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]> wrote:

> Hi,
>
> I'm very new to mybatis and I've just installed the mybatis generator
> eclipse plugin. I've searched the web but can't find out how to use
> it. Could someone point me to a link that will give me simple
> instruction on how to use it, please?
>
> Thank you in advance,
>
> Richard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Richard-2
Thanks Jeff. That's helped. It's got me to a point were I can start
the generator.

I get the following error, when I run the generator:
Exception getting JDBC Driver

I am trying to connect to a mssql server. In the configuration file, I
am unsure of the value I need to set for sqlStatement in the
<generatedKey />

Also, can the generator be used to pick up stored procedures in a
database? That's going to be my preferred method of connecting to a
db.

Thanks again,

Richard



On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:

> Open the eclipse help, there should be a "MyBatis Generator User's
> Guide" in the help.  There is a quick start guide page that should get
> you started.
>
> Jeff Butler
>
>
> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]> wrote:
>> Hi,
>>
>> I'm very new to mybatis and I've just installed the mybatis generator
>> eclipse plugin. I've searched the web but can't find out how to use
>> it. Could someone point me to a link that will give me simple
>> instruction on how to use it, please?
>>
>> Thank you in advance,
>>
>> Richard
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Jeff Butler
You need to add a <classPathEntry> item to your generator config to
specify the location of the JDBC driver JAR file.

<generatedKey> is used to retrieve the value of identity columns.
With SqlServer, use the predefined string "SqlServer" as the sql
statement. The help has pages for each configuration element and you
can see all the options there.

The generator does not pickup stored procedures - you need to
configure those manually.  But it's not too hard, there are good
examples here:

http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/

Jeff Butler


On Fri, Jan 14, 2011 at 4:58 PM, Richard East <[hidden email]> wrote:

> Thanks Jeff. That's helped. It's got me to a point were I can start
> the generator.
>
> I get the following error, when I run the generator:
> Exception getting JDBC Driver
>
> I am trying to connect to a mssql server. In the configuration file, I
> am unsure of the value I need to set for sqlStatement in the
> <generatedKey />
>
> Also, can the generator be used to pick up stored procedures in a
> database? That's going to be my preferred method of connecting to a
> db.
>
> Thanks again,
>
> Richard
>
>
>
> On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:
>> Open the eclipse help, there should be a "MyBatis Generator User's
>> Guide" in the help.  There is a quick start guide page that should get
>> you started.
>>
>> Jeff Butler
>>
>>
>> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]> wrote:
>>> Hi,
>>>
>>> I'm very new to mybatis and I've just installed the mybatis generator
>>> eclipse plugin. I've searched the web but can't find out how to use
>>> it. Could someone point me to a link that will give me simple
>>> instruction on how to use it, please?
>>>
>>> Thank you in advance,
>>>
>>> Richard
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Richard-2
Jeff,

Thank you. I hadn't used the classPathEntry. I've added it. I
downloaded the Microsoft SQL Server JDBC Driver 3.0, but I still get a
problem. I think I've got a typo or I've downloaded the wrong driver.
I'll keep at it until I get it right. Thanks for your help and showing
me the right direction.

Regards,

Richard

On 14 January 2011 23:06, Jeff Butler <[hidden email]> wrote:

> You need to add a <classPathEntry> item to your generator config to
> specify the location of the JDBC driver JAR file.
>
> <generatedKey> is used to retrieve the value of identity columns.
> With SqlServer, use the predefined string "SqlServer" as the sql
> statement. The help has pages for each configuration element and you
> can see all the options there.
>
> The generator does not pickup stored procedures - you need to
> configure those manually.  But it's not too hard, there are good
> examples here:
>
> http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/
>
> Jeff Butler
>
>
> On Fri, Jan 14, 2011 at 4:58 PM, Richard East <[hidden email]> wrote:
>> Thanks Jeff. That's helped. It's got me to a point were I can start
>> the generator.
>>
>> I get the following error, when I run the generator:
>> Exception getting JDBC Driver
>>
>> I am trying to connect to a mssql server. In the configuration file, I
>> am unsure of the value I need to set for sqlStatement in the
>> <generatedKey />
>>
>> Also, can the generator be used to pick up stored procedures in a
>> database? That's going to be my preferred method of connecting to a
>> db.
>>
>> Thanks again,
>>
>> Richard
>>
>>
>>
>> On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:
>>> Open the eclipse help, there should be a "MyBatis Generator User's
>>> Guide" in the help.  There is a quick start guide page that should get
>>> you started.
>>>
>>> Jeff Butler
>>>
>>>
>>> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]> wrote:
>>>> Hi,
>>>>
>>>> I'm very new to mybatis and I've just installed the mybatis generator
>>>> eclipse plugin. I've searched the web but can't find out how to use
>>>> it. Could someone point me to a link that will give me simple
>>>> instruction on how to use it, please?
>>>>
>>>> Thank you in advance,
>>>>
>>>> Richard
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Richard-2
I found my problem. I didn't prepend jdbc:sqlserver:// to the connectionURL.
I now get a generation warning.

"Table configuration with catalog null, schema x, and table y did not
resolve to any tables"
I'm sure my schema and table are right.
I cannot find in the documentation how to resolve this. What needs
completing for catalog?

Does anyone know how to resolve this, please?

Thank you,

Richard


On 16 January 2011 16:26, Richard East <[hidden email]> wrote:

> Jeff,
>
> Thank you. I hadn't used the classPathEntry. I've added it. I
> downloaded the Microsoft SQL Server JDBC Driver 3.0, but I still get a
> problem. I think I've got a typo or I've downloaded the wrong driver.
> I'll keep at it until I get it right. Thanks for your help and showing
> me the right direction.
>
> Regards,
>
> Richard
>
> On 14 January 2011 23:06, Jeff Butler <[hidden email]> wrote:
>> You need to add a <classPathEntry> item to your generator config to
>> specify the location of the JDBC driver JAR file.
>>
>> <generatedKey> is used to retrieve the value of identity columns.
>> With SqlServer, use the predefined string "SqlServer" as the sql
>> statement. The help has pages for each configuration element and you
>> can see all the options there.
>>
>> The generator does not pickup stored procedures - you need to
>> configure those manually.  But it's not too hard, there are good
>> examples here:
>>
>> http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/
>>
>> Jeff Butler
>>
>>
>> On Fri, Jan 14, 2011 at 4:58 PM, Richard East <[hidden email]> wrote:
>>> Thanks Jeff. That's helped. It's got me to a point were I can start
>>> the generator.
>>>
>>> I get the following error, when I run the generator:
>>> Exception getting JDBC Driver
>>>
>>> I am trying to connect to a mssql server. In the configuration file, I
>>> am unsure of the value I need to set for sqlStatement in the
>>> <generatedKey />
>>>
>>> Also, can the generator be used to pick up stored procedures in a
>>> database? That's going to be my preferred method of connecting to a
>>> db.
>>>
>>> Thanks again,
>>>
>>> Richard
>>>
>>>
>>>
>>> On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:
>>>> Open the eclipse help, there should be a "MyBatis Generator User's
>>>> Guide" in the help.  There is a quick start guide page that should get
>>>> you started.
>>>>
>>>> Jeff Butler
>>>>
>>>>
>>>> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]> wrote:
>>>>> Hi,
>>>>>
>>>>> I'm very new to mybatis and I've just installed the mybatis generator
>>>>> eclipse plugin. I've searched the web but can't find out how to use
>>>>> it. Could someone point me to a link that will give me simple
>>>>> instruction on how to use it, please?
>>>>>
>>>>> Thank you in advance,
>>>>>
>>>>> Richard
>>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Jeff Butler
It is unusual for Sql server to use schema - typically tables are in
catalogs. For example,

dbo..mytable has catalog of dbo and no schema. Perhaps that is the problem?

Jeff Butler


On 1/17/11, Richard East <[hidden email]> wrote:

> I found my problem. I didn't prepend jdbc:sqlserver:// to the connectionURL.
> I now get a generation warning.
>
> "Table configuration with catalog null, schema x, and table y did not
> resolve to any tables"
> I'm sure my schema and table are right.
> I cannot find in the documentation how to resolve this. What needs
> completing for catalog?
>
> Does anyone know how to resolve this, please?
>
> Thank you,
>
> Richard
>
>
> On 16 January 2011 16:26, Richard East <[hidden email]> wrote:
>> Jeff,
>>
>> Thank you. I hadn't used the classPathEntry. I've added it. I
>> downloaded the Microsoft SQL Server JDBC Driver 3.0, but I still get a
>> problem. I think I've got a typo or I've downloaded the wrong driver.
>> I'll keep at it until I get it right. Thanks for your help and showing
>> me the right direction.
>>
>> Regards,
>>
>> Richard
>>
>> On 14 January 2011 23:06, Jeff Butler <[hidden email]> wrote:
>>> You need to add a <classPathEntry> item to your generator config to
>>> specify the location of the JDBC driver JAR file.
>>>
>>> <generatedKey> is used to retrieve the value of identity columns.
>>> With SqlServer, use the predefined string "SqlServer" as the sql
>>> statement. The help has pages for each configuration element and you
>>> can see all the options there.
>>>
>>> The generator does not pickup stored procedures - you need to
>>> configure those manually.  But it's not too hard, there are good
>>> examples here:
>>>
>>> http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/
>>>
>>> Jeff Butler
>>>
>>>
>>> On Fri, Jan 14, 2011 at 4:58 PM, Richard East <[hidden email]>
>>> wrote:
>>>> Thanks Jeff. That's helped. It's got me to a point were I can start
>>>> the generator.
>>>>
>>>> I get the following error, when I run the generator:
>>>> Exception getting JDBC Driver
>>>>
>>>> I am trying to connect to a mssql server. In the configuration file, I
>>>> am unsure of the value I need to set for sqlStatement in the
>>>> <generatedKey />
>>>>
>>>> Also, can the generator be used to pick up stored procedures in a
>>>> database? That's going to be my preferred method of connecting to a
>>>> db.
>>>>
>>>> Thanks again,
>>>>
>>>> Richard
>>>>
>>>>
>>>>
>>>> On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:
>>>>> Open the eclipse help, there should be a "MyBatis Generator User's
>>>>> Guide" in the help.  There is a quick start guide page that should get
>>>>> you started.
>>>>>
>>>>> Jeff Butler
>>>>>
>>>>>
>>>>> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]>
>>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm very new to mybatis and I've just installed the mybatis generator
>>>>>> eclipse plugin. I've searched the web but can't find out how to use
>>>>>> it. Could someone point me to a link that will give me simple
>>>>>> instruction on how to use it, please?
>>>>>>
>>>>>> Thank you in advance,
>>>>>>
>>>>>> Richard
>>>>>
>>>>
>>>
>>
>

--
Sent from my mobile device
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use mybatis eclipse plugin

Richard-2
Thank you Jeff,

That was the problem and I've successfully generated code. I'm very
impressed and am busy looking through it now.

Thank you again.

Regards,

Richard

On 18 January 2011 00:09, Jeff Butler <[hidden email]> wrote:

> It is unusual for Sql server to use schema - typically tables are in
> catalogs. For example,
>
> dbo..mytable has catalog of dbo and no schema. Perhaps that is the problem?
>
> Jeff Butler
>
>
> On 1/17/11, Richard East <[hidden email]> wrote:
>> I found my problem. I didn't prepend jdbc:sqlserver:// to the connectionURL.
>> I now get a generation warning.
>>
>> "Table configuration with catalog null, schema x, and table y did not
>> resolve to any tables"
>> I'm sure my schema and table are right.
>> I cannot find in the documentation how to resolve this. What needs
>> completing for catalog?
>>
>> Does anyone know how to resolve this, please?
>>
>> Thank you,
>>
>> Richard
>>
>>
>> On 16 January 2011 16:26, Richard East <[hidden email]> wrote:
>>> Jeff,
>>>
>>> Thank you. I hadn't used the classPathEntry. I've added it. I
>>> downloaded the Microsoft SQL Server JDBC Driver 3.0, but I still get a
>>> problem. I think I've got a typo or I've downloaded the wrong driver.
>>> I'll keep at it until I get it right. Thanks for your help and showing
>>> me the right direction.
>>>
>>> Regards,
>>>
>>> Richard
>>>
>>> On 14 January 2011 23:06, Jeff Butler <[hidden email]> wrote:
>>>> You need to add a <classPathEntry> item to your generator config to
>>>> specify the location of the JDBC driver JAR file.
>>>>
>>>> <generatedKey> is used to retrieve the value of identity columns.
>>>> With SqlServer, use the predefined string "SqlServer" as the sql
>>>> statement. The help has pages for each configuration element and you
>>>> can see all the options there.
>>>>
>>>> The generator does not pickup stored procedures - you need to
>>>> configure those manually.  But it's not too hard, there are good
>>>> examples here:
>>>>
>>>> http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/
>>>>
>>>> Jeff Butler
>>>>
>>>>
>>>> On Fri, Jan 14, 2011 at 4:58 PM, Richard East <[hidden email]>
>>>> wrote:
>>>>> Thanks Jeff. That's helped. It's got me to a point were I can start
>>>>> the generator.
>>>>>
>>>>> I get the following error, when I run the generator:
>>>>> Exception getting JDBC Driver
>>>>>
>>>>> I am trying to connect to a mssql server. In the configuration file, I
>>>>> am unsure of the value I need to set for sqlStatement in the
>>>>> <generatedKey />
>>>>>
>>>>> Also, can the generator be used to pick up stored procedures in a
>>>>> database? That's going to be my preferred method of connecting to a
>>>>> db.
>>>>>
>>>>> Thanks again,
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>>
>>>>> On 14 January 2011 22:09, Jeff Butler <[hidden email]> wrote:
>>>>>> Open the eclipse help, there should be a "MyBatis Generator User's
>>>>>> Guide" in the help.  There is a quick start guide page that should get
>>>>>> you started.
>>>>>>
>>>>>> Jeff Butler
>>>>>>
>>>>>>
>>>>>> On Fri, Jan 14, 2011 at 3:43 PM, Richard <[hidden email]>
>>>>>> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm very new to mybatis and I've just installed the mybatis generator
>>>>>>> eclipse plugin. I've searched the web but can't find out how to use
>>>>>>> it. Could someone point me to a link that will give me simple
>>>>>>> instruction on how to use it, please?
>>>>>>>
>>>>>>> Thank you in advance,
>>>>>>>
>>>>>>> Richard
>>>>>>
>>>>>
>>>>
>>>
>>
>
> --
> Sent from my mobile device
>
Loading...