Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCPAC Session Not Initilaized 1

Status
Not open for further replies.

SLICan

IS-IT--Management
May 28, 2009
23
CA
We have a .net application which is written to communicate with ACCPAC 5.2. We use AccpacCOMAPI to connect to ACCPAC. Our problem is we are not always able to establish connection, sometimes we can, sometimes we cannot. We tried to trace the problem and found it stops at session initialization (AccpacSession.Init) and the message is "Session is not initialized". To fix this problem, we'd need to restart the .net application pool. Does anybody know how to fix the problem? Any reply will be greatly appreciated. Thanks.
 
When this happens are you using up Accpac LanPak licenses until there are no more?
 
I don't think it's a LanPak issue because evey time when it happens we check used lecense and it's not exceed. I went through every program call to make sure clean up (i.e. session close, session=nothing) is done.
 
You might try running rvSpy and dbSpy to see if anything shows up there.
 
Thx DjangMan, what's rvSpy and dbSpy? What are they for and how to use them?
 
a4wrvspy and a4wdbspy are in the RUNTIME folder. RVSpy logs all of the steps that the Views are taking. DBSpy logs the database interactions.

Here's a picture:
User Interface/Macros
{}
View Layer <= rvSpy logs this layer
{}
Database Layer <= dbSPy logs this layer
{}
Database
 
Thx again but I don't get you. Do I run it the DOS prompt or from Macro/run? And what do I get? Text file? Sorry, perhaps these are kind of silly questions...
 
They are Windows executables. Run them and see what they do.
 
Don't see the logs help. Geez.. I've been recycling IIS work process tens of times today.
 
rvSpy only has a couple of menus. Go under Options, Output... to set the text file. Then start dbSpy and within it's options tell it to send it's output to the rvSpy window.
 
Additional info: I got "Session could not be opened; Error connecting to database" message when trying to open a session.
 
Hi DjangMan,

I tried but looks likes it only log when user's log in from ACCPAC whereas my situation is to open session from .net vb code. I tried but don't see anything in DBSpy log.
 
The only other suggestions I have for you would be:
Make sure you have the latest service pack for System Manager 5.2 installed.

Make sure you don't have any memory leaks.

Put a pause in your script so it waits for the OS to catch up with file requests (reading orgs.ism).

Consider writing something that will keep a session object open and the .net app can request the session object. That's getting beyond what I can help with but it might spark an idea.
 
Since we didn't join the maintenance, any idea which is the latest SP for SM 5.2? I believe we did long time ago. Just want to make sure if there's any latest SP came out after.

We've recording the running of API by writing actiions to event log and found only sometimes it failed while executing AccpacSession.open and the message get caught is "Session is not initialized". What I don't understand is not error message was trapped for AccpacSession.Init which is executed prior to the open statement.

Anyway, thanks for a lot of advices. Hoping some other users can be as helpful as you to give some advices too.
 
We found that constantly opening/closing sessions lead to memory leaks and eventual crashes, I cannot remember the version that this was in but we eventually got a fix that rectified the problem. After hours of head banging, loads of pizza and gallons of coke someone figured out there was a heap error. The details are all fuzzy now, but the symptoms sound the same.
 
Yeah... That sounds possible 'casue our web application frequently needs connect to ACCPAC for credit and a/c balance checking. The worst part is this problem leads my users to loss confidence on IT.... Who can help?
 
And... our workaound is to recycle application pool in IIS.
 
I wouldn't hold my breath for help. 5.2 is no longer supported by Sage, and Accpac's web integration has always been problematic. I'll bet you're the only person (literally) in the world trying to do what you're doing - integrating Accpac 5.2 web services.

FWIW, the current SP for 5.2 is 5, it came out on 7/13/05.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top