…and now for my Glorp on VAST error handling rant.

I’ve written in my previous post about a debugging session that took longer than necessary for two reasons: my stupidity and a combination of several unfriendly factors. So let’s continue our journey up through my walkback of today’s image crash.

Once I figured there was no Seaside problem in the crash, I scrolled further up through the walkback and what I found there really made me upset about the error handling in Glorp (I was also upset about myself and the fact that I had just spent an hour for nothing). Just about 1500 lines towards the top of the walkback was this:

ExceptionalEvent>>#signalWith:
  receiver = Exception: Database error
  arg1 = AbtError:  rc=-1 for '57016' in an AbtIbmCliCSDatabaseConnection at (12.12.2012 11:25:20)  '[SQ
LSTATE=57016 - [IBM][CLI Driver][DB2/LINUXX8664] SQL0668N  Operation not allowed for reason code "7" on 
table "MYTABLE".  SQLSTATE=57016
 [Native Error=-668]]
'
[] in VADatabaseAccessor>>#loginIfError:
  receiver = a VADatabaseAccessor
  blockarg1 = AbtError:  rc=-1 for '57016' in an AbtIbmCliCSDatabaseConnection at (12.12.2012 11:25:20)  '[SQLSTATE=57016 - [IBM][CLI Driver][DB2/LINUXX8664] SQL0668N  Operation not allowed for reason code "7" on table "MYTABLE".  SQLSTATE=57016
 [Native Error=-668]]
'

Holy Moly! So this was the cause of my problem. I had altered MYTABLE in some schema migration routine and the table needed reorg. This is easy to handle once you know it needs to be done: fire up some DB2 client and do a REORG TABLE MYTABLE.

But what is Joachim complaining about? It’s his job to know what he did to the database, not Glorp’s…

I am complainning about the fact that Glorp simply obfuscates a very clear error message. Remember what the walkback started with? If you forgot, here are the first lines of the walkback:

Walkback at 11:25:20 on 12.12.2012
Database error: 
    [] in AbtHeadlessRuntimeStartUp class>>#outputWalkback:process:  
    ...etc...

That’s what I am complaining about. I could have fixed the problem in just three minutes if the walkback told me what’s wrong.
DB2 tries hard to tell the stupid programmer what’s the problem. AbtIbmCliDatabaseConnection>>#fetchNextRowFromCursor:ifError: hands this exception on to its caller, and Glorp (or better, the VAST port of it) simply takes that message and puts it into the dustbin or keeps it as a secret. Eat this, programmer!

This is due to some strange error handling code that comes from the original Glorp implementation. It has to be adopted to VAST, because the adaptation that was done in the original Glorp code is defunct. I tried to fix that on my more than once, but only found another problem in VAST that completely befuddled me so I gave up. Whatever I tried, something didn’t work. That problem can be fixed very easily, and I think it will be integrated into VAST soon, but it isn’t yet.

So this is my rant about the current VA ST Glorp port and its error handling mess. Other than that, I must say Glorp is stable and works very well, even if the VAST version is a few versions behind.

Ah, before I forget it: After a reorg of the table it seems my application runs fine and I am in the middle of testing and fixing.

Seaside 3.0.7 (partially) and jQueryMobile 1.1.1 ported to VA Smalltalk

Marten’s been busy over the last few days and just released a new version of a partial Seaside 3.0.7 port (Instantiations ships VA 8.5.2 with Seaside 3.0.6), which he needed for the latest bels and whistles of Nick Ager’s Seaside integration for jQueryMobile V 1.1.1, which he also ported and released on VASTGoodies.

From the package comments of Marten’s Seaside version:

V 8.5.1 - with FileLibrary Addition from Seaside 3.0.7
  -> Caution: Not an official version. Use on your own risk.
  -> version needed for JQM 1.1.1 development  (Marten Feldtmann)

So it is not actually a full port of Seaside to VA ST 8.5.2, but the File Library additions that are important for jQM (I guess that means virtual file libraries).

Instantiations announces the immediate availability of VA Smalltalk 8.5.1

The STIC 2012 conference started today and I guess we’ll see announcements from all Smalltalk vendors there. Instantiations just announced the availability of Version 8.5.1 of VA Smalltalk. As the version number suggests, it is a maintenance release with a total of ca. 60 bugs fixed and a few new minor feature extensions and enhancements.

Development Tools

  • Code Assist Improvements
  • SUnit Expected Failures

Infrastructure

  • Logging Framework Improvements
  • Preference Settings Framework Improvements

Continue reading

Don’t use GLORP Type Resolvers with CHAR(1) fields in DB2 on VA Smalltalk

