I'm using WPF 7.0 Designer on RH Linux configured with WebSphere Portal Server 7.0. When trying to connect to a datasource (DB2 V9.7 - defined in WAS) from the SQL DataSource builder the exception is produced:
Java.lang.SecurityException: The action SqlMetaDataUtil.verifyDataSource in model factory/core/db_utils is not publicly accessible.
Can't get around this issue. Any advice what may be wrong?
This topic has been locked.
7 replies Latest Post - 2010-10-18T19:12:18Z by bosox
Pinned topic Java.lang.SecurityException - method not publicly accessible error
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-10-18T19:12:18Z at 2010-10-18T19:12:18Z by bosox
DGawron 10000054HC251 PostsACCEPTED ANSWER
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-17T16:34:43Z in response to SystemAdminI don't have your exact environment, but I do have WPF 7.0 and I cannot reproduce the error. The environment I'm using should hit the error if there was a bug in the way SQL Datasource builder or db_utils.model was implemented.
Are you seeing this in Designer or when running a model? Is there a stack trace that goes along with the error message? Did you modify db_utils.model in any way?
If the Verify Connectivity input is checked in SQL Datasource, then uncheck the input. That should make the error go away.
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-17T19:21:55Z in response to DGawronThanks David,
The WPF project I am dealing with has been exported (as project archive) from WPF 6.1. I imported it to WPF 7.0, but surprisingly the option to "Upgrade Project Version" is grayed out (disabled). I tried it both on Win and Linux client with the same effect.
Now, when I exported just the models and imported to WPF 7.0, the SQL builders work correctly. Any comments regarding the upgrade?
kevintap 100000QN0341 PostsACCEPTED ANSWER
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-17T20:07:04Z in response to SystemAdminI assume that your project archive is a complete version of the project from WPF 6.1, containing all files/folders from the 6.1 project. If so, importing that project archive into WPF 7.0 should cause it to flag the project as needing to be upgraded (and enable the Upgrade Project Version action).
Can you post the contents of the .bowstreet file from the root of your project? I'd like to see what's in this file in your project to understand why the Upgrade Project Version action has not been enabled.
You can force the Upgrade Project Version action to be enabled for a project by editing the .bowstreet file in your project and modifying the bowstreet.webapp.version property. (Just add some additional characters to the end of the string.) This should cause the Upgrade Project Version action to be enabled, which you can then run to get your project properly updated to the 7.0 runtime.
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-17T23:16:47Z in response to kevintapIwill try your suggestion. Thanks!
Here is the .bowstreet file for the project:
#Designer project properties for LabProject
#Fri Sep 17 01:42:07 EDT 2010
wpf.servertype=IBM WebSphere Application Server and Portal Server 7.x
bowstreet.webapp.version=7.0.0 Release WPF7.0_20100806.0904
kevintap 100000QN0341 PostsACCEPTED ANSWER
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-18T13:58:12Z in response to SystemAdminThe bowstreet.webapp.version property in your .bowstreet file is set to "7.0.0 Release WPF7.0_20100806.0904", which indicates that this project was created by the WPF 7.0 designer (or successfully upgraded by the WPF 7.0 designer). I'd like to understand the steps that you went through to create this project. Did you start the WPF 7.0 designer, create a new project, then import your project archive into this project? If so (and your project archive either didn't contain the .bowstreet file or you elected not to overwrite the .bowstreet file when importing the project archive), then you could end up in this situation where you have a down level project that the designer thinks doesn't need to be upgraded.
Also, how was your project archive produced? Is it a full archive of the entire project, or does it only contain some of the files from the project?
Re: Java.lang.SecurityException - method not publicly accessible error2010-09-19T02:55:56Z in response to kevintapKevin,
I think you nailed it. The project I imported was a complete project but I might have chosen not to overwrite this particular file (.bowstreet). I'm pretty sure this must have happened. Another words a user error!
It would be nice however if the implications of overwriting versus not overwriting of certain files during the project import process were explained somewhere in the documentation. There are always a couple of project files which the import process prompts about and there is no explanation what these files role is.
Thanks for your help,
bosox 060001F02P64 PostsACCEPTED ANSWER
Re: Java.lang.SecurityException - method not publicly accessible error2010-10-18T19:12:18Z in response to SystemAdminA good rule of thumb is to only add files that you create to an archive. This ensures that you don't overwrite any files that Portlet Factory laid down when you first created the project. If you pull in project files from another project that was developed on another machine, picking up some of these project files can cause issues for you.
Note that if someone does send you an archive that is a full project export, you can uncheck those directories and files that you know are standard parts of a WPF project. Just import those files that are specific to the application and were added after the project was created.