Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

KM Task Sheduker : create a Class


I try to read a xml file in a specific KM Task scheduler :

1) XML file is on dist/PORTAL-INF/users.xml

2) By run() method, i would like to try to read this file but it doesn't work, what

can be the problem ?

public void run( String id, Properties properties ) {

URL myurl = getClass().getClassLoader().getResource("users.xml");

try {

DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();

DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();

Document doc = docBuilder.parse (new File(myurl.getFile()));

doc.getDocumentElement ().normalize ();




What can be the problem ?

Thanks a lot and Best regards

Not what you were looking for? View more on this topic or Ask a question