xTuple.com xTupleU Blog & News Customer Support

Error entering invoices

I checked and saw that Samuel Coleman had a similar error a little while back but in my case I am not entering any miscellaneous items at all. I posted an invoice and an error message flashed and now any action results in an error message:
Help?

ERROR: current transaction is aborted, commands ignored until end of transaction block
(25P02) QPSQL: Unable to create query

The Query:
select * from source where source_charass = :charass;

Bound Values:
:charass: INV

Kurt,

The “current transaction is aborted” error is a symptom of some other problem, probably the error message that flashed by. Let’s try to capture that flash:

  • System > View Database Log
  • click the CLEAR button
  • open whatever window it is that you’re using to post the invoice
  • if you can get to it, click that CLEAR button again (we want to get as much unnecessary stuff out of the way as possible)
  • post the invoice

Now start at the top of the Database Log window and scroll until you find the first database error. There will probably be other stuff there, too, but focus on finding the first database error. The line will start with the date and timestamp followed by the word ERROR:, like this:

Fri Apr 12 16:36:03 2019 ERROR:  relation "mytable" does not exist
LINE 1: select * from mytable;
                      ^
(42P01) QPSQL: Unable to create query
select * from mytable;

What’s that full error message? If it’s more than a few lines long, attach it as a separate file.

Gil

Hi Gil,
I had already entered a number of invoices successfully before this one. I got the system usable again by finding and deleting that invoice, re-entering it and posting it seemingly successfully. But when I tried to do invoice register to confirm that it successfully posted it threw an error again: Could not open query 'invoiceRegister detail File display.cpp, line 795.
I tried following your instructions but it just kept throwing up errors that I did not have the fortitude to keep clicking past. Here is what I did get:

Sat Apr 13 12:20:55 2019 ERROR: current transaction is aborted, commands ignored until end of transaction block
(25P02) QPSQL: Unable to create query
SELECT script_source, script_order FROM script WHERE((script_name=‘QWidget’) AND (script_enabled)) ORDER BY script_order;
Sat Apr 13 12:20:55 2019 Debug: Looking for a script “XWidget”
Sat Apr 13 12:20:55 2019 ERROR: current transaction is aborted, commands ignored until end of transaction block
(25P02) QPSQL: Unable to create query
SELECT script_source, script_order FROM script WHERE((script_name=‘XWidget’) AND (script_enabled)) ORDER BY script_order;
Sat Apr 13 12:20:55 2019 Debug: Looking for a script “invoice”
Sat Apr 13 12:20:55 2019 ERROR: current transaction is aborted, commands ignored until end of transaction block
(25P02) QPSQL: Unable to create query
SELECT script_source, script_order FROM script WHERE((script_name=‘invoice’) AND (script_enabled)) ORDER BY script_order;
Sat Apr 13 12:20:55 2019 ERROR: current transaction is aborted, commands ignored until end of transaction block
(25P02) QPSQL: Unable to create query

While I wait your response I might restore and try re-keying the invoices again… all of them …

Hi again,
I restored from an earlier backup. Created a new database restored the backup to that database from before I entered any invoices and I am still getting the same error. Is this an OS error? Could a Ubuntu update have caused this?

I found out what I did wrong. My own fault was that I had entered many invoices which I posted after by going to post invoices and they went through fine, but when I checked the post on save button it gave the error because I had not saved sale assignments…

I was going to suggest it might be something like missing Fiscal Periods or assignments. Regarding the missing assignments, how did you determine that was the problem? Was the error message unclear or vague? If the error about missing assignments was not immediately obvious, could you please raise an Issue in the tracker so that we can work to make it simpler to work out what needs correcting.

Thanks

I don’t think it needs to be an issue in the tracker. What happened was I made a mistake and restored from an earlier backup where I had not yet made the assignments and forgot to do them again. I realised this when I booted an older laptop I had started this project on and since it was older I double checked the assignments, realised they were missing and fixed that. everything posted perfectly on the old system so I came back to the newer one and restored, made the assignments and away I went.

Kurt,

There may be a bug or two hidden in here. We’ll investigate and see what we can find.

Gil