[SqueakDBX] Connection not Valid problem

John Toohey jt at parspro.com
Sat Sep 26 01:23:57 UTC 2009


After some more testing, I've managed to recreate a similiar problem to what
I had with the old driver. (Remember there is a bug in Pharo, whereby these
types of errors are written to the SqeuakDebug file, and then the image
locks up)
Obviously I'm losing the DB connection or it just times out, but how can I
try these error in my code, and implement a reconnect? I think from the
stacktrace, the connection is initially valid, and then goes away during one
of the select queries.

This is the trace that is written to the debug file :-

GlorpDatabaseReadError: SqueakDBX: You cannot execute a query if the
connection is not open
25 September 2009 9:13:28 pm

VM: Mac OS - intel - 1058 - Squeak3.8.1 of '28 Aug 2006' [latest update:
#6747] Squeak VM 4.1.1b2
Image: Pharo1.0beta [Latest update: #10451]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /Users/jpt/Dev/repos/Dev-Images/pharo1.0-10451-BETAdev09.09.3
Trusted Dir /foobar/tooBar/forSqueak/bogus
Untrusted Dir /Users/jpt/Library/Preferences/Squeak/Internet/My Squeak

SqueakDatabaseAccessor(DatabaseAccessor)>>handleError:for:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
exception: SqueakDBXError: SqueakDBX: You cannot execute a query if the
connect...etc...
command: a QuerySelectCommand(a SimpleQuery for MarketType)
errorClass: GlorpDatabaseReadError
error: GlorpDatabaseReadError: SqueakDBX: You cannot execute a query if the
con...etc...
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

[] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

BlockClosure>>valueWithPossibleArgs:
Receiver: [closure] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Arguments and temporary variables:
anArray: an Array(SqueakDBXError: SqueakDBX: You cannot execute a query if
the ...etc...
Receiver's instance variables:
outerContext: [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:re...etc...
startpc: 93
numArgs: 1

[] in MethodContext(ContextPart)>>handleSignal:
Receiver: BlockClosure>>on:do:
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
sender: [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCu...etc...
pc: 17
stackp: 3
method: a CompiledMethod (2306)
closureOrNil: nil
receiver: [closure] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeC...etc...

BlockClosure>>ensure:
Receiver: [closure] in MethodContext(ContextPart)>>handleSignal:
Arguments and temporary variables:
aBlock: [closure] in MethodContext(ContextPart)>>handleSignal:
returnValue: nil
b: nil
Receiver's instance variables:
outerContext: MethodContext(ContextPart)>>handleSignal:
startpc: 90
numArgs: 0

MethodContext(ContextPart)>>handleSignal:
Receiver: BlockClosure>>on:do:
Arguments and temporary variables:
exception: SqueakDBXError: SqueakDBX: You cannot execute a query if the
connect...etc...
val: nil
Receiver's instance variables:
sender: [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCu...etc...
pc: 17
stackp: 3
method: a CompiledMethod (2306)
closureOrNil: nil
receiver: [closure] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeC...etc...

SqueakDBXError(Exception)>>signal
Receiver: SqueakDBXError: SqueakDBX: You cannot execute a query if the
connection is not open
Arguments and temporary variables:

Receiver's instance variables:
messageText: 'SqueakDBX: You cannot execute a query if the connection is not
op...etc...
tag: nil
signalContext: SqueakDBXError(Exception)>>signal
handlerContext: BlockClosure>>on:do:
outerContext: nil

SqueakDBXError(Exception)>>signal:
Receiver: SqueakDBXError: SqueakDBX: You cannot execute a query if the
connection is not open
Arguments and temporary variables:
signalerText: 'SqueakDBX: You cannot execute a query if the connection is
not o...etc...
Receiver's instance variables:
messageText: 'SqueakDBX: You cannot execute a query if the connection is not
op...etc...
tag: nil
signalContext: SqueakDBXError(Exception)>>signal
handlerContext: BlockClosure>>on:do:
outerContext: nil

SqueakDBXError class(Exception class)>>signal:
Receiver: SqueakDBXError
Arguments and temporary variables:
signalerText: 'SqueakDBX: You cannot execute a query if the connection is
not o...etc...
Receiver's instance variables:
superclass: DBXError
methodDict: a MethodDictionary()
format: 140
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #SqueakDBXError
classPool: nil
sharedPools: nil
environment: Smalltalk
category: #'OpenDBX-Core-Structure'
traitComposition: {}
localSelectors: nil

SqueakDBXError class(DBXError class)>>signal:
Receiver: SqueakDBXError
Arguments and temporary variables:
signalerText: 'You cannot execute a query if the connection is not open'
Receiver's instance variables:
superclass: DBXError
methodDict: a MethodDictionary()
format: 140
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #SqueakDBXError
classPool: nil
sharedPools: nil
environment: Smalltalk
category: #'OpenDBX-Core-Structure'
traitComposition: {}
localSelectors: nil

DBXConnection>>execute:
Receiver: a DBXConnection
Arguments and temporary variables:
aString: 'SELECT t1.id, t1.typename, t1.description, t1.selectioncount,
t1.prio...etc...
aResult: nil
Receiver's instance variables:
platform: a DBXPostgresPlatform
settings: a DBXConnectionSettings
handle: nil
open: a ValueHolder
connected: a ValueHolder
result: a DBXResultSet

SqueakDBXDriver>>basicExecuteSQLString:
Receiver: a SqueakDBXDriver
Arguments and temporary variables:
aString: 'SELECT t1.id, t1.typename, t1.description, t1.selectioncount,
t1.prio...etc...
result: nil
rowCollection: nil
Receiver's instance variables:
connection: a DBXConnection
database: nil

SqueakDatabaseAccessor>>basicExecuteSQLString:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
aString: 'SELECT t1.id, t1.typename, t1.description, t1.selectioncount,
t1.prio...etc...
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

SqueakDatabaseAccessor>>executeCommandUnbound:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
aCommand: a QuerySelectCommand(a SimpleQuery for MarketType)
answerStream: nil
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

QuerySelectCommand(DatabaseCommand)>>executeUnboundIn:
Receiver: a QuerySelectCommand(a SimpleQuery for MarketType)
Arguments and temporary variables:
anAccessor: a SqueakDatabaseAccessor
Receiver's instance variables:
useBinding: false
stream: nil
sqlString: 'SELECT t1.id, t1.typename, t1.description, t1.selectioncount,
t1.pr...etc...
platform: a PostgreSQLPlatform
parameters: an IdentityDictionary(Field(LIVEEVENTMARKETS.markettype)->3 )
blockFactor: nil
query: a SimpleQuery for MarketType
boundExpressions: nil

[] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

BlockClosure>>on:do:
Receiver: [closure] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Arguments and temporary variables:
exception: Error
handlerAction: [closure] in [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>exe...etc...
handlerActive: false
Receiver's instance variables:
outerContext: [] in
SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:re...etc...
startpc: 70
numArgs: 0

[] in SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
command: a QuerySelectCommand(a SimpleQuery for MarketType)
aBoolean: true
result: nil
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

[] in Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0

BlockClosure>>ensure:
Receiver: [closure] in Semaphore>>critical:
Arguments and temporary variables:
aBlock: [closure] in Semaphore>>critical:
returnValue: nil
b: nil
Receiver's instance variables:
outerContext: Semaphore>>critical:
startpc: 38
numArgs: 0

Semaphore>>critical:
Receiver: a Semaphore()
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
firstLink: nil
lastLink: nil
excessSignals: 0

SqueakDatabaseAccessor(DatabaseAccessor)>>executeCommand:returnCursor:
Receiver: a SqueakDatabaseAccessor
Arguments and temporary variables:
command: a QuerySelectCommand(a SimpleQuery for MarketType)
aBoolean: true
Receiver's instance variables:
connection: nil
currentLogin: a Login(a PostgreSQLPlatform, 'postgres', '847129',
'localhost_ju...etc...
logging: true
reusePreparedStatements: nil
deniedCommands: nil
mutex: a Semaphore()
dependents: nil
isInTransaction: false
databaseDriver: a SqueakDBXDriver

[] in SimpleQuery>>rowsFromDatabaseWithParameters:
Receiver: a SimpleQuery for MarketType
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
session: a GlorpSession
prepared: true
expectedRows: nil
collectionType: nil
ordering: nil
maximumLobSizeToRetrieveDirectly: 32768
readsOneObject: true
groupBy: nil
resultClass: MarketType
whereClause: Base(MarketType).MARKETTYPES.id =
Parameter(LIVEEVENTMARKETS.marke...etc...
base: Base(MarketType)
limit: 1
offset: nil
proxyType: nil
shouldRefresh: false
tracing: a Tracing
builders: an Array(an ObjectBuilder(Base(MarketType)))
fields: an OrderedCollection(Field(t1.id) Field(t1.typename)
Field(t1.descripti...etc...
joins: an OrderedCollection()
tablePrefix: nil
customCommand: nil
tablesToPrint: a SortedCollection(a DatabaseTable(t1))

BlockClosure>>on:do:
Receiver: [closure] in SimpleQuery>>rowsFromDatabaseWithParameters:
Arguments and temporary variables:
exception: GlorpDatabaseReadError
handlerAction: [closure] in SimpleQuery>>rowsFromDatabaseWithParameters:
handlerActive: false
Receiver's instance variables:
outerContext: SimpleQuery>>rowsFromDatabaseWithParameters:
startpc: 104
numArgs: 0

SimpleQuery>>rowsFromDatabaseWithParameters:
Receiver: a SimpleQuery for MarketType
Arguments and temporary variables:
anArray: an IdentityDictionary(Field(LIVEEVENTMARKETS.markettype)->3 )
command: a QuerySelectCommand(a SimpleQuery for MarketType)
alreadyTriedAction: #(true)
Receiver's instance variables:
session: a GlorpSession
prepared: true
expectedRows: nil
collectionType: nil
ordering: nil
maximumLobSizeToRetrieveDirectly: 32768
readsOneObject: true
groupBy: nil
resultClass: MarketType
whereClause: Base(MarketType).MARKETTYPES.id =
Parameter(LIVEEVENTMARKETS.marke...etc...
base: Base(MarketType)
limit: 1
offset: nil
proxyType: nil
shouldRefresh: false
tracing: a Tracing
builders: an Array(an ObjectBuilder(Base(MarketType)))
fields: an OrderedCollection(Field(t1.id) Field(t1.typename)
Field(t1.descripti...etc...
joins: an OrderedCollection()
tablePrefix: nil
customCommand: nil
tablesToPrint: a SortedCollection(a DatabaseTable(t1))

SimpleQuery(AbstractReadQuery)>>readFromDatabaseWithParameters:
Receiver: a SimpleQuery for MarketType
Arguments and temporary variables:
anArray: an IdentityDictionary(Field(LIVEEVENTMARKETS.markettype)->3 )
answerStream: nil
result: nil
Receiver's instance variables:
session: a GlorpSession
prepared: true
expectedRows: nil
collectionType: nil
ordering: nil
maximumLobSizeToRetrieveDirectly: 32768
readsOneObject: true
groupBy: nil
resultClass: MarketType
whereClause: Base(MarketType).MARKETTYPES.id =
Parameter(LIVEEVENTMARKETS.marke...etc...
base: Base(MarketType)
limit: 1
offset: nil
proxyType: nil
shouldRefresh: false
tracing: a Tracing
builders: an Array(an ObjectBuilder(Base(MarketType)))
fields: an OrderedCollection(Field(t1.id) Field(t1.typename)
Field(t1.descripti...etc...
joins: an OrderedCollection()
tablePrefix: nil
customCommand: nil
tablesToPrint: a SortedCollection(a DatabaseTable(t1))

SimpleQuery(AbstractReadQuery)>>executeWithParameters:in:
Receiver: a SimpleQuery for MarketType
Arguments and temporary variables:
parameterArray: an IdentityDictionary(Field(LIVEEVENTMARKETS.markettype)->3
)
aSession: a GlorpSession
Receiver's instance variables:
session: a GlorpSession
prepared: true
expectedRows: nil
collectionType: nil
ordering: nil
maximumLobSizeToRetrieveDirectly: 32768
readsOneObject: true
groupBy: nil
resultClass: MarketType
whereClause: Base(MarketType).MARKETTYPES.id =
Parameter(LIVEEVENTMARKETS.marke...etc...
base: Base(MarketType)
limit: 1
offset: nil
proxyType: nil
shouldRefresh: false
tracing: a Tracing
builders: an Array(an ObjectBuilder(Base(MarketType)))
fields: an OrderedCollection(Field(t1.id) Field(t1.typename)
Field(t1.descripti...etc...
joins: an OrderedCollection()
tablePrefix: nil
customCommand: nil
tablesToPrint: a SortedCollection(a DatabaseTable(t1))

[] in Proxy>>getValue
Receiver: {uninstantiated MarketType}
Arguments and temporary variables:

Receiver's instance variables:


On Fri, Sep 25, 2009 at 16:55, Mariano Martinez Peck
<marianopeck at gmail.com>wrote:

> Thank you very much!  I will then update the webpage and put them there!
>
> Thanks a lot.
>
> Mariano
>
> On Fri, Sep 25, 2009 at 7:42 PM, John Toohey <jt at parspro.com> wrote:
>
>> Attached is the contents of my /usr/local/lib. Hope this is everything
>> that you need, if not, let me know.
>>
>>
>> On Fri, Sep 25, 2009 at 13:23, Mariano Martinez Peck <
>> marianopeck at gmail.com> wrote:
>>
>>> Excellent news!!!  I am glad it worked :)
>>> SqueakDBX is very usable and stable right now. The Glorp part is still
>>> and development and thus there are some things to complete and improve.
>>>
>>> I would appreciate if you can send me the binaries for PostgreSQL for Mac
>>> if have time to do it ;)
>>>
>>> Best,
>>>
>>> Mariano
>>>
>>>
>>> On Fri, Sep 25, 2009 at 3:52 PM, John Toohey <jt at parspro.com> wrote:
>>>
>>>> All DB code working now :-) Many thanks for all the help in getting this
>>>> to work.
>>>>
>>>>
>>>> On Fri, Sep 25, 2009 at 12:00, Mariano Martinez Peck <
>>>> marianopeck at gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Fri, Sep 25, 2009 at 2:42 PM, John Toohey <jt at parspro.com> wrote:
>>>>>
>>>>>> Okay, have everything installed now, but am not sure what changes I
>>>>>> need to make to my Glorp code. This is my current connect method, that I use
>>>>>> for Glorp :-connect
>>>>>> | accessor|
>>>>>>
>>>>>> JulietLogger log:'Database connecting'.
>>>>>>
>>>>>> self platform: PostgreSQLPlatform new.
>>>>>>  accessor := DatabaseAccessor forLogin: self createLogin.
>>>>>> self
>>>>>> session: ((GlorpSession forSystem: self)
>>>>>>  accessor: accessor;
>>>>>> yourself);
>>>>>> connectionFailed: false.
>>>>>>  [accessor login] ifError: [:err | Transcript show: 'JulietDB -
>>>>>> Connection Problem', err; cr. self connectionFailed: true].
>>>>>>  accessor logging: self enableLogging.
>>>>>> self glorpSession: self session.
>>>>>>
>>>>>> Do I need to rewrite this?
>>>>>>
>>>>>
>>>>> I think you should evaluate this:
>>>>>
>>>>>     SqueakDatabaseAccessor DefaultDriver: SqueakDBXDriver.
>>>>>
>>>>> somewhere before that code. In a future this will be done automatically
>>>>> when you load GlorpDBX. I will commit this then.
>>>>>
>>>>> Let me know if that worked.
>>>>>
>>>>> Best,
>>>>>
>>>>> Mariano
>>>>>
>>>>>
>>>>>>
>>>>>> On Fri, Sep 25, 2009 at 11:07, John Toohey <jt at parspro.com> wrote:
>>>>>>
>>>>>>> Had to rebuild a new image, changes file full, and Pharo still cannot
>>>>>>> condense a change file. So, now I have a refresh image with just GlorpDBX
>>>>>>> installed. Ran the tests and have 94 passed and one failure. The failed test
>>>>>>> is DBXQueryNoTimeout and the failing method is #testNoTimeOut. The
>>>>>>> DBXQuerySetting object's timeout property is Nil, and this throws a DNU
>>>>>>> exception.
>>>>>>> Going to try to install Seaside now, and hopefully my own app then.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Sep 25, 2009 at 09:38, Mariano Martinez Peck <
>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Sep 25, 2009 at 12:21 PM, Mariano Martinez Peck <
>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Sep 25, 2009 at 12:04 PM, John Toohey <jt at parspro.com>wrote:
>>>>>>>>>
>>>>>>>>>> I now have a new image with Seaside 3 installed, however when I
>>>>>>>>>> run the follow :-
>>>>>>>>>> Installer ss project: 'SqueakDBX'; install:
>>>>>>>>>> 'SqueakDBXPharoLoader'.
>>>>>>>>>> SqueakDBXPharoLoader loadGlorpDBX
>>>>>>>>>>
>>>>>>>>>> This package depends on the following classes:
>>>>>>>>>>   PGConnection
>>>>>>>>>> You must resolve these dependencies before you will be able to
>>>>>>>>>> load these definitions:
>>>>>>>>>>   PGConnection classSide>>buildDefaultFieldConverters
>>>>>>>>>>   PGConnection classSide>>buildStateTransitionTable
>>>>>>>>>>
>>>>>>>>>> Do I need to install the Postgres driver before I do this? I
>>>>>>>>>> thought it was part of the GlorpDBX install.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Yeah, I know :(
>>>>>>>>> It is difficult to explain but there is some places of Glorp which
>>>>>>>>> still reference to PGConnection. However, it is not used. Don't worry. Do a
>>>>>>>>> "proceed" and everything will be ok.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Ok. I found the problem. It's time to restrucutre some packages
>>>>>>>> about Glorp.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> I will then try to see how to fix this.
>>>>>>>>>
>>>>>>>>> what happened to SqueakDBX tests and the amount of connections? did
>>>>>>>>> it work my commit ?
>>>>>>>>>
>>>>>>>>> Here is a summary of the things we did to GLorp and how to run
>>>>>>>>> GlorpDBX tests:
>>>>>>>>>
>>>>>>>>> http://squeakdbx.smallworks.com.ar/GLORP integration
>>>>>>>>>
>>>>>>>>> Ok, it was a secret that webpage. It is our own website with
>>>>>>>>> seaside and pier to replace the swiki :)   We will then do the public ANN
>>>>>>>>> hahaha.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Sep 24, 2009 at 21:16, Mariano Martinez Peck <
>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Sep 24, 2009 at 10:12 PM, John Toohey <jt at parspro.com>wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I am running the OpenDBX-Core tests both from the TestRunner and
>>>>>>>>>>>> the OBPackageBrowser. The tests run successfully until my DB runs out of
>>>>>>>>>>>> connections. Latest Pharo, and latest GlorpDBX installed.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> John: I have just noticed that a lot of SqueakDBX tests don't
>>>>>>>>>>> release the DB connections, as you guessed. I have just commit. can you
>>>>>>>>>>> please test it and let me know ? of course, you must first reboot or kill
>>>>>>>>>>> all the active connections ;)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> "Name: OpenDBX-Core-Mariano.230
>>>>>>>>>>> Author: Mariano
>>>>>>>>>>> Time: 24 September 2009, 10:15:03 pm
>>>>>>>>>>> UUID: 19ce8340-3070-4495-a21d-cbe2b63aca0e
>>>>>>>>>>> Ancestors: OpenDBX-Core-HMC.229
>>>>>>>>>>>
>>>>>>>>>>> There were a lot of SqueakDBX tests that don't release the
>>>>>>>>>>> connection after testing. So, this can result in a "Too many connections
>>>>>>>>>>> error". Now, all tests release connections."
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Sep 24, 2009 at 20:52, Mariano Martinez Peck <
>>>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Sep 24, 2009 at 3:13 PM, John Toohey <jt at parspro.com>wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Okay, I've installed SqueakGlorp into my existing image, and
>>>>>>>>>>>>>> added the symlink to the VM for openDBX. I can get up to 44 tests to pass,
>>>>>>>>>>>>>> but it seems that the tests are not releasing their DB connections, so after
>>>>>>>>>>>>>> a while the rest fail with a "Too many connections error"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> These tests you are talking about are SqueakDBX tests or Glorp
>>>>>>>>>>>>> tests when using SqueakDBX as the driver ?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Is this how it should be for those tests? I am just selecting
>>>>>>>>>>>>>> the test package and selecting "run tests".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>> I need to know which tests are you running, if
>>>>>>>>>>>>> OpenDBX-Core-Tests or GlorpTest. Anyway, tests should release connections.
>>>>>>>>>>>>> If this is not done, so we have a bug in our tests.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Sep 24, 2009 at 12:24, Mariano Martinez Peck <
>>>>>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Sep 24, 2009 at 3:06 PM, John Toohey <jt at parspro.com
>>>>>>>>>>>>>>> > wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - I've managed to build it on a VMWare VM running Ubunto,
>>>>>>>>>>>>>>>> and using the --disable-utils switch, I've built it on OSX also. However on
>>>>>>>>>>>>>>>> both systems when I run the test suite I see this :-
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Excellent news!!! I tell you: there is an utility called
>>>>>>>>>>>>>>> odbx-sql that let you send queries trough OpenDBX. However, that utility
>>>>>>>>>>>>>>> requires external libraries which seem to have problems, at least in
>>>>>>>>>>>>>>> Windows. So, when we compile in Windows, we must disable that utility. But
>>>>>>>>>>>>>>> remember this is an utility, not OpenDBX core or feature. It is not
>>>>>>>>>>>>>>> important. I didn't know it has problems also with MacOS, so I will update
>>>>>>>>>>>>>>> the webpage. Thanks for the testing!!!!
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> `--> ./odbxtest -b pgsql -h localhost -p 5432 -d juliet -u
>>>>>>>>>>>>>>>> postgres -w postgres
>>>>>>>>>>>>>>>>     ODBX_CAP_BASIC: 1
>>>>>>>>>>>>>>>>     ODBX_CAP_LO: 0
>>>>>>>>>>>>>>>>     ODBX_OPT_API_VERSION: 10200
>>>>>>>>>>>>>>>>     ODBX_OPT_THREAD_SAFE: 1
>>>>>>>>>>>>>>>>     ODBX_OPT_TLS: 1
>>>>>>>>>>>>>>>>     ODBX_OPT_CONNECT_TIMEOUT: 1 (using)
>>>>>>>>>>>>>>>>     ODBX_OPT_MULTI_STATEMENTS: 1 (using)
>>>>>>>>>>>>>>>>     ODBX_OPT_PAGED_RESULTS: 0
>>>>>>>>>>>>>>>>     ODBX_OPT_COMPRESS: 0
>>>>>>>>>>>>>>>>     ODBX_CAP_BASIC: 1
>>>>>>>>>>>>>>>>     ODBX_CAP_LO: 0
>>>>>>>>>>>>>>>>     ODBX_OPT_API_VERSION: 10200
>>>>>>>>>>>>>>>>     ODBX_OPT_THREAD_SAFE: 1
>>>>>>>>>>>>>>>>     ODBX_OPT_TLS: 1
>>>>>>>>>>>>>>>>     ODBX_OPT_CONNECT_TIMEOUT: 1 (using)
>>>>>>>>>>>>>>>>     ODBX_OPT_MULTI_STATEMENTS: 1 (using)
>>>>>>>>>>>>>>>>     ODBX_OPT_PAGED_RESULTS: 0
>>>>>>>>>>>>>>>>     ODBX_OPT_COMPRESS: 0
>>>>>>>>>>>>>>>> WARNING:  nonstandard use of \\ in a string literal
>>>>>>>>>>>>>>>> LINE 1: SELECT * FROM odbxtest WHERE col = 'a''''\\''b'
>>>>>>>>>>>>>>>>                                            ^
>>>>>>>>>>>>>>>> HINT:  Use the escape string syntax for backslashes, e.g.,
>>>>>>>>>>>>>>>> E'\\'.
>>>>>>>>>>>>>>>> Error in odbx_result(): ERROR:  relation "odbxtest" does not
>>>>>>>>>>>>>>>> exist
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Error in odbx_result(): ERROR:  relation "odbxtest" does not
>>>>>>>>>>>>>>>> exist
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Not sure if this means there is a problem with the build (I
>>>>>>>>>>>>>>>> downloaded to latest one) or a problem with the test suite.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> As you guessed this seems to be a problem with the test suit,
>>>>>>>>>>>>>>> but the build is seems to be perfect. I will send this part to OpenDBX
>>>>>>>>>>>>>>> mailing list and see if I receive some help. Thanks for the report.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> In order to continue and install GlorpDBX into my Pharo
>>>>>>>>>>>>>>>> image, do I need to build a new image, as my current one already has
>>>>>>>>>>>>>>>> Pharo-Glorp installed. I've never figured out how to uninstall packages in
>>>>>>>>>>>>>>>> Smalltalk.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Yeah. Me neither :(
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> But, what you can do is install just SqueakDBX in that image
>>>>>>>>>>>>>>> and run the SqueakDBX tests, using PostgreSQL to see if everything is ok.
>>>>>>>>>>>>>>> You should have all green tests. If you get this, I would really appreciate
>>>>>>>>>>>>>>> if you can make a binary for MacOS :)
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Then, you can take a new image and install GlorpDBX as
>>>>>>>>>>>>>>> explained in the wiki.  Most of the tests should be green. I say "most"
>>>>>>>>>>>>>>> because there are some that fails because of what I told you that we don't
>>>>>>>>>>>>>>> support large database fields.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Mariano
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Sep 24, 2009 at 11:15, Mariano Martinez Peck <
>>>>>>>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Sep 24, 2009 at 1:59 PM, John Toohey <
>>>>>>>>>>>>>>>>> jt at parspro.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> I'm currently trying to build openDBX on OSX. I've finally
>>>>>>>>>>>>>>>>>> found the postgres client libs and include files, and I've run ./configure
>>>>>>>>>>>>>>>>>> -with-backends="pgsql", but when I run make I get this error :-
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Excellent you are giving SqueakDBX at least a try. The real
>>>>>>>>>>>>>>>>> thing is this: The squeakDBX team is composed by 4 people. Only one has a
>>>>>>>>>>>>>>>>> Mac and he is very busy with his work. I have ALL databases working on Linux
>>>>>>>>>>>>>>>>> and Windows. And I have also prepared binaries for that because I can (dlls,
>>>>>>>>>>>>>>>>> .deb and .rpm). But I cannot do it with Mac because I don't have a mac and I
>>>>>>>>>>>>>>>>> don't know how binaries work on Mac. If you make it work, I would really
>>>>>>>>>>>>>>>>> love you help me generating the binaries so that I can update them to
>>>>>>>>>>>>>>>>> OpenDBX website.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Which OpenDBX version are you trying to compile? You should
>>>>>>>>>>>>>>>>> try 1.4.3.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Can you try configuring this way please ?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> ./configure --disable-utils --with-backends="pgsql"
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> If it works, I then explain you why that :)
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Making all in po
>>>>>>>>>>>>>>>>>> g++ -DHAVE_CONFIG_H -I. -I.. -I../lib
>>>>>>>>>>>>>>>>>> -DLOCALEDIR=\"/usr/local/share/locale\"
>>>>>>>>>>>>>>>>>> -DKEYWORDFILE=\"/usr/local/share/opendbx/keywords\"
>>>>>>>>>>>>>>>>>> -I/opt/local/include/postgresql83  -g -O2 -MT odbx_sql-argmap.o -MD -MP -MF
>>>>>>>>>>>>>>>>>> .deps/odbx_sql-argmap.Tpo -c -o odbx_sql-argmap.o `test -f 'argmap.cpp' ||
>>>>>>>>>>>>>>>>>> echo './'`argmap.cpp
>>>>>>>>>>>>>>>>>> mv -f .deps/odbx_sql-argmap.Tpo .deps/odbx_sql-argmap.Po
>>>>>>>>>>>>>>>>>> g++ -DHAVE_CONFIG_H -I. -I.. -I../lib
>>>>>>>>>>>>>>>>>> -DLOCALEDIR=\"/usr/local/share/locale\"
>>>>>>>>>>>>>>>>>> -DKEYWORDFILE=\"/usr/local/share/opendbx/keywords\"
>>>>>>>>>>>>>>>>>> -I/opt/local/include/postgresql83  -g -O2 -MT odbx_sql-commands.o -MD -MP
>>>>>>>>>>>>>>>>>> -MF .deps/odbx_sql-commands.Tpo -c -o odbx_sql-commands.o `test -f
>>>>>>>>>>>>>>>>>> 'commands.cpp' || echo './'`commands.cpp
>>>>>>>>>>>>>>>>>> mv -f .deps/odbx_sql-commands.Tpo
>>>>>>>>>>>>>>>>>> .deps/odbx_sql-commands.Po
>>>>>>>>>>>>>>>>>> g++ -DHAVE_CONFIG_H -I. -I.. -I../lib
>>>>>>>>>>>>>>>>>> -DLOCALEDIR=\"/usr/local/share/locale\"
>>>>>>>>>>>>>>>>>> -DKEYWORDFILE=\"/usr/local/share/opendbx/keywords\"
>>>>>>>>>>>>>>>>>> -I/opt/local/include/postgresql83  -g -O2 -MT odbx_sql-completion.o -MD -MP
>>>>>>>>>>>>>>>>>> -MF .deps/odbx_sql-completion.Tpo -c -o odbx_sql-completion.o `test -f
>>>>>>>>>>>>>>>>>> 'completion.cpp' || echo './'`completion.cpp
>>>>>>>>>>>>>>>>>> mv -f .deps/odbx_sql-completion.Tpo
>>>>>>>>>>>>>>>>>> .deps/odbx_sql-completion.Po
>>>>>>>>>>>>>>>>>> g++ -DHAVE_CONFIG_H -I. -I.. -I../lib
>>>>>>>>>>>>>>>>>> -DLOCALEDIR=\"/usr/local/share/locale\"
>>>>>>>>>>>>>>>>>> -DKEYWORDFILE=\"/usr/local/share/opendbx/keywords\"
>>>>>>>>>>>>>>>>>> -I/opt/local/include/postgresql83  -g -O2 -MT odbx_sql-odbx-sql.o -MD -MP
>>>>>>>>>>>>>>>>>> -MF .deps/odbx_sql-odbx-sql.Tpo -c -o odbx_sql-odbx-sql.o `test -f
>>>>>>>>>>>>>>>>>> 'odbx-sql.cpp' || echo './'`odbx-sql.cpp
>>>>>>>>>>>>>>>>>> odbx-sql.cpp: In function 'int main(int, char**)':
>>>>>>>>>>>>>>>>>> odbx-sql.cpp:228: error: invalid conversion from 'char*
>>>>>>>>>>>>>>>>>> (*)(const char*, int)' to 'int (*)(const char*, int)'
>>>>>>>>>>>>>>>>>> make[3]: *** [odbx_sql-odbx-sql.o] Error 1
>>>>>>>>>>>>>>>>>> make[2]: *** [all-recursive] Error 1
>>>>>>>>>>>>>>>>>> make[1]: *** [all-recursive] Error 1
>>>>>>>>>>>>>>>>>> make: *** [all] Error 2
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Do you know of any pre-built binaries that will work on
>>>>>>>>>>>>>>>>>> OSX?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I don't know, but I would love to have them!!!
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> On Wed, Sep 23, 2009 at 23:09, Mariano Martinez Peck <
>>>>>>>>>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> On Wed, Sep 23, 2009 at 11:27 PM, John Toohey <
>>>>>>>>>>>>>>>>>>> jt at parspro.com> wrote:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Hey,
>>>>>>>>>>>>>>>>>>>> Thanks for looking into this for me. I'm just using
>>>>>>>>>>>>>>>>>>>> Pharo as my app is using the beta of Seaside 3.0. I'm going to do as you
>>>>>>>>>>>>>>>>>>>> suggested and put some debug statements in PGConnection, and see where that
>>>>>>>>>>>>>>>>>>>> leads.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Ok, let us know what the problem was if you find it :)
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> Is it a lot of changes from me to switch to DBX on
>>>>>>>>>>>>>>>>>>>> Pharo?
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> No. Your application shouldn't have any changes. You
>>>>>>>>>>>>>>>>>>> application will use just Glorp. But in this case Glorp won't use the native
>>>>>>>>>>>>>>>>>>> PostgreSQL driver, but SqueakDBX with PostgreSQL.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I assume there are no changes in my Glorp code, but what
>>>>>>>>>>>>>>>>>>>> else do I need to do.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> The only thing you must do is:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> - Install the PostgreSQL client library (if you don't
>>>>>>>>>>>>>>>>>>> have it already installed).
>>>>>>>>>>>>>>>>>>> - Compile or Install (if you are in Linux you can use the
>>>>>>>>>>>>>>>>>>> .rpm or .deb) OpenDBX with PostgreSQL,
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> You can read how to do it here:
>>>>>>>>>>>>>>>>>>> http://wiki.squeak.org/squeak/6129
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> You must do it only once. Once this is done, everything
>>>>>>>>>>>>>>>>>>> is easy and you can take advantage of all the SqueakDBX features (
>>>>>>>>>>>>>>>>>>> http://wiki.squeak.org/squeak/6106). OpenDBX works
>>>>>>>>>>>>>>>>>>> perfect with PostgreSQL in Linux, Mac and Windows. We have also have
>>>>>>>>>>>>>>>>>>> GlorpDBX working with SqueakDBX and PostgreSQL and it is very easy to
>>>>>>>>>>>>>>>>>>> install:
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> http://wiki.squeak.org/squeak/6130    (where it says
>>>>>>>>>>>>>>>>>>> GlorpDBX).
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> The only limitation we have right now is that we don't
>>>>>>>>>>>>>>>>>>> support large objects (blob, clob, etc) yet.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> If you try it and have any problem, please, let us
>>>>>>>>>>>>>>>>>>> know!!!
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> I develop on OSX and deploy to Linux for production.
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> No problem.
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> Mariano
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> On Wed, Sep 23, 2009 at 21:03, Mariano Martinez Peck <
>>>>>>>>>>>>>>>>>>>> marianopeck at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> I was thinking if you have the problem in Squeak also
>>>>>>>>>>>>>>>>>>>>> or just Pharo ?
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>> On Wed, Sep 23, 2009 at 8:12 PM, Mariano Martinez Peck
>>>>>>>>>>>>>>>>>>>>> <marianopeck at gmail.com> wrote:
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> On Wed, Sep 23, 2009 at 8:25 PM, John Toohey <
>>>>>>>>>>>>>>>>>>>>>> jt at parspro.com> wrote:
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Hi John! This list is SqueakDBX related, so perhaps I
>>>>>>>>>>>>>>>>>>>>>> am not the best one to help you. I just make Glorp and PostgreSQL native
>>>>>>>>>>>>>>>>>>>>>> driver to work on Pharo. Actually, the only thing I did is to have all green
>>>>>>>>>>>>>>>>>>>>>> tests. No more than that. I don't have a Glorp + native postgresql driver
>>>>>>>>>>>>>>>>>>>>>> application. Anyway, I will try to help you ;)
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> My app frequently losses the connection the Postgres,
>>>>>>>>>>>>>>>>>>>>>>> and throws a "Connection not Valid" exception. Unfortunately on the latest
>>>>>>>>>>>>>>>>>>>>>>> Pharo images, there is a bug that causes this to write the stack trace to
>>>>>>>>>>>>>>>>>>>>>>> disk, and then the image locks up.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> you meat there is a Pharo bug that when there is a
>>>>>>>>>>>>>>>>>>>>>> walkback and the stacktrace is written to disk, it freezes the image ?  is
>>>>>>>>>>>>>>>>>>>>>> there a bug report of that ? Could you reproduce that ?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>  I think the socket on the PGConnection class is
>>>>>>>>>>>>>>>>>>>>>>> being closed or times out, and I need to know is there someway that I can
>>>>>>>>>>>>>>>>>>>>>>> debug this or if its a know issue.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Yes, that's probably the case. I can see in code that
>>>>>>>>>>>>>>>>>>>>>> the error 'Connection not valid' when the connection is not connected or if
>>>>>>>>>>>>>>>>>>>>>> it is nil. If you see your stacktrace, you can see that the socket variable
>>>>>>>>>>>>>>>>>>>>>> is nil. That's why the error. Now, the question is why the socket is nil ?
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> I looked for the code to see where can be the socket
>>>>>>>>>>>>>>>>>>>>>> set to nil, and I found some places:  PGConnection stTerminalError:  ,
>>>>>>>>>>>>>>>>>>>>>> stTerminated
>>>>>>>>>>>>>>>>>>>>>> Perhaps you can put a "self halt" in those methods and
>>>>>>>>>>>>>>>>>>>>>> then debug them.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> The PGConnection seems to do a lot of "self log:
>>>>>>>>>>>>>>>>>>>>>> 'XXXX'". So, perhaps you can have a Transcript opened to see that.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Finally, why don't you give a try to GlorpDBX +
>>>>>>>>>>>>>>>>>>>>>> SqueakDBX ?   It works pretty well and has good performance.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> I hope this helps. Remember I am not a native
>>>>>>>>>>>>>>>>>>>>>> postgresql driver guru. Perhaps you can ask also in squeak-dev or pharo
>>>>>>>>>>>>>>>>>>>>>> mailing lists.
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>> Mariano
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>  I am using the latest Pharo image, with the latest
>>>>>>>>>>>>>>>>>>>>>>> Pharo-Glorp package, and the newest Postgres driver. I think this is the
>>>>>>>>>>>>>>>>>>>>>>> relevant part of the stack trace :-
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> PGConnection(Object)>>error:
>>>>>>>>>>>>>>>>>>>>>>> Receiver: a PGConnection
>>>>>>>>>>>>>>>>>>>>>>> Arguments and temporary variables:
>>>>>>>>>>>>>>>>>>>>>>>  aString: 'Connection not valid'
>>>>>>>>>>>>>>>>>>>>>>> Receiver's instance variables:
>>>>>>>>>>>>>>>>>>>>>>>  trace: 0
>>>>>>>>>>>>>>>>>>>>>>> state: #Terminated
>>>>>>>>>>>>>>>>>>>>>>>  events: an OrderedCollection()
>>>>>>>>>>>>>>>>>>>>>>> socket: nil
>>>>>>>>>>>>>>>>>>>>>>>  readBuffer: 'PblankT id ��name �$password
>>>>>>>>>>>>>>>>>>>>>>> �6client...etc...
>>>>>>>>>>>>>>>>>>>>>>> readIndex: 384
>>>>>>>>>>>>>>>>>>>>>>>  lastReadIndex: 384
>>>>>>>>>>>>>>>>>>>>>>> writeBuffer: nil
>>>>>>>>>>>>>>>>>>>>>>>  processId: 28132
>>>>>>>>>>>>>>>>>>>>>>> secretKey: 1795051851
>>>>>>>>>>>>>>>>>>>>>>>  sql: 'SELECT t1.id, t1.name, t1.password,
>>>>>>>>>>>>>>>>>>>>>>> t1.client, t1.role, t1.mobile, t1.ema...etc...
>>>>>>>>>>>>>>>>>>>>>>>  functionCallOid: nil
>>>>>>>>>>>>>>>>>>>>>>> functionCallArgs: nil
>>>>>>>>>>>>>>>>>>>>>>>  copyStream: nil
>>>>>>>>>>>>>>>>>>>>>>> result: a PGResult
>>>>>>>>>>>>>>>>>>>>>>>  connectionArgs: a PGConnectionArgs
>>>>>>>>>>>>>>>>>>>>>>> notificationSubscribers: nil
>>>>>>>>>>>>>>>>>>>>>>>  fieldConverters: an
>>>>>>>>>>>>>>>>>>>>>>> IdentityDictionary(16->[closure] in PGConnection class>>boo...etc...
>>>>>>>>>>>>>>>>>>>>>>>  sqlStringConverter: [closure] in
>>>>>>>>>>>>>>>>>>>>>>> PGConnection>>clientEncoding:
>>>>>>>>>>>>>>>>>>>>>>> receivingTextConverter: an UTF8TextConverter
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> PGConnection>>execute:
>>>>>>>>>>>>>>>>>>>>>>> Receiver: a PGConnection
>>>>>>>>>>>>>>>>>>>>>>> Arguments and temporary variables:
>>>>>>>>>>>>>>>>>>>>>>>  sqlString: 'SELECT t1.id, t1.typename,
>>>>>>>>>>>>>>>>>>>>>>> t1.description, t1.selectioncount, t1.pr...etc...
>>>>>>>>>>>>>>>>>>>>>>>  Receiver's instance variables:
>>>>>>>>>>>>>>>>>>>>>>> trace: 0
>>>>>>>>>>>>>>>>>>>>>>>  state: #Terminated
>>>>>>>>>>>>>>>>>>>>>>> events: an OrderedCollection()
>>>>>>>>>>>>>>>>>>>>>>>  socket: nil
>>>>>>>>>>>>>>>>>>>>>>> readBuffer: 'PblankT id ��name �$password
>>>>>>>>>>>>>>>>>>>>>>> �6client...etc...
>>>>>>>>>>>>>>>>>>>>>>>  readIndex: 384
>>>>>>>>>>>>>>>>>>>>>>> lastReadIndex: 384
>>>>>>>>>>>>>>>>>>>>>>>  writeBuffer: nil
>>>>>>>>>>>>>>>>>>>>>>> processId: 28132
>>>>>>>>>>>>>>>>>>>>>>>  secretKey: 1795051851
>>>>>>>>>>>>>>>>>>>>>>> sql: 'SELECT t1.id, t1.name, t1.password, t1.client,
>>>>>>>>>>>>>>>>>>>>>>> t1.role, t1.mobile, t1.ema...etc...
>>>>>>>>>>>>>>>>>>>>>>>  functionCallOid: nil
>>>>>>>>>>>>>>>>>>>>>>> functionCallArgs: nil
>>>>>>>>>>>>>>>>>>>>>>>  copyStream: nil
>>>>>>>>>>>>>>>>>>>>>>> result: a PGResult
>>>>>>>>>>>>>>>>>>>>>>>  connectionArgs: a PGConnectionArgs
>>>>>>>>>>>>>>>>>>>>>>> notificationSubscribers: nil
>>>>>>>>>>>>>>>>>>>>>>>  fieldConverters: an
>>>>>>>>>>>>>>>>>>>>>>> IdentityDictionary(16->[closure] in PGConnection class>>boo...etc...
>>>>>>>>>>>>>>>>>>>>>>>  sqlStringConverter: [closure] in
>>>>>>>>>>>>>>>>>>>>>>> PGConnection>>clientEncoding:
>>>>>>>>>>>>>>>>>>>>>>> receivingTextConverter: an UTF8TextConverter
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> SqueakDatabaseAccessor>>basicExecuteSQLString:
>>>>>>>>>>>>>>>>>>>>>>> Receiver: a SqueakDatabaseAccessor
>>>>>>>>>>>>>>>>>>>>>>> Arguments and temporary variables:
>>>>>>>>>>>>>>>>>>>>>>>  aString: 'SELECT t1.id, t1.typename,
>>>>>>>>>>>>>>>>>>>>>>> t1.description, t1.selectioncount, t1.prio...etc...
>>>>>>>>>>>>>>>>>>>>>>>  result: nil
>>>>>>>>>>>>>>>>>>>>>>> rowCollection: nil
>>>>>>>>>>>>>>>>>>>>>>>  Receiver's instance variables:
>>>>>>>>>>>>>>>>>>>>>>> connection: a PGConnection
>>>>>>>>>>>>>>>>>>>>>>>  currentLogin: a Login(a PostgreSQLPlatform,
>>>>>>>>>>>>>>>>>>>>>>> 'postgres', '847129', 'localhost_ju...etc...
>>>>>>>>>>>>>>>>>>>>>>>  logging: true
>>>>>>>>>>>>>>>>>>>>>>> reusePreparedStatements: nil
>>>>>>>>>>>>>>>>>>>>>>>  deniedCommands: nil
>>>>>>>>>>>>>>>>>>>>>>> mutex: a Semaphore()
>>>>>>>>>>>>>>>>>>>>>>>  dependents: nil
>>>>>>>>>>>>>>>>>>>>>>> isInTransaction: false
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Any help would be appreciated, as this is stopping me
>>>>>>>>>>>>>>>>>>>>>>> from going to a Beta test at the moment.
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>>>>>> SqueakDBX mailing list
>>>>>>>>>>>>>>>>>>>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> -JT
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> SqueakDBX mailing list
>>>>>>>>>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>>>>>>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> -JT
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> SqueakDBX mailing list
>>>>>>>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>>>>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> -JT
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> SqueakDBX mailing list
>>>>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -JT
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -JT
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> SqueakDBX mailing list
>>>>> SqueakDBX at lists.squeakfoundation.org
>>>>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> -JT
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> -JT
>>
>>
>>
>
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>
>


-- 
-JT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20090925/26a98a9f/attachment-0001.htm


More information about the SqueakDBX mailing list