on 12-21-2006 1:19 PM
Hi!
When I try to access a file with config.getFile() that is stored in VA configuration adapter I get a P4BaseRuntimeException with an underlying NotSerializableException.
This is what I'm doing:
Context ctx = new InitialContext();
ConfigurationRuntimeInterface configInterface =
(ConfigurationRuntimeInterface)ctx.lookup("configuration");
cfgContext = configInterface.getConfigurationContext();
cfgHandler = cfgContext.getConfigurationHandler();
config = cfgHandler.openConfiguration(path, ConfigurationHandler.READ_ACCESS);
boolean exists = config.existsFile(filename);
InputStream is = config.getFile(filename); // this is where the exception occurs
I've omitted handling for InconsistentReadException in this post, to keep the code short.
The existence check with config.existsFile() returns true, so configuration path and filename seem to be ok. However, config.getFile() throws a NotSerializableException.
So, how can I read a file from configuration adapter? What is my mistake?
Thanks for your help,
Frank
hi frank,
in addition to the above content
u can refer the how to use the config.getFile()
let me know u need any further info
bvr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Frank,
check http://java.sun.com/j2se/1.4.2/docs/api/java/io/NotSerializableException.html
I think the problem is that you are using a Java class which must implements Serializable interface.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.