[Update, 2012-04-26: Instantiations is currently working on a fix for this problem. I've been mailing back and forth with the responsible developer about this and other problems that I've had with GLORP on VAST, so I hope we'll soon see a newer version of GLORP ported over to VA ST with quite a few bugs fixed. This bug is existent in VA ST 8.5.1 but may be solved in later versions when you read this some tim win the future.]

Todays is my trouble-seeker day. One of the things I am currently trying to do is make a GLORP application transferable between MS Access and DB2. Glorp does a good job in hiding a lot of DB complexity from the developer, but there are edges where it needs help. Or, put differently, you can be very sloppy when working with Access.

Problems I could solve quite easily were:

Continue reading

Things they never told you about log4s [Updated]

I’ve been using log4s, Instantiations’ logging framework for VA Smalltalk, in several situations before and it does a nice job.

I always started it with a piece of code and therefor had no problems with it. But log4s has an option to auto-start and initialize itself from the abt.ini file that accompanies a VA Smalltalk image.

So I wanted to try this for the first time and immediately stumpled upon a few problems.

First, let’s take a look at the ini stanza that I wanted to use:

[log4s]
debugEnabled=true
quietMode=false
globalLevel=All
dailyRollingFileAppender =(MyRollingFileAppender, root, MyLog.log, false, Info, EsPatternLayout, '%date{ISO8601}: [%level] %message', true, topOfDay )

With this I had several problems.

I had to find out the hard way (if you can call breakpoints hard) that the three parameters #(‘debugEnabled’ ‘quietMode’ ‘globalLevel’) always have to be present. The framwork does not assume any defaults for them. Unfortunately, it seems this is not in the documentation. But now you know ;-)

[Update] Actually, it is in the documentation and I somehow managed to ignore it and believe in its non-existence hard enough to believe it. It’s clearly stated in the VA Smalltalk User’s Guide in section “Initializing the log4s Framework”. So I could have saved some time by simply RTFM… Thanks to Don McQueen who pointed me to it . [/Update]

Why did I have to find out the hard way? because the logger logs errors to TranscriptTTY if it cannot log. Now, how can I look at TranscriptTTY on windows? I guess there is a way to do so, but I didn’t find it. So I would hope for a default log file in the image directory and probably also some ini parameter for the location of the EsLogLog file location. Another option would be to look if we are in a dev image where the Transcript is available and log there too. And maybe it should even throw an exception when it cannot log at all because setting up failed (like on of the above mentioned settings are missing). log4s never tells you it’s not logging because of some setup problem. An example: if you misspell quietMode as quiteMode, you wont’t get any feedback that teh startup of your logging simply gave up. No exception, no error log, just TranscriptTTY.
That is really not a good situation.

[Update] Again, Don McQueen clarified on the question how to see what’s being logged by the logger if it cannot log anywhere else, namely what it outputs to TranscriptTTY. You can start VAST with an optional parameter -lCON. I still think that is too hidden, or at least not good enough, but at least there is way to search for info. I’d like log4s to make problems more obvious to me, and TranscriptTTY (or stdout/stderr) should just be the very last resort. And still I think log4s should throw an exception if it cannot initialize its logging. [/Update]

Another thing that I found it is that if I have a running rollingFileAppender and save the image and also change the log file name in the .ini file, the next time the image starts up it will continue logging to the old file. Without further debugging I guess this is due to the fact that the appender is still active in the image, and the startup sequence didn’t change the file name on image start.

[Update] There is an easy fix to this problem, and Don posted it to the VAST support group:

add this line to EsLogManager>>shutDown:

self removeAllLoggers

I guess it will be in the next release of VA ST. So at least this rant had one positive outcome and I am a happy boy again ;-)

[/Update]

 

So I still think the fact that log4s is part of every base VAST image starting with VAST version 8.5 is a good thing, and I still like how it works (once it works). I had been using Toothpick before that and liked it even a little bit better, but log4s is not bad. I haven’t seen much of a performance penalty and the API is quite clean. But it is a 1.0 version and has its little edges.

HPI students to present their VA Smalltalk related Bachelor project today

Today the Bachelor projects of students at the Hasso-Plattner-Institute at the university of Potsdam will publicly present their Bachelor projects.

These projects are aimed at gaining practical experience in cooperation with industrial partners. One of the projects was supervised by John O’Keefe from Instantiations and was aimed at adding a GTK+-Binding to VA Smalltalk in order to modernize the Unix variants of VA Smalltalk. The goals of the project were (among others):

  • Investigating the GTK+ 2.0 APIs and comparing them to the X11 Motif APIs that are currently supported; as well as investigating the concepts and implementation of the VA Smalltalk User Interface class library layering.
    Determining how to map a new graphics framework binding under the existing common interface layer of classes, and accounting for possible architectural changes due to differences between the GTK+ 2.0 application and the X11 Motif application structure.
  • Extending the existing common interface layer to handle GTK+ 2.0 functionality not available in X11 Motif.
  • Determining the feasibility and designing the approach to allow selection of the appropriate graphics framework bindings at image startup time.

You can read more about the project in this PDF document and pictures will be made available online later today.

The students worked on the projects for two semesters and – according to the material that’s public – had high goals and made quite impressive progress.

So, while we can’t expect this to find its way into the VA Smalltalk product very shortly, this shows that Instantiations is both working on improving VA Smalltalk and seeking partnerships in academia.

