Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Generate Entities from Tables not working
Re: Generate Entities from Tables not working [message #615769 is a reply to message #435503] Thu, 02 April 2009 23:32 Go to previous messageGo to next message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Neil & Brian:

See previous message on 3/23...

I have build a M6 installation of Eclipse and added the Dali source from
dali-sdk-buildrepo-S-3.1M6-20090318020101.zip
(the repository in a zip is really cool -- thanks!)

I've tried to debug the problem by launching the Eclipse workbench as an
Eclipse application in debug mode. My thought was to duplicate the error
in the Eclipse workbench running under debug. The launching Eclipse is in
debug perspective, set to break on uncaught NullPointer exceptions.

No joy. I can't do this because the launched Eclipse workbench craps out
with a
"Java indexing" java.lang.OutOfMemoryError: Java heap space
error.

I googled a lot and and learned how to maximize the memory in eclipse.ini.
To conserve memory I closed down all the views that weren't needed to do
this. Still no joy.

Do you have any suggestions as to how I can duplicate this problem while
running in debug so I can provide more detail about it?

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #615771 is a reply to message #435509] Fri, 03 April 2009 14:34 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Bill,

I run/debug with the following setting in my Run Config:

Main tab -> Program to Run: |X| Run a product: org.eclipse.platform.ide

Arguments tab -> VM Arguments: -Xmx1024M -XX:MaxPermSize=128m

Give that a try and see if you have better luck, and thanks for looking
into this.

Neil


Bill Blalock wrote:

> Neil & Brian:

> See previous message on 3/23...

> I have build a M6 installation of Eclipse and added the Dali source from
> dali-sdk-buildrepo-S-3.1M6-20090318020101.zip
> (the repository in a zip is really cool -- thanks!)

> I've tried to debug the problem by launching the Eclipse workbench as an
> Eclipse application in debug mode. My thought was to duplicate the error
> in the Eclipse workbench running under debug. The launching Eclipse is in
> debug perspective, set to break on uncaught NullPointer exceptions.

> No joy. I can't do this because the launched Eclipse workbench craps out
> with a
> "Java indexing" java.lang.OutOfMemoryError: Java heap space
> error.

> I googled a lot and and learned how to maximize the memory in eclipse.ini.
> To conserve memory I closed down all the views that weren't needed to do
> this. Still no joy.

> Do you have any suggestions as to how I can duplicate this problem while
> running in debug so I can provide more detail about it?

> Thanks
> Bill Blalock
Re: Generate Entities from Tables not working [message #615772 is a reply to message #435503] Mon, 06 April 2009 20:04 Go to previous messageGo to next message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Neil:

> Main tab -> Program to Run: |X| Run a product: org.eclipse.platform.ide

> Arguments tab -> VM Arguments: -Xmx1024M -XX:MaxPermSize=128m

That worked! I had
org.eclipse.sdk.ide
as the product to run. Thanks!

I have it all loaded up and am able to run it in debug.

Now I need sugestions as to which plug-ins projects I should import as
binary projects and classes I should watch in the debug view. I'd
appreciate any other advice or suggestions.

So far this is what I have learned:

For DB2 i5/OS the catalog must be specified in Preferences > Java
Persistence. The default catalog for the JTOpen driver is *SYSBASE. The
correct catalog is in the drop down box but it has to be selected.

If the catalog is specified in Preferences > Java Persistence
- JPA Tools > Generate Entities from Tables
- will default to the default schema and list the tables
- will list all the schemas (in the Schema drop down) but none will show
tables (except default)

The default schema can't be overriden in Preferences > Java Persistence.
If you try to do so only the default schema is listed in the schema drop
down, none of the other schemas are listed.

The default schema is the schema which corresponds to the user who makes
the connection.

For example if I signon as BLALOCK and the BLALOCK library (think schema)
is the default schema and the Build Entities will shows the tables in
BLALOCK. The other schemas come up in the drop down but none of them list
tables. The default schema can't be changed from BLALOCK.

If I connect as "e012676" there will be no default schema because there is
no library names E012676.

The default schema is controlled by using the "libraries" property of the
IBM JTOpen driver.

Specifying the "libraries" property in either the URL or the additional
properties (by choosing an "other driver" in the driver selection of DB2
for i5/OS) has no effect. I am very familiar with the use of this
property from other projects.

If no libraries property is specified the user becomes the default schema.
This behavior is documented at:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/ rzahh/jdbcproperties.htm

That being said JPA Tools > Generate Entities will generate entities for
tables in BLALOCK when the connection uses BLALOCK as the user. That is
progress.

What classes should I watch in the debugger to find the cause of this
behavior?

Where whould I look to see what meta data is being passed to Dali?

Thanks
Bill Blalock
Re: Generate Entities from Tables not working [message #615779 is a reply to message #435503] Fri, 08 May 2009 22:02 Go to previous messageGo to next message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Neil and all:

This problem for DB2 on i5 (iSeries aka AS400) continues in Galileo M6
(JEE package).

I would like to assist in correcting the problem but I need help in
determining where I should look, what to debug.

My prior post describes the problem Dali has finding schemas and tables
within schemas for the i5/JTOpen drivers.

This is very frustrating because Dali validation and generating entities
from tables works so well ... if I happen to be working with one schema
that happens to have the same name as the user profile that the connection
uses.

Thanks for all your hard work!

Bill Blalock
Re: Generate Entities from Tables not working [message #616646 is a reply to message #435513] Wed, 13 May 2009 16:50 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Bill,

Lets see if we can figure this out. Take a look at the constructor for
org.eclipse.jpt.db.internal.DTPDatabaseWrapper. The last line of the
constructor is an attempt to resolve the vendor that we are working with.
Put a breakpoint in this constructor and let me know what Vendor you are
ending up with.

This first bit of information will let us know if we are starting off in
the right direction. If you are ending up with an UnrecognizedVendor, let
me know what is being returned from "this.getVendorName()".

Neil

Bill Blalock wrote:

> Neil and all:

> This problem for DB2 on i5 (iSeries aka AS400) continues in Galileo M6
> (JEE package).

> I would like to assist in correcting the problem but I need help in
> determining where I should look, what to debug.

> My prior post describes the problem Dali has finding schemas and tables
> within schemas for the i5/JTOpen drivers.

> This is very frustrating because Dali validation and generating entities
> from tables works so well ... if I happen to be working with one schema
> that happens to have the same name as the user profile that the connection
> uses.

> Thanks for all your hard work!

> Bill Blalock
Re: Generate Entities from Tables not working [message #617467 is a reply to message #435461] Tue, 11 August 2009 15:45 Go to previous messageGo to next message
yhovart  is currently offline yhovart Friend
Messages: 6
Registered: August 2009
Junior Member
Hello,

I have the same kind of problem using Eclipse Galileo's integrated Dali plugin and connecting an MSSQL Server 2005 database.

Testing with postgre is allright but when connecting to MSSQL Server (with JTDS or Microsoft drivers) i can choose a catalog in the "generate entites from table" wizard but not the schema (the combo box is empty).

I thought the default schema would be used (dbo) but it is not.
I also tried to create a schema using my user connection name but it doesn't work either.

Any workaround or fix?
I will have to copy my database on postgre each time an evolution occuirs on the model ... this is not every handy. Or i may won't be able to use Dali at all.

Notice : the selection of catalog or schema doesn't work either by deault in JPA details or Java code. But i managed to "fix" it by specifying persistence-unit-defaults (catalog and schema) in orm.xml (which i don't need basically).

Any help will be appreciate,
Thx.
Re: Generate Entities from Tables not worki ng [message #617471 is a reply to message #617467] Tue, 11 August 2009 20:23 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Try setting the schema in the JPA Project Properties and then attempting
the Entity Generation. Also, please see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267343 for more info on this
problem, and details on related issues.

Let me know how it goes.

Neil
Re: Generate Entities from Tables not worki ng [message #617474 is a reply to message #479642] Thu, 13 August 2009 12:19 Go to previous messageGo to next message
yhovart  is currently offline yhovart Friend
Messages: 6
Registered: August 2009
Junior Member
I've already tried: same behavior, i can choose the catalog but the schema list remains empty.

But the bug seems to be fixing this. I'll have to wait for the 2.2 realease of Dali i guess.

Thx.
Re: Generate Entities from Tables not worki ng [message #617477 is a reply to message #617474] Thu, 13 August 2009 13:52 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
What version of Dali are you using? Dali 2.2 was released with Galileo
and WTP 3.1 at the end of June, so the version with this fix is available.

Neil


yhovart wrote:

> I've already tried: same behavior, i can choose the catalog but the schema
list remains empty.

> But the bug seems to be fixing this. I'll have to wait for the 2.2 realease
of Dali i guess.

> Thx.
Re: Generate Entities from Tables not worki ng [message #617481 is a reply to message #480018] Fri, 14 August 2009 08:54 Go to previous messageGo to next message
yhovart  is currently offline yhovart Friend
Messages: 6
Registered: August 2009
Junior Member
Hi,

I am using galileo's default embedded Dali plugin which seems to be ... 2.2, you're right... (thought it was 2.1) ....

So, it should be working ....

I've give it a try again an hour ago with no more success.
Re: Generate Entities from Tables not work i ng [message #617483 is a reply to message #617481] Fri, 14 August 2009 15:45 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
It sounds like we need to re-open bug 276768 -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=276768

Please re-open this bug and enter in all of the details you can regarding
your connection properties and database/catalog/schema structure.

Neil
Re: Generate Entities from Tables not working [message #617487 is a reply to message #617467] Mon, 17 August 2009 17:44 Go to previous messageGo to next message
Heiko Ahlig is currently offline Heiko AhligFriend
Messages: 62
Registered: July 2009
Member
Hi,
I have the same problem with the wizard with database server Sybase 12.x
and 15.x
At the DataSourceExplorer I see all schmeas, tables, etc. but in the
wizard, the schema-combo is empty.

Greetings
Heiko


Am 11.08.2009 17:45, schrieb yhovart:
> Hello,
>
> I have the same kind of problem using Eclipse Galileo's integrated Dali
> plugin and connecting an MSSQL Server 2005 database.
>
> Testing with postgre is allright but when connecting to MSSQL Server
> (with JTDS or Microsoft drivers) i can choose a catalog in the "generate
> entites from table" wizard but not the schema (the combo box is empty).
>
> I thought the default schema would be used (dbo) but it is not.
> I also tried to create a schema using my user connection name but it
> doesn't work either.
>
> Any workaround or fix?
> I will have to copy my database on postgre each time an evolution
> occuirs on the model ... this is not every handy. Or i may won't be able
> to use Dali at all.
>
> Notice : the selection of catalog or schema doesn't work either by
> deault in JPA details or Java code. But i managed to "fix" it by
> specifying persistence-unit-defaults (catalog and schema) in orm.xml
> (which i don't need basically).
>
> Any help will be appreciate,
> Thx.
Re: Generate Entities from Tables not working [message #617489 is a reply to message #480581] Mon, 17 August 2009 20:03 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Thanks for letting us know. We'll look into this as well. If you are
able to provide any debug info that would be helpful, but either way we
will look into it.

Neil
Re: Generate Entities from Tables not working [message #618858 is a reply to message #435461] Tue, 16 February 2010 14:17 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.

Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.

If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.

So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.

Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
Re: Generate Entities from Tables not working [message #618859 is a reply to message #618858] Thu, 25 February 2010 20:13 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Guillermo,

I'm not sure I understand your problem exactly.

When you create your DTP Connection Profile, what Connection Profile Type do you use? SQL Server?

Once you have created your Connection Profile and connected to your database server, do you see your databases and tables in the DTP Data Source Explorer?

Have you changed your project default catalog and schema (via the Project Properties dialog -> Java Persistence)? Are any catalogs or schemata listed in the drop-down lists in the Connection section of the Java Persistence properties page? The list of catalogs on this page should match the databases listed in the Data Source Explorer. (I'm not sure where the schemata can be found via DTP....)

Minus any bugs, Dali is simply displaying the catalogs and schemata provided by DTP. This is problematic because of the variety of DTP driver implementations.

Unfortunately, I don't have a MS SQL Server to test against; but I do have a Sybase Adaptive Server (which is very similar), and I can see the catalogs and schemata fine with that release of Dali.

Also, the reason you are seeing quoted identifiers when using jTDS is probably because Dali does not recognize the name of the vendor returned by DTP in that situation. Which DTP Connection Profile Type do you use? Are you using lowercase letters in your table and column names? By default, if Dali does not recognize the vendor, it will treat names according to the SQL Standard, which expects non-delimited identifiers to be folded to uppercase. As a result, any non-uppercase identifiers must be delimited.

Brian
Re: Generate Entities from Tables not working [message #619278 is a reply to message #618858] Tue, 08 June 2010 20:25 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
> I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.
>
> Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.
>
> If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.
>
> So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.
>
> Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
Re: Generate Entities from Tables not working [message #619281 is a reply to message #618858] Tue, 08 June 2010 20:26 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
> I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.
>
> Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.
>
> If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.
>
> So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.
>
> Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
Re: Generate Entities from Tables not working [message #619284 is a reply to message #618859] Tue, 08 June 2010 20:46 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
Hello Brian, sorry but I didn't get your answer before. All I can say is things haven't improved regarding SQL Server 2000 and DTP.I "upgraded" to Galileo 3.5SR2 and it continues not to work. When you define a connection using MS SQL Server (with the same JDBC drivers and definitions I use with Eclipse 3.4.2, or Ganymede, which works fine), you may not see any tables other than those defined under your user defined under SQL Server.

It's funny, because in the meantime I developed an application using IBM DB2 LUW (that supports schemas and all those gadgets a true relational database should support) and it is working fine. I had no problems whatsoever to recognise and work with all sorts of database objects.

It seems to me that between the 2000 and 2005 versions of MS SQL Server there was a change in the way the schemas were addressed. Whereas in the 2000 version there were no schemas (only users), in 2005 and newer versions the schema facility was implemented (in fact, if you use the JDBC driver for 2005 with 2000 in Ganymede, it will work but it will give you the same problem I'm reporting here, which is equivalent to say that it doesn't work).

If you use the jTDS driver with both Ganymede and Galileo, you get exactly the same behaviour as with MS SQL Server 2000 JDBC driver.

Please reopen this issue and try to solve it for we are still using Ganymede and it lacks many features from Galileo we would like to have available.

Best regards, Guillermo :evil:
Re: Generate Entities from Tables not working [message #619286 is a reply to message #538875] Wed, 09 June 2010 15:41 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Guillermo,

I would like to determine whether your issue is with DTP or Dali. Once you have created your Connection Profile and connected to your database server, do you see your databases and tables in the DTP Data Source Explorer? If you do *not* see them, we have a problem with DTP; if you *do* see them, we have a problem with Dali.

Brian
Re: Generate Entities from Tables not working [message #638122 is a reply to message #619286] Wed, 10 November 2010 01:46 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
Hello, it's me again. This time I have moved to Helios, and things are even worse. I can access SQL Server tables via logging in with my user in the SQL Server manager, and connect to every application using the database. As it was before, if I configure the SQL Server JDBC driver under Ganymede (Eclipse 3.4.2), everything works fine and I can see all users (say schemas) that the database has defined. I even downloaded JDBC driver 3.0 and it works fine under Ganymede, as it does jTDS and also the good old MS SQL Server 2000 driver. Cool

But when trying to do the same thing under Eclipse 3.6 (Helios) JPA, there's no way to make it work. You can see a schema with your user name and nothing else. I would need to see dbo schema, and it doesn't work. No matter you may specify the schema name under the Java Persistence facet; it doesn't work. Mad

I believe this problem has been around for too long, and it impairs the ability to develop applications with Eclipse. Since the same problem happens when trying to configure a database connection via the Database Development perspective, I shall infer that the problem is DTP and not Dali. The question is ¿why it does work well under Ganymede DTP and not under Helios DTP? (by the way, it didn't work either under Galileo DTP...)

Thanks in advance, Guillermo Mad
Re: Generate Entities from Tables not working [message #638123 is a reply to message #619286] Wed, 10 November 2010 01:48 Go to previous messageGo to next message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
I see the database but no tables. But the point is I cannot reach the dbo schema with neither Helios nor Galileo, whereas I can do that with Ganymede. See my previous thread. Regards, Guillermo

[Updated on: Wed, 10 November 2010 01:49]

Report message to a moderator

Re: Generate Entities from Tables not working [message #638855 is a reply to message #638122] Fri, 12 November 2010 19:00 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Guillermo,

Just to confirm, when you connect to the database and look at the Data Source Explorer view, do you see any tables when you expand the tree under the db connection? I want to make sure you are looking in the right area. If the tables do not show up here, then yes, Dali would not be able to retrieve them for our Entity Generation or other services.

It is possible that DTP introduced a bug in Galileo that caused this problem, and the issue still exists in Helios.

Let me know exactly what you are seeing in the Data Source Explorer and we can proceed from there. We should be able to gather enough information to open a bug against DTP or Dali.

Neil
Re: Generate Entities from Tables not working [message #639988 is a reply to message #638855] Thu, 18 November 2010 15:44 Go to previous message
Guillermo Aldunate is currently offline Guillermo AldunateFriend
Messages: 15
Registered: February 2010
Junior Member
Hello Neil. My puzzling only increases at this time. I defined a new connection using the Open Source MS SQL Server driver jTDS under Helios, connected to the DBM using the Data Source Explorer, and everything worked OK. I could see all schemas (say, users, because it's SQL Server 2000), and Dali would let me select both database and schema, what I had done before with no success with the same configuration!!!

However, when trying to use Microsoft JDBC driver (in both the native SQL Server 2000 version or the JDBC 3.0 version), the problem is still the same as described.

Please note that in the attached MS Word file, the images were from Eclipse Helios using jTDS driver. So it didn't work well from the beginning. Confused

The point is, I don't know for how long this will continue to work well. Also, there's no way of making the MS drivers work, since they show the same behaviour than before.

Please contact me should you need any further information or some action to be performed by me. Thank you very much for your reply.
Previous Topic:Generate Entities not adding @Table or @Column annotations
Next Topic:Dali 2.1.1 Released
Goto Forum:
  


Current Time: Fri Apr 26 14:59:47 GMT 2024

Powered by FUDForum. Page generated in 0.06327 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top