Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ReStore

62 views
Skip to first unread message

Mark Davis

unread,
Dec 22, 2022, 3:52:26 AM12/22/22
to
Hi,

Using ReStore for an application and it works fine during development. When I create a runtime executable, the app doesn't connect. Can't figure out what I'm doing wrong as initialization code runs during app start up. For example,

ReStore
dsn: (self databaseName);
uid: (self userId);
pwd: (self password).

Is there something I'm doing wrong here or something I missed?

Thanks

john.a...@gmail.com

unread,
Dec 22, 2022, 4:12:56 AM12/22/22
to
Hi,

The first thing to check is that you have the SSW ReStore for Dolphin package as a prerequisite of your deployment package. You may need to add this as a manual prerequisite.

If this doesn't help please reply with any specific error messages you're seeing. Also let me know which database you're using (SQLite, MySQL etc.).

Cheers.

John Aspinall
Message has been deleted

Mark Davis

unread,
Dec 22, 2022, 6:28:57 AM12/22/22
to
Mark Davis's profile photo
Mark Davis
4:24 AM (now) 
to
On Thursday, December 22, 2022 at 2:12:56 AM UTC-7, john.a...@gmail.com wrote:
> Hi,
>
> The first thing to check is that you have the SSW ReStore for Dolphin package as a prerequisite of your deployment package. You may need to add this as a manual prerequisite.
>
> If this doesn't help please reply with any specific error messages you're seeing. Also let me know which database you're using (SQLite, MySQL etc.).
>
> Cheers.
>
Hi John,

I'm using MySQL and the image is 7.1.24 under Windows. The package I'm deploying from is Swazoo 2.2. It has no pre-req for ReStore but the package that needs to access the database does have a prereq for SSWRestore for Dolphin. Maybe I should add a reference to ReStore at the web level (swazoo) since it is the root package?

The error occurs when retrieving an object from the database:

allUsers := (self userClass) storedInstances.

Where userClass is returns the name of the class for users. In class Object>>storedInstances just returns the tables with SSWReStore default. I'll double check the exe manifest again to make sure the for omissions after stripping the image.

I put in a runtime debug methods that writes out a file...
ReStore isConnected ifFalse: [ ^self writeLogFile: 'ReStore Not Connected To Database']. So, I know there's no connection. Has to be something silly occuring here. Stumped right now but, how would I manually add a package reference manually?

Thanks

john.a...@gmail.com

unread,
Dec 23, 2022, 6:25:36 AM12/23/22
to
The prerequisite of SSW ReStore for Dolphin doesn't need to be at the top level, it just needs to be somewhere in the prerequisite tree. You can check this by expanding the tree in the Prerequisites tab of the Package Manager when your root package is selected.

To add a manual prerequisite to a package, inspect the package by selecting "Properties" from the context menu, double-click on the manualPrerequisites aspect in the resulting inspector and click the + button.

I just noticed you gave your initialization code as:

> ReStore
> dsn: (self databaseName);
> uid: (self userId);
> pwd: (self password).

Do you also send "ReStore connect" ?

Hope this helps.

Mark Davis

unread,
Dec 31, 2022, 6:13:12 AM12/31/22
to
ReStore is properly initialized during startup with ReStore connect. All works fine in the development environment. I setup a new image (7.1.24) loaded my packages and still get the same error at runtime. Output from runtime error file shows:
:
{026706D4: cf 026706B1, sp 026706E8, bp 026706CC, ip 12, MessageNotUnderstood class>>receiver:message:}
receiver: MessageNotUnderstood
arg[0]: SSWReStore
arg[1]: Message selector: onStartup arguments: 0296B8A0

{026706B0: cf 02670691, sp 026706C4, bp 026706AC, ip 4, SSWReStore class(Object)>>doesNotUnderstand:}
receiver: SSWReStore
arg[0]: Message selector: onStartup arguments: 0296B8A0

{02670690: cf 0267066D, sp 026706A4, bp 02670688, ip 13, EventMessageSend>>forwardTo:withArguments:}
receiver: a EventMessageSend
arg[0]: SSWReStore
arg[1]: a Array
:

Still investigating as ReStore is a well designed/documented framework, so I must have some error taking place that prevents my Swazoo Resource from reaching my domain instance which utilizes ReStore. Thanks for your assistance in this matter.

Cheers

john.a...@gmail.com

unread,
Jan 3, 2023, 3:47:59 AM1/3/23
to
Hi - the error log would indicate the method SSWReStore class>>onStartup is missing from the deployed image. I'm not sure why this would be the case as it's defined in the SSW ReStore Main package which would suggest a prerequisite issue.

When you install your application in a fresh image are you manually installing ReStore, or do you just select your application's main package and ReStore loads automatically via prerequisite links?

Thanks for the kind words on ReStore!

John

Mark Davis

unread,
Jan 4, 2023, 12:14:47 AM1/4/23
to
Hi John,

I load packages manually. Out of my packages, only on requires ReStore as a prerequisite. ReStore package is loaded automatically based on a reference to ReStore. Maybe I should load ReStore prior to loading my packages? On another note, I added debug code that writes out events to a log file when a request take place. The point of failure is when the object broker attempts to run a query.

ObjectBroker>>getUsers: aSearchRequest
| allUsers aUser |
self writeLogFile: 'Reached Object Broker Layer, Loading Customer from Database...' .
allUsers := [ self userClass storedInstances ] on: Error do: [:error | self writeLogFile: 'Error Loading Users from Database' ].
allUsers isNil
ifTrue: [
self writeLogFile: 'Failed to load Users from Database'.
^nil ]
ifFalse: [ self writeLogFile: 'Object Broker Successfully Loaded SSWDBInstancesCollection from Database' ].

aUser := [ allUsers detect: [:each | each userName = (aSearchRequest at: 'userName') ] ] on: Error do: [:error | self writeLogFile: 'Error Querying Collection' ].
^aUser

The detect: is where the error occurs based on my output file. allUsers is the SSWDBInstancesCollection which is in the SSW ReStore Querying package and in the deployed image. Only thing I can think of at this point is that I have a database version issue. I'm running MySQL 5.7 and the Connector ODBC is 8.0. Should I be using a different version of MySQL used/tested with ReStore?

Thanks

0 new messages