Skip to Content
0
Former Member
Dec 21, 2006 at 01:19 PM

NotSerializableException reading file from configuration adapter

16 Views

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