|
Re: Birt Viewer, DataSource, Password [message #512010 is a reply to message #511912] |
Wed, 03 February 2010 11:32 |
|
Ricky,
Did you implement the org.eclipse.birt.report.model.encryptionHelper
extension point? If you do you should be able to just place it in your
plugins folder.
Jason
Ricky Ru wrote:
> Hi friends,
>
> I met a problem. We developed some plugins into birt designer to enable
> user to create the rptdesign as they want. One of the feature is to use
> our own method to encrypt the password of data source. like this:
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="6">
> <text-property name="displayName"></text-property>
> <property
> name="odaDriverClass">rkyoem.jdbc.oracle.OracleDriver</property >
> <property
> name="odaURL">jdbc:rkyoem:oracle://xi-fru:1521;SID=ORCL</property>
> <property name="odaUser">scott</property>
> <encrypted-property name="odaPassword" encryptionID="
> com.rky.reporting.birt.designer.repository.encode.CryptoHelp er
> ">[355386a03baa786762fa5da04a54618005]</encrypted-property>
> </oda-data-source>
> </data-sources>
> Of course, I know how to decrypt the password.
> First, I created the rptdocument via this:
> ........
> runTask.getAppContext().put("Data Source" , conn);
> runTask.run("d:\temp\my.rptdocument");
> .....
>
> After that, I wanted to show the result in birt-viewer and issue request
> http://xi-fru.rky.com:8084/birt-viewer/frameset?__document=d :\temp\my.rptdocument
> I have already put the driver and the decryption class into
> birt-viewer\WEB-INF\platform\plugins\org.eclipse.birt.report
> .data.oda.jdbc_2.3.1.v20080827\drivers
>
> But I got the following error:
> rg.eclipse.birt.data.engine.core.DataException: Cannot open the
> connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
> There is an error in get connection, [RKYOEM][Oracle JDBC
> Driver][Oracle]ORA-01017: invalid username/password; logon denied
|
|
|
|
Re: Birt Viewer, DataSource, Password [message #512312 is a reply to message #512185] |
Thu, 04 February 2010 11:24 |
|
Ricky,
I just tried with BIRT 2.5.1 and had no issues. Verify in your
manifest.mf file that you have no dependencies on any ui plugins.
Jason
Ricky Ru wrote:
> Yes, I developed a plugin to implement the extension point as you said.
> And also, I could see it take effect when I placed it into the plugins
> folder of birt designer. The password was encrypted as I wanted. And I
> could preview the report result.
>
> But , It did not take effect if I placed the plugin into the plugins
> folder of birt-viewer which was running in a web container. I also wrote
> a test class to run the same birt report through java code. I also put
> plugin into the plugins folder of Birt Engine. But I got the same
> error(can not connect database due to invalid username/password). I can
> make sure the start method of Activator was not executed. So, It seems
> my plugin was not loaded.
>
>
> My plugin was very easy like this:
> public class EncryptionHelper3 implements IEncryptionHelper {
>
> public String decrypt(String string) {
> // TODO Auto-generated method stub
> if ("tiger1".equals(string))
> {
> return "tiger";
> }
> return string;
> }
> public String encrypt(String string) {
> // TODO Auto-generated method stub
> if ("tiger".equals(string))
> {
> return "tiger1";
> }
> return string;
> }
> }
>
> The following is the data source node generated in the designer.
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="6">
> <property
> name="odaDriverClass">oracle.jdbc.driver.OracleDriver</property >
> <property
> name="odaURL">jdbc:oracle:thin:@xi-fru:1521:ORCL</property >
> <property name="odaUser">scott</property>
> <encrypted-property name="odaPassword"
> encryptionID="rky_plugin.EncryptionHelper3">tiger1</encrypted-property >
> </oda-data-source>
> </data-sources>
>
> Does anyone have suggestion on that? Any help will be very appreciated.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03176 seconds