Error using Java

i am trying to use the code example given on page 35 of CloverETL overview part I but i keep getting an error when i try to get the metadata from a file. the file contains the following:

<?xml version="1.0" encoding="UTF-8"?>

i get the following error:

Exception in thread “main” java.lang.NullPointerException
at java.util.regex.Pattern.(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at org.jetel.util.PropertyRefResolver.(PropertyRefResolver.java:81)
at org.jetel.metadata.DataRecordMetadataXMLReaderWriter.(DataRecordMetadataXMLReaderWriter.java:186)
at org.jetel.metadata.DataRecordMetadataXMLReaderWriter.(DataRecordMetadataXMLReaderWriter.java:178)
at org.jetel.metadata.MetadataFactory.fromFile(MetadataFactory.java:64)
at domain.Sample.createGraph(Sample.java:49)
at domain.Sample.main(Sample.java:80)

also most of the documentation is focus around using the graphs in xml, could someone provide a basic example using just java.

Thanks

Hello !
It seems that the “overview” document is a bit obsolete.
I assume you have put together a piece of Java and tried to load metadata from file.

Starting with clover version 1.7 you must first call

Defaults.init(); to initialize default options

With clover 2.0 you have to also call:

Plugins.init(pluginsRootDirectory);

See org.jetel.main.runGraph() method. Also, Examples package should contain subdirectory “javaExamples” where you can look at “testGraphSort.java” which shows how to assemble graph purely in Java.

David.