Logon wants to load Demo Data.  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Logon wants to load Demo Data.

Postby Ernst » Tue Jun 11, 2019 6:50 pm

Hi,

Have some logon code running under 7.02 on VB. To logon and Load Web Orders.
Looks like the following.
MyManager = New JiwaFinancials.Jiwa.JiwaApplication.Manager
MyManager.Logon(MyServerName, MyDatabaseName, JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, jiwaUserName, jiwaUserPassword)
MyJiwaSalesOrder = MyManager.BusinessLogicFactory.CreateBusinessLogic("JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder", MyJiwaSalesOrder)

and then

MyJiwaSalesOrder.CreateNew(...etc

The login to JIWA seems to take a few minutes before the order loads, and I was looking into it, and see these messages popping up in event viewer.
It looks like its stuck in a loop continually wanting to load the Demo DB. Is there something I can do to stop that? Deleting the said.. JiwaDemo, just results in a copy being done, then back to the already exists message.

Thx,


[JiwaApplication, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c], [JiwaFinancials.Jiwa.JiwaApplication.ConnectionManager.ConnectionProfile].[ReadRecord]The file 'C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\JiwaDemo_Primary.mdf' already exists.



[JiwaApplication, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c], [JiwaFinancials.Jiwa.JiwaApplication.ConnectionManager.ConnectionProfile].[ReadRecord]The file 'C:\Users\Ernst.CHEVALIER\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\JiwaDemo_Primary.mdf' already exists.

[JiwaApplication, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c], [JiwaFinancials.Jiwa.JiwaApplication.ConnectionManager.ConnectionProfile].[ReadRecord]Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=17539; handshake=9;
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Logon wants to load Demo Data.

Postby Mike.Sheen » Tue Jun 11, 2019 6:58 pm

This happens when there is no JiwaConnections.xml in the %appdata%\Roaming\Jiwa Financials folder for the user.

We try to be helpful and when jiwa is launched we check for the presence of JiwaConnections.xml in the %appdata%\Roaming\Jiwa Financials folder and if there isn't one, we assume this user has just installed Jiwa so we copy a demo database to their localdb folder and create a JiwaConnections.xml for them so the login form shows a single "Jiwa Demo" connection wired up to the demo data in their localdb instance.

To prevent that, just create a JiwaConnections.xml file in the %appdata%\Roaming\Jiwa Financials folder.

EDIT: And if you think this is a bug, you can log it on our helpdesk :)
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Logon wants to load Demo Data.

Postby Ernst » Tue Jun 11, 2019 7:41 pm

OK this is the message

'C:\Users\Ernst.CHEVALIER\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\JiwaDemo_Primary.mdf' already exists.

So it must be looking for the JIWAconnection.xml in the same folder.

See Attachment..Capture.JPG. The connection.xml is already in the correct place..?
Attachments
Capture.JPG
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Logon wants to load Demo Data.

Postby Mike.Sheen » Wed Jun 12, 2019 10:18 am

Ernst wrote:'C:\Users\Ernst.CHEVALIER\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\JiwaDemo_Primary.mdf' already exists.

So it must be looking for the JIWAconnection.xml in the same folder.


No it's not - how did you reach that conclusion?

It's looking for JiwaConnections.xml in the folder I said - %appdata%\Roaming\Jiwa Financials - which in your case is C:\Users\Ernst.CHEVALIER\AppData\Roaming\Jiwa Financials.

Yes, I can see from your screenshot that file is present - but it's not the same folder as the JiwaDemo_Primary.mdf file.

The behaviour you're seeing should not happen - but any thing to try to side step the issue is use a connection template file.

If we can't fine %appdata%\Roaming\Jiwa Financials\JiwaConnections.xml we look for a JiwaConnectionsTemplate.xml in the Program Files (x86)\Jiwa Financials\Jiwa 7 folder and will copy that to %appdata%\Roaming\Jiwa Financials\JiwaConnections.xml. Only if there is both no %appdata%\Roaming\Jiwa Financials\JiwaConnections.xml and no Program Files (x86)\Jiwa Financials\Jiwa 7\JiwaConnectionsTemplate.xml file do we attempt to setup a localdb copy of demo data.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Logon wants to load Demo Data.

Postby Ernst » Wed Jun 12, 2019 3:38 pm

No it's not - how did you reach that conclusion?

>> Since its loading the Demo DB into C:\Users\Ernst.CHEVALIER\AppData.... Just assumed it going to be looking for JiwaConnections.xm in C:\Users\Ernst.CHEVALIER\AppData\Roaming\Jiwa Financials\JiwaConnections.xml

Ive made a copy of C:\Users\Ernst.CHEVALIER\AppData\Roaming\Jiwa Financials\JiwaConnections.xml, renamed it JiwaConnectionTemplate.xml, and copied it to the JIWA folder per your email. See screenshot.

But message continues.

"The description for Event ID 0 from source Jiwa 7 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

[JiwaApplication, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c], [JiwaFinancials.Jiwa.JiwaApplication.ConnectionManager.ConnectionProfile].[ReadRecord]The file 'C:\Users\Ernst.CHEVALIER\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\JiwaDemo_Primary.mdf' already exists.

the message resource is present but the message is not found in the string/message table"
Attachments
Capture2.JPG
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Logon wants to load Demo Data.  Topic is solved

Postby Ernst » Wed Jun 12, 2019 4:26 pm

OK Ive Copied the JIWAConnections.xml and the Template to the same folder where the Webload program is running, and the message has gone away..

Thanks for the idea's.

Now the File Watcher is throwing a "Could not find file 'C:\Saleslink\WebinFileWatcher\Pending\salesdata_20190612172000.2019-06-12T172001.358'.", and aborts the service, but thats for another day. :D
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 6 guests

cron