The public presentation of the Bachelors project’s will take place today from 1:30 pm to 5pm at the HPI in Potsdam.

A glimpse at what’s coming in VA Smalltalk

We’ve all heard or read about Instantiations‘ plans for VA Smalltalk for the upcoming Release (8.5)  and their ideas for the ones after that. So we know there are some interesting new features in the pipeline, from a new settings framework to improved code editing tools and substantial improvements to the younger (at least in the VA ST world) frameworks like GLORP and Seaside.

But not only is the team busy working on good stuff, they are also releasing early previews of their work in progress in order for users to take a look and, even more important, collect feedback. So in the last few weeks, they uploaded incremental updates to both their new logging framework (which they call log4s because it’s a port of log4j) as well as their new VA Code Assist feature that will add code completion to the Smalltalk editors to VASTGoodies.com.

So you are free to download and test these features and provide feedback to the new VA Smalltalk Support group at Google Groups. I like the way Instantiations opens up to their community in order to discuss features and requirements.

Instantiations’ CEO Mike Taylor te be interviewed on Independent Misinterpretations

James Robertson just announced the next episode of the Independent Misinterpretations podcast:

The next podcast on the schedule will involve a look at where Instantiations is taking VA Smalltalk. Dave Buck and I will be talking to Mike Taylor, President and CEO of the company.

Now that Instantiations has sold their Java Business to Google and now fully concentrates on their VA Smalltalk product, it’ll be interesting to hear what Mike has to say about their vision and plan for VA Smalltalk. The podcast will be released next sunday.

Seaside 3 and my first day at ESUG

I may be the last blogger in the Smalltalk arena to mention it, but Seaside 3 has finally been published here at Camp Smalltalk in Barcelona. You can read the full announcement on the Seaside home page.

So what can I say about my first day at ESUG? It was great, and it’s good to meet old and new friends and see the faces behind names you’ve read on the internet so many times.

My highlights yesterday were:

Andreas Tönne talked about his vision of what we as a community could do to make Smalltalk an acceptable solution in the context of Enterprise systems, especially in JEE landscapes. He started off by showing how easy it is to write a stateless bean in JEE today, using Annotations and writing only the business code. Today’s EJB containers provide all the infrastructure services around that: persistence, transactions, failover, life cycle etc. His vision is a vendor-neutral standard centered around Smalltalk acting as another bean container. He showed a few architecture sketches and ideas of how and where to start. His message was: Like it or not, EJB has won the market, and if another technology wants to get a chance in this market, it better plays well with the “standard”.

Gemstone announced that their 7000USD/Year version of Gemstone/S is going to be free for commercial use.

Bert Freudenberg talked about Squeak and EToys and gave an overview of their roadmap. My special highlight here was that they are working on getting Squeak accepted by the open source Linux distributions by providing the VM in the form of build packages and isolated source code.

Unfortunately, I missed the Wolfpack Programming workshop, but there will be another one at the XPdays in Hamburg in late November. From what I’ve heard, it’s well worth a visit.

Johann Brichau’s demo of his Seaside based Event planning system was both impressive and interesting. To me his finding about database options (Magma/Goods/Gemstone) were almost more interesting than his Seaside application, even though I got quite a few inspirational ideas from it.

Martin’s intro to Xtreams was also very interesting. Especially the idea of using Blocks as a Terminal for Streams is fascinating. We’ve talked a bit about it in the evening and found some interesting use cases for this.

We enjoyed some beer, food and Smalltalk sponsored by Instantiations. Mike Taylor, CEO of Instantiations said a few words about the Google transition and their plans for VA Smalltalk. His basic message was that VAST has been and will continue to be profitable and they are currently working on a detailed strategy for the next releases.

This year’s ESUG tech award nominees presented their stuff and I especially liked Esteban’s Mars Project. It is really good to see how far he’s gotten already. It’s great to see a Smalltalk environment with Native Widgets on the Mac.

Since I flew in in the morning, I missed the introduction, but from what I was told, we’re around 140 attendees this year, and about 30% of them are here for the first time. This is the third year that had more than 100 attendees, which is interesting in the context of the current economic situation. The venue (citilab) is great, as well as the food ;-)

John O’Keefe to be interviewed on this week’s Industry Misinterpretations

John O’Keefe, Principal Smalltalk Architect at Instantiations will be interviewed on James Robertson’s Industry Misinterpretations podcast this week:

we have John O’Keefe – long time Smalltalker and the principal Smalltalk architect at Instantiations – coming on “Industry Misinterpretations” this Tuesday at 1 PM EDT

If you can’t wait for next sunday (when James will put the podcast online), you can listen to the interview live on justin.tv on tuesday. According to my claculations, the interview will be live at 19:00 German time.

John will be talking about the consequences of Google’s acquisition of Instantiations’ Java/AJAX business for VA Smalltalk and provide details on Instantiations’ roadmap for Smalltalk.