PDA

View Full Version : Pentaho+PostgreSQL=relation "XXX" does not exist



razer
10-15-2006, 06:52 PM
Hi...

First of all, I have to say I am very happy for using pentaho. I saw the samples and the features are very professional. Thanks.

Well, I start to build an analisys using PostgreSQL. I made a data source:


<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>prd</jndi-name>
<connection-url>jdbc:«»postgresql://localhost/prd_estatistica</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>postgres</password>
</local-tx-datasource>
</datasources

and I made a .xaction, just like query1.xaction.

When I start my test, I receive the message:


JPivot Error ...
An error happened servicing a JPivot request. Please see the server console for more details.

and looking at logs, this means the following exception:


2006-10-15 23:31:51,328 ERROR [com.tonbeller.wcf.controller.RequestFilter] cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: ERROR: relation "TB_PRD_DATA" does not exist
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
at org.apache.jsp.jsp.Pivot_jsp._jspService(Pivot_jsp.java:984)

... and so on.

"TB_PRD_DATA" is a table within database "prd_estatistica". The user "postgres" have rights in it. It seems like if it does not exist or it do not have rights to see this table.

I tried with psql:


Password for user postgres:
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \\copyright for distribution terms
\\h for help with SQL commands
\\? for help with psql commands
\\g or terminate with semicolon to execute query
\\q to quit

Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters may not work correctly. See psql reference
page "Notes for Windows users" for details.

postgres=# \\c prd_estatistica
You are now connected to database "prd_estatistica".
prd_estatistica=# \\d TB_PRD_DATA;
Table "public.tb_prd_data"
Column | Type | Modifiers

-------------+-----------------------+------------------------------------------
---------------------
id_data | integer | not null default nextval('tb_prd_data_id_
data_seq'::regclass)
dt_data | date | not null
id_ano | integer | not null
id_semestre | integer | not null
nm_semestre | character varying(4) | not null
ds_semestre | character varying(20) | not null
id_mes | integer | not null
nm_mes | character varying(3) | not null
ds_mes | character varying(20) | not null
id_dia | integer | not null
Indexes:
"pk_tb_prd_data" PRIMARY KEY, btree (id_data)

prd_estatistica=#

As we can see, everything seems to be ok.

But I still having that exception, just like if it is not connecting to the database "prd_estatistica".

Do you have some idea to solve this problem???

Thanks in advance.

Razer.

razer
10-15-2006, 08:06 PM
Hi Friends...

Problem SOLVED...

Now, a hint for all using PostgreSQL:

*** Always access tables and columns in LOWERCASE

I was using UPPERCASE in both, so, the exception arise :/

Thanks for all...

Razer.