OpenERP pentaho report error : Failed at query - reporting-services

I am getting an error while I try to generate a report from OpenERP.
File "/home/target/projects/orthene/pentaho_reports/wizard/report_prompt.py", line 207, in _setup_parameters
report_parameters = proxy.report.getParameterInfo(proxy_argument)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
raise Fault(**self._stack[0])
Fault: <Fault 0: 'Failed to invoke method getParameterInfo in class com.willowit.reporting.PentahoRenderer: Failed at query: SELECT name FROM res_partner WHERE customer=True'>
Here is how my pentaho report design looks like:
The pentaho report designed version is 5.0.1-Stable
It is a JDBC connection with my local postgres database connection, which is a successful connection in report designer.
select_partner is a SQL query that fetches all the partner names to show in parameter.
SELECT name FROM res_partner WHERE customer=True
PartnerQuery is a SQL query that fetches name,city,phone & email of customers
SELECT name,city,phone,email FROM res_partner WHERE customer=True AND name=${partner} // ${partner} is a parameter defined
partner parameter is containing drop down selection of partners when we generate a report, it includes 2 point partner_query(which lists down all the partners)
![enter image description here][2]
Report is working fine in Pentaho report designed & give output like this:
But it is not working in OpenERP & getting an error as described on the very top.

Keyur, I recommend that you post it on github page of WillowIT or this pentaho module.
Here is what I found https://github.com/WillowIT/Pentaho-reports-for-OpenERP/issues/125.
Is this query returning NULL?

There was a wrong value of pentaho.postgres.password in OpenERP Settings->Technical->Parameters->System Parameters.
This issue was solved after applying correct password.

The error
Fault 0: 'Failed to invoke method getParameterInfo in class com.willowit.reporting.PentahoRenderer:
is a pretty generic error. It is the top level of the error log from the Pentaho reporting engine when almost anything goes wrong, and is what is returned to Odoo (OpenERP). As such, on its own, it is not helpful for working which of the numerous possible problems it can be.
Generally, the tomcat log file (catalina.out) can be far more helpful in working out what is wrong in the reporting set up.
There are a number of issues tagged with Failed to invoke method getParameterInfo on github.
Can I encourage people to look through the github issues and post there when looking for solutions.

Related

SSIS ODBC Simba - Error when access table list on ODBC Source \ Destination

I'm using Simba ODBC to create a connection with Google Big Query and using SSIS (Visual Studio 2019) to read and write information on Big Query. The connection works fine and when I use the ODBC Source with the query option, I'm able to get data from Big Query and used it inside SSIS. But when I use the list of tables, I get an error as below:
Exception of HRESULT: 0xC0014020
Error in Data Flow Task[ODBC Source [100]]: SQLSTATE: 42000, Message: [Simba][BigQuery] (70) Invalid query: Invalid dataset ID ""TEST"". Dataset IDs must be alphanumeric (plus underscores and dashes) and must be at most 1024 characters long.
I believe that this happens because the list of tables appear between ("), instead of (`).
Print of table list
The same happens when I use the ODBC Destination. Is there a way to change the format in which the table list appears ?
Obs.: On the Visual Studio 2015 this table list comes with (`) and I can connect with big query just fine.
I can see that the tool is sending "TEST" as the dataset, however, depending on if Visual Studio is using StandardSQL or LegacySQL, the dataset should be specified as:
# LegacySQL
FROM [myproject:TEST.TABLE_TEST]
# StandardSQL
FROM `myproject:TEST.TABLE_TEST`
I was wondering if Visual Studio accepts a custom query or can be parameterized to remove the quotes. If this doesn't help, could you please share the query that cause the error? I understand that there is a query option (I'm not familiar with Visual Studio) and it is not clear for me the exact moment when the tool returns the error, screenshot without sensitive information would be appreciated.
UPDATE:
You can review the following checkpoints that could help to verify that the Simba driver is correctly set up and it is not the cause of the reported error:
Installation. Check that you are using the last version of the driver. The last version usually contains improvements on the driver.
ODBC Configuration. For example, the Step 13 of the link you will be able to see a drop-down list with the datasets available and select one as the default. If you don't have issues is this step, then the issue could be in the tool that uses the ODBC connection.
Language Dialect. In here you case change between StandardSQL or LegacySQL as needed, for example, you can force your tool to use LegacySQL and use the characters [ and ] that I explained above.
Connection String. If your tool allows to use a string with the connection, you might want to use it and explicitly indicating the default Dataset (among other driver options).

pgadmin 4 import/export table does not work

I have made sure that the columns match the 'column to export' field in the columns tab, not null columns have data, tried in both csv and txt but all i get is a message saying:
import/export job created
Nothing else: no errors, no warning, no completion.
windows 7 os
Version1.4
CopyrightCopyright 2013 - 2017, The pgAdmin Development Team
Python Version2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
Flask Version0.11.1
Application ModeDesktop
till then ill try via psql
Just a guess, but are you trying this as a superuser? I'm having the same issue and so trying to write it as a COPY statement, but get this response:
ERROR: must be superuser to COPY to or from a file
SQL state: 42501
Hint: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
I'm not sure, but maybe the functionality in pgAdmin just constructs a COPY statement, then isn't properly relaying the error message back to you when it fails.
Sounds like psql is the right way to go, though.

Creating classes in pimcore

I'm new to the whole pimcore thing. I am trying to play around and create classes. The issue is, I am not able to create more than 1 class, and in the database it is nameless, so when I try to create another class, it also tries to store it in the database with no name, which ends up showing an SQL error saying that there is a duplicate entry. Any ideas what the reason behind this could be?
I installed pimcore on an nginx server, I am trying to create classes by choosing Settings->Objects->Classes and then "Add Class", creating the first class was ok, I entered a name for the class and it was successfully added, however the name field in the corresponding database entry is empty, as in empty string ' '. So, when I try to add another class and pimcore attempts to store it in the table "classes", it returns an error saying that it would be a duplicate entry since they both are nameless, i.e. the name entered isn't added. The following error is what I managed to find using developer tools, could be helpful.
[WARN] Unable to parse the JSON returned by the server
minified_javascript_core_f5757da….js?_dc=3708:5684 Error: You're trying to decode an invalid JSON String:
Fatal error: Call to a member function hasChilds() on null in /var/www/html/pimproject/pimcore/modules/admin/controllers/DocumentController.php on line 59
at new Ext.Error (http://192.10.0.0/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27054)
at Function.Ext.apply.raise (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27447)
at Object.Ext.raise (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:27594)
at Object.Ext.JSON.me.decode (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:385102)
at Ext.define.onProxyLoad (http://192.10.0.10/website/var/tmp/minified_javascript_core_f5757da9fa29d5bf13e6aa5058eff9f7.js?_dc=3708:5641:28)
at Ext.cmd.derive.triggerCallbacks (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594533)
at Ext.cmd.derive.setCompleted (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594231)
at Ext.cmd.derive.setException (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:594444)
at Ext.cmd.derive.process (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:593638)
at Ext.cmd.derive.processResponse (http://192.10.0.10/pimcore/static6/js/lib/ext/ext-all.js?_dc=3708:22:648303)
Just reinstall Pimcore.
It can be some composer or submodules error.
I strongly recommend for the first installation to run Demo project https://github.com/pimcore/demo not Skeleton, especially if you are using Docker. Later, when you will get the feeling of Pimcore, feel free to install Skeleton or any other project.
Pimcore is stable working for years. If you had some problems before -- nowadays, it is stable.

Unknown column 'Extent1.Discriminator' in 'where clause'

I am using Visual Studio 2013 web form application with MySql database to build a web form application but I have been unable to get past 'Membership and Role Management'.
I used a database first approach for the membership and when I try registering a new user, I get the error message below:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: MySql.Data.MySqlClient.MySqlException: Unknown column 'Extent1.Discriminator' in 'where clause'
Source Error:
Line 16: var manager = new UserManager();
Line 17: var user = new ApplicationUser() { UserName = UserName.Text };
Line 18: IdentityResult result = manager.Create(user, Password.Text);
Line 19: if (result.Succeeded)
Line 20: {
Source File: c:\WebsiteProjects\ASPNETWebProjects\RevenuePortal\RevenuePortal\Account\Register.aspx.cs
Strangely, I do not have an 'Extent1.Discriminator' column anywhere in the database and cannot understand the reason for this frustrating error.
Extent1 is a table alias used by entity framework when it constructs the underlying sql statements. The error means that EF is either not configured correctly or misinterprets your database structure.
You need to analyise the underlying query it generates and determine why EF us3s a field it is not supposed to. Probably a relationship between 2 tables is incorrectly set up.
if possible try to do migration from beginning. from below execution in Nuget package manager:VS 2019 - Tools - NuGet Package Manager - Package Manager Console - run command Add-Migration DBInit - once done, run another command Update-Database.
Above solution is for code first approach.
I had same issue when I changed my system, After did migration it started working for me. Hope same will work for others. happy programming!!

"ContentType matching Query does not exist" - only on SQLite, not MySQL

I'm experiencing a strange bug with the way Django Test framework operates.
When using SQLite Database Backend, all of the tests crash with the following error:
File "[]/core/tests/test_admin.py", line 91, in setUpSomething
content_type = ContentType.objects.get(app_label='core', model='SomeModel')
File "[]/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
return self.get_queryset().get(*args, **kwargs)
File "[]/lib/python2.7/site-packages/django/db/models/query.py", line 310, in get
self.model._meta.object_name)
DoesNotExist: ContentType matching query does not exist.
However, the same code executes well under MySQL backend.
Clearly Django should make these functions agnostic of the backend used?
I had the same problem and I have no idea if my solution will be helpful, but it solved my issue, so here goes.
In my application code, I was attempting to query ContentType instances in the following way:
email = ContentType.objects.get(app_label="users", model="EmailAddress")
This worked fine with our actual MySQL database, but failed in test under a SQLite test database. However, if I switched the model definition to lowercase, it worked in both places:
email = ContentType.objects.get(app_label="users", model="emailaddress")
My guess was that this may have to do with the default collation in MySQL of case-insensitivity, so the first query should not have worked if I were comparing case-sensitively.
Indeed, when I looked at my database, all the model labels in the django_content_type table were lowercase and SQLite cares (by default) about case, so my queries in my tests were legitimately failing.