Woes packaging a GUI program that uses ODBC

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Woes packaging a GUI program that uses ODBC

Postby PhotonDemon » Thu Mar 03, 2011 11:11 am

Hi,

I have a large GUI program that uses ODBC to access an MS/SQL database. When I package it (via the "Make Executable" menu item under VAST V5.5.2, I get a packaged image of about 3.5MBs. Under VA Smalltalk V8.0.3, the packaged image (also via the "Make Executable" menu item) size is about 4.2MBs. I wouldn't care about the increase in size if the image worked.

The V8.0.3 packaged image fails because many ODBC classes are not included in it, that were included in the V5.5.2 packaged image. The V8.0.3 packaged image seems to have 700KBs of stuff that I don't think are needed (that's fine) but is missing I_don't_know_how_much_stuff that is needed (that's bad :( ).

Now I'm trying to package it manually but I'm not having much luck. Is there something I can do to get the missing classes added without doing too much work like listing each and every missing class in packaging instructions?

Thanks for any help in advance.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Woes packaging a GUI program that uses ODBC

Postby PhotonDemon » Fri Mar 04, 2011 6:39 am

Well, I've gotten the V8.0.3 packaged image working by adding lots of class names the the include rules. The packaged image size is still 4.2MBs, which is fine. My worry about this solution is that there may be some classes that I missed.

Many of the classes that were missing are classes that are used by the ODBC and database classes that I use. So, I can't just include the classes that I use, I basically have to root through classes.es and look for ODBC and database classes that were "excluded [by reduction]" and include them.

Is there a simpler and safer way to do this, maybe with some other packager rules?

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Woes packaging a GUI program that uses ODBC

Postby wembley » Wed Mar 09, 2011 7:07 am

Lou -

If you are missing "I_don't_know_how_much_stuff that is needed", that generally means that your application prerequisites are not correct. Other than your top-level application, the only way the packager can know what to include is through the application prerequisites.

The place to start is the Application Manager. Select each of your applications and then right-click in the Prerequisites pane. Select Explain Mismatched Prerequisites and look at the output on the Transcript. Extra prerequisites may explain the growth in your packaged runtime; missing prerequisites may explain the missing classes. The algorithm used by Explain Mismatched Prerequisites is much better at identifying missing prerequisites than it is at identifying extra prerequisites. It cannot be 100% accurate since things like using #perform: will defeat it.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: Woes packaging a GUI program that uses ODBC

Postby PhotonDemon » Wed Mar 09, 2011 11:56 am

Hi John,

Thanks for the help. I solved the problem by adding a bunch of class names to the application method #packagerIncludeClassNames.

First let me state the problem a little more clearly. My packaged program would start and I could access the database (MS/SQL through ODBC) by making a connection to it and creating and then running a custom stored procedure that counts some rows. When clicking on a button in my program that would read some of those rows, I would get an undefined object DNU. I forget the message but it doesn't matter, it was a missing class that was being sent the message.

The missing class was not one of my classes nor was it any database/odbc class that I was sending a message to like ABtRow. It was a class that was used by the database classes. I went through the classes.es file and found ODBC and database classes that were "excluded [by reduction]". They were classes like #AbtOdbcIntegerField, #AbtQuerySpec and others (I can give you the full list if that helps). I'm sorry I don't have a copy of the classes.es file that showed the excluded classes.

This problem showed up when packaging this app after migrating it from V5.5.2 to V8.0.3. I think there is some slightly more aggressive packaging going on. Many of the classes I added in #packagerIncludeClassNames are like #AbtOdbcIntegerField. This kind of class might not be needed until a database row is read and a field value needs to be instantiated to its corresponding class. I'm not sure exactly how this is done but if there is no direct reference, the packager might exclude the class.

At this point the program seems to be working just fine but it is a large program and it is difficult to test it thoroughly. Hopefully, I have included all the necessary classes and use of the program by my customer won't find another one.

Lou

P.S. I checked the prerequisites as you suggested, none were missing. Some had extra immediate prerequisites like AbtDbmBaseApp. I looked at all of these and they are all needed. I doubt the apps are loaded twice. They just didn't need to be listed twice (I think?).
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron