Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
PROFILE_STORE_FILE_PATH_PROP_KEY value being ignored
mmah
Hi all,
I've read some postings on the suggestion of using property binding for a connection profile store file.
In one of my reports, I have specified my connection store URL as reportContext.getAppContext().get("birt.viewer.resource.path") + "/premiadatasource.dat" - since premiadatasource.dat is my connection store file.
When launching the report via my reports servlet (not BirtViewer), i noticed some stack trace that displays as
"Ignoring the PROFILE_STORE_FILE_PATH_PROP_KEY value (null/premiadatasource.dat) in connection properties. The specified path does not exist in file system."
In the web.xml file, I've defined the value of BIRT_RESOURCE_PATH as 'files', since the connection profile is stored at d:WebReportsreportsfiles<file>.dat. I could not understand why ignores the path that I've specified.
I'm not sure whether if I have missed something or where have I gone wrong over the setting. Can someone advise on this matter?
Thanks
Melvin
Find more posts tagged with
Comments
JasonW
Melvin,
Can you add a data element to the top of the report that has the following expression:
reportContext.getAppContext().get("birt.viewer.resource.path");
It looks like this is null.
Try setting a full path in the resource setting:
d:WebReportsreportsfiles
Jason
mmah
Hi Jason,
I'm sorry if I ask you again as I am not at my terminal that has my RCP designer now which makes it hard to refer.
From my understanding your reply my question is:
Are you suggesting of hard coding the ConnectionStoreProfileURL property in the report?
OR
Should I specify the full path of where the connection file is placed at BIRT_RESOURCE_PATH at web.xml?
As you might want understand that I want let the report able to read the profile file dynamically based on a setting from a file. This would be beneficial when we moved the application to the production phase.
Thanks and regards,
Melvin
JasonW
Melvin,
I was talking about the web.xml setting. Put in a full path in for the resource folder.
Jason
mmah
Hi Jason,
I've already specified the full path in BIRT_RESOURCE_PATH. When I changed the Connection Store and URL (in report properties tab) from C:xxxx to reportContext(), the PROFILE_STORE no longer appears in the stack trace. But I am not very sure that's the correct solution or not. Note: The path is specified with forward slashes "/".
After changing and running the report again, I now get a "cannot set query specification before prepare" problem. To elaborate on this problem, I've modified the premiadatasource.dat file (odaURL value) to use Schema A. When I developed the report, I previously used Schema B.
Before I run the report, I've checked the number of records for both schemas using the query set that I had. In B, I have 60 records, while in A there are only 40 of them. After the report has been generated, I find that the records shown is based on B, whereas I am expecting records from A.
Please advise on this matter.
Melvin
JasonW
Melvin,
use forward slashes. Are you modifying the query in script?
Jason
mmah
Hi Jason,
After using the "/" slashes, the PROFILE_KEY error is not showing anymore.
No, we are not modifying anything in the query. Now, giving that the production environment uses a different DB schema than the development environment, I need to change the DB schema dynamically. But the same query is used in both environments.
As said previously, after modifying the odaURL value in the profile file to use the production schema, the results shown in report are those in the development environment AND in the report stacktrace, I saw a "cannot set query specification before prepare" message displaying.
My profile configuration file (in unencrypted form) is shown as:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><DataTools.ServerProfiles version="1.0">
<profile autoconnect="No" desc="" id="d6849121-5653-11de-8f65-e0f8a1430ccd" name="Premia Data Source" providerID="org.eclipse.birt.report.data.oda.jdbc">
<baseproperties>
<property name="odaJndiName" value=""/>
<property name="odaDriverClass" value="oracle.jdbc.OracleDriver"/>
<property name="odaURL" value="jdbc:oracle:thin:
@192
.168.0.16:1521:WEBQA"/>
<property name="odaPassword" value="XXXX"/>
<property name="odaUser" value="XXXX"/>
</baseproperties>
</profile>
</DataTools.ServerProfiles>
Attached is the .rptdesign of the file, in which after setting the property binding (if opened with a Textpad program). After modifying the odaURL value above from WEBQA to WEBPROD the results shown is still showing results from the development schema (WEBQA).
I'm not very sure if I have missed out something in the report design that needs to be modified. Of course, if there are multiple DB schemas, I won't want to create multiple set of reports, do I?
Please advise on this.
Thanks and regards,
Melvin
JasonW
Melvin,
I do not see anything wrong with this. Can you log a bug for this?
Jason