Packaging a Seaside app

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

Packaging a Seaside app

Postby PhotonDemon » Tue May 12, 2009 8:04 am

Hi forum,

I'm getting close to wanting to package my Seaside app (at least for some testing). Any hints, suggestions or instructions are greatly appreciated.

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: Packaging a Seaside app

Postby tc » Tue May 12, 2009 11:00 am

Hello,

I do not have experience doing that but I did a search of our support cases for packaging seaside but did not find anything.

Hopefully, others have advice.

Thanks.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: Packaging a Seaside app

Postby klaus » Wed May 13, 2009 12:27 am

Hello,

I made a working seaside runtime image with VA8 Beta 1. I used the ibmst.icx as my base image, loaded all my configuration maps without any Seaside development and test-apps, started the packager control panel and made my image and saved the instructions in a own class.
My experiences:

- Starting the seaside server initializes necessary values
- I had to do some packaging instructions, to include all applications I needed.

-> My runtime image worked fine :-)

Next week I try to make a runtime image from current VAST8. I'll post my experiences here..

Regards

Klaus
Klaus Breker
Currently working for clearstream (Deutsche Börse Group)
klaus
 
Posts: 38
Joined: Fri Nov 28, 2008 1:16 am
Location: Bonn

Re: Packaging a Seaside app

Postby louis_andriese » Wed May 13, 2009 3:06 am

Lou,

I'm not sure it's totally related. but Ben van Dijk provided some tips on packaging Seaside on VA8 beta 1 into a headless NT-image:

viewtopic.php?f=12&t=2523

hth,

kind regards,

Louis
louis_andriese
 
Posts: 20
Joined: Thu Dec 13, 2007 5:19 am
Location: Waalwijk, The Netherlands

Re: Packaging a Seaside app

Postby PhotonDemon » Tue May 26, 2009 10:42 am

Hi All,

I'm still trying to package my Seaside app but can't quite figure it out.

I think I want it to run as an NT Service. I'm not sure that is the way it should run but it is a place to start. Unfortunately, a method to start the service is required. Normially this would be in my code but I think it should be somewhere in Seaside.

Another posibilty is that Seaside is a Web Connection app and should be packaged as such. But I'm not at all sure of that and have never packaged a Web Connection app, so I'm not sure how to proceed.

It could also be that Seaside apps have their own way of being packaged but who knows?

I'm sure this is a fairly simple process if I just knew what it is. Any help is greatly appreciated.

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: Packaging a Seaside app

Postby benvandijk » Wed May 27, 2009 12:00 am

Lou,

The way to packaging a Seaside app differs very much between VA8 Beta 1 and VA8 Production.
We have been able to package a runtime image on VA8 Beta 1. Will try soon on VA8 Production.
As startup method in Va8 Beta 1 you can use the initialize method on your root component
In Va8 Production you need a startup method which starts the http server and then initializes the root component

Whether you want to run your app as a NT service or as executable is a totally different question.
benvandijk
 
Posts: 45
Joined: Sun Feb 25, 2007 7:14 am
Location: Arnhem, Netherlands

Re: Packaging a Seaside app

Postby PhotonDemon » Wed May 27, 2009 6:10 am

Hi benvandijk,

Thanks for the reply.

In Va8 Production you need a startup method which starts the http server and then initializes the root component

Whether you want to run your app as a NT service or as executable is a totally different question.


I think I would like to package as an NT service unless there is some reason an executable is better.

With an NT service I can define a method that is called when the service is started. The question then is how do I start the http server? By "initializes the root component" I assume you mean the class side initialize? That's easy enough.

So, starting the http server and maybe setting the port it uses is all I need to know. If anyone can help with that, I should be fine.

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: Packaging a Seaside app

Postby benvandijk » Thu May 28, 2009 12:26 am

Lou,

Running as NT service is better, because you can start/stop the service.
When running as executable you can only terminate the image with the task manager.

This is the code i use to start the http server:
Code: Select all
   
[ ( WASstServerAdaptor port: 8080) start.
     MyOwnRootcopmponent initialize.]
    fork


Greetz, Ben.
benvandijk
 
Posts: 45
Joined: Sun Feb 25, 2007 7:14 am
Location: Arnhem, Netherlands

Re: Packaging a Seaside app

Postby PhotonDemon » Thu May 28, 2009 2:21 pm

Hi all,

Well, I have my Seaside app packaged as an NT service but there are a few problems. In reverse order of importance (because there is a large walkback at the end, sorry about that).

The size of the packaged image seems large (about 2.8 meg). I think it contains windows gui parts, that it shouldn't as an NT service but I can't find what is drawing them into the image.

I use something like the following to start the app and tell windows about it:

Code: Select all
starting
   "This is the entry point into the user code for the service.
   First register the application.  This sets the service status to
   RUNNING and establishes the callback for stopping the service application.
   Then write an entry in the event log.
   Then create and start the server object."

   AbtNtServiceInterface default
      registerService: self name stopSelector: #stopping;
      writeEventLogInformation: 1.

   [
      (WASstServerAdaptor port: 8788) start.
      MyRoot initialize.
   ] fork.


And the class MyRoot initialize code looks something like this:

Code: Select all
initialize

   (WAAdmin register: self asApplicationAt: 'MyServerName')
      preferenceAt: #sessionClass put: MySession.


When the service is started it results in the following walkback/log, which seems to be in WAAdmin>register:asApplicationAt: when it is looping over a collection of parents that seems to contain a nil:

VA Smalltalk, Version 8.0
VM Timestamp: 4.0,(NC) 3/30/2009 (78)
(C) Copyright Instantiations 1994, 2009. All rights reserved.
(C) Copyright International Business Machines Corp. 1994, 2006. All rights reserved.
Virtual Machine PID: 3084
Option oldSpaceSize set to 20000000
Option newSpaceSize set to 2000000
Option lowMinimum set to 2000000

ServerName: 'Seaside Servlet Server'
Handlers: OrderedCollection(SstInvocationHandler(http://:8788/) )
Logger: nil
Contexts: LookupTable('
SstServletContext {
ContextPath: ''/''
DefaultServlet: WASstHttpServlet
ServletMaps: LookupTable {
''Seaside Servlet'' -> OrderedCollection(''/Seaside'' )
}

InitParms: LookupTable {}
ErrorPages: LookupTable {}

SessionConfig: a SstSessionManagerConfiguration}' )

Process reportError: UndefinedObject does not understand ancestorsDo:seen:
UndefinedObject does not understand ancestorsDo:seen:
AbtNtServiceHeadlessRuntimeStartUp class(EsImageStartUp class)>>#outputWalkback:process:
receiver = AbtNtServiceHeadlessRuntimeStartUp
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
arg2 = Process:35203{running,3}
AbtNtServiceHeadlessRuntimeStartUp class(EsImageStartUp class)>>#outputWalkback:

receiver = AbtNtServiceHeadlessRuntimeStartUp
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
AbtNtServiceHeadlessRuntimeStartUp class(EsImageStartUp class)>>#reportError:resumable:startBP:
receiver = AbtNtServiceHeadlessRuntimeStartUp
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
arg2 = false
arg3 = 256
Process>>#reportError:resumable:
receiver = Process:35203{running,3}
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
arg2 = false
temp1 = 256
[optimized] in ExceptionalEvent class>>#initializeSystemExceptions
blockarg1 = Signal on Exception: (ExError) An error has occurred.
Signal>>#evaluate:
receiver = Signal on Exception: (ExError) An error has occurred.
arg1 = [] in ExceptionalEvent class>>#initializeSystemExceptions
ExceptionalEvent>>#applyDefaultHandler:
receiver = Exception: (ExError) An error has occurred.
arg1 = Signal on Exception: (ExError) An error has occurred.
temp1 = Exception: (ExError) An error has occurred.
ExceptionalEvent>>#signalFor:
receiver = Exception: (ExError) An error has occurred.
arg1 = Signal on Exception: (ExError) An error has occurred.
temp1 = nil
ExceptionalEvent>>#signalWithArguments:
receiver = Exception: (ExError) An error has occurred.
arg1 = ('UndefinedObject does not understand ancestorsDo:seen:')
ExceptionalEvent>>#signalWith:
receiver = Exception: (ExError) An error has occurred.
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
UndefinedObject(Object)>>#error:
receiver = nil
arg1 = 'UndefinedObject does not understand ancestorsDo:seen:'
MessageNotUnderstood>>#defaultAction
receiver = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
[optimized] in Exception class>>#newExceptionalEvent
blockarg1 = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
MessageNotUnderstood(Exception)>>#evaluate:
receiver = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
arg1 = [] in Exception class>>#newExceptionalEvent
ExceptionalEvent>>#applyDefaultHandler:
receiver = Exception: (ExMessageNotUnderstood) An exception has occurred
arg1 = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
temp1 = Exception: (ExMessageNotUnderstood) An exception has occurred
ExceptionalEvent>>#signalFor:
receiver = Exception: (ExMessageNotUnderstood) An exception has occurred
arg1 = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
temp1 = nil
MessageNotUnderstood(Exception)>>#signal
receiver = Signal on Exception: (ExMessageNotUnderstood) An exception has occurred
MessageNotUnderstood class(Exception class)>>#signalWith:
receiver = MessageNotUnderstood
arg1 = (nil Message (#ancestorsDo:seen:, ([] in WAConfiguration>>#ancestors IdentitySet())))
UndefinedObject(Object)>>#doesNotUnderstand:
receiver = nil
arg1 = Message (#ancestorsDo:seen:, ([] in WAConfiguration>>#ancestors IdentitySet()))
[] in WASharedConfiguration(WAConfiguration)>>#ancestorsDo:seen:
receiver = a WASharedConfiguration
arg1 = [] in WAConfiguration>>#ancestors
arg2 = IdentitySet()
blockarg1 = nil
OrderedCollection>>#reverseDo:
receiver = OrderedCollection(a WARenderLoopConfiguration nil )
arg1 = [] in WAConfiguration>>#ancestorsDo:seen:
temp1 = 2
WASharedConfiguration(WAConfiguration)>>#ancestorsDo:seen:
receiver = a WASharedConfiguration
arg1 = [] in WAConfiguration>>#ancestors
arg2 = IdentitySet()
WASharedConfiguration(WAConfiguration)>>#ancestors
receiver = a WASharedConfiguration
temp1 = IdentitySet()
WASharedConfiguration(WAConfiguration)>>#inheritsFrom:
receiver = a WASharedConfiguration
arg1 = a WAUserConfiguration
WAUserConfiguration>>#canAddParent:
receiver = a WAUserConfiguration
arg1 = a WASharedConfiguration
WAUserConfiguration>>#addParent:
receiver = a WAUserConfiguration
arg1 = a WASharedConfiguration
WAAdmin class>>#configureNewApplication:
receiver = WAAdmin
arg1 = a WAApplication named: 'SIPCeSLS'
temp1 = nil
WAAdmin class>>#register:asApplicationAt:
receiver = WAAdmin
arg1 = KscSIPCeSLSRoot
arg2 = 'SIPCeSLS'
temp1 = a WAApplication named: 'SIPCeSLS'
KscSIPCeSLSRoot class>>#initialize
receiver = KscSIPCeSLSRoot
[optimized] in KscSeasideSIPCeSLSApp class>>#starting
[] in Process>>#executeBlock:withArguments:
receiver = Process:35203{running,3}
arg1 = [] in KscSeasideSIPCeSLSApp class>>#starting
arg2 = ()
Process>>#executeBlock:withArguments:
receiver = Process:35203{running,3}
arg1 = [] in KscSeasideSIPCeSLSApp class>>#starting
arg2 = ()
Process>>#newProcessOn:stackSize:withArguments:named:
receiver = Process:35203{running,3}
arg1 = [] in KscSeasideSIPCeSLSApp class>>#starting
arg2 = 1024
arg3 = ()
arg4 = '35203'
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: Packaging a Seaside app

Postby klaus » Fri Aug 28, 2009 12:52 am

Hi all,

I also have this UndefinedObject does not understand ancestorsDo:seen: error. Any hint to avoid this?

Regards

Klaus
Klaus Breker
Currently working for clearstream (Deutsche Börse Group)
klaus
 
Posts: 38
Joined: Fri Nov 28, 2008 1:16 am
Location: Bonn

Re: Packaging a Seaside app

Postby PhotonDemon » Fri Aug 28, 2009 8:07 am

Hi Klaus,

You may not like this answer but it works for me. You must version your Seaside app and everything it needs. Start with a clean development image and load your Seaside app and everything it needs. Then package it. This packaged image should be fine. You can then continue development with the clean development image.

If you saved the old development image, you will probably see that it is larger than the new clean development image. Also, the size of the packaged image that fails may be larger than the one that works. This larger size is a hint that there was some stuff in the development image that was causing problems including the bad packaged image.

I have seen these problems before with non Seaside programs but with Seaside they are even more pronounced. I think testing Seaside from the development environment, makes the problem worse.

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


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest