Quantcast
Viewing all articles
Browse latest Browse all 2686

No schema definition found for ...

Hi developers,

 

We're currently upgrading to NW 7.3 from 7.0 and a function we've used before no longer works.

 

The problem is writing a configuration to the PCD using streamsource:

 

try {
// the context is not there, so create it, and store the data
appSubCtx = rootCtx.createSubcontext(appSubCtxPrefix);
appSubCtx = rootCtx.createSubcontext(appSubCtxName);
// read the xml file from filesystem
String fileName = mm_serviceContext.getPrivateServicePath()+ "/config/CPPConfiguration.xml";
cat.infoT(loc, "Filename: "+fileName);
IStreamSource source = new StreamSource(new File(fileName));
cat.infoT(loc, "Streamsource: "+source);
appSubCtx.bind("ConfigData", source);
}
catch (NamingException ne2) {
cat.fatalT(loc, "Could not store XML file into Application Context: "+ne2.getMessage());
return null;

 

This gives the error:

 

Could not store XML file into Application Context: No schema definition found for com.sapportals.portal.prt.registry.content.StreamSource

 

 

We've done alot of testing and seen we get the same problem using any method, like this simple program:

 

public void doContent(IPortalComponentRequest request,
IPortalComponentResponse response)
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(Constants.REQUESTED_ASPECT,
IPcdAttribute.PERSISTENCY_ASPECT);
IPcdUtils pcdUtils = PcdAccess.getPcdUtils();
InitialContext   iCtx = null;
try {
iCtx = new InitialContext(env);
// Get the top-level context
IPcdContext myPcdContext = (IPcdContext)
iCtx.lookup("com.sap.portal.system/configuration/CustomParameterProvider/config");
String source = "test";
myPcdContext.bind("Test", source);
response.write("OK");
} catch (NamingException e) {
response.write(e.getMessage());
}

Which also gives the same error:

 

No schema definition found for java.lang.String


Anyone have any idea on why this works well in 7.0 but not 7.3? And have a suggestion for how to solve it?


Viewing all articles
Browse latest Browse all 2686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>