This is not Drools-related but rather a generic Java problem.
You should read the Java API of the Reader class.
A reader remembers the last position it used to read out data.
So if you try to use the same reader twice, the second time it will be
as it will already be at the end of the file.
You could try to reset the reader to the start of the file, however,
this method is not supported by all implementations of Reader.
It is unclear why you are building your own dslMappingFile however.
The builder will do all that for you if you just use
----- Original Message -----
From: "hypnosat7" <ablarbi(a)yahoo.fr>
Sent: Monday, August 13, 2007 12:53 PM
Subject: Re: [rules-users] expander mappings empty !
But why the expand methode in DrlParser.parse(final String source, final
Reader dsl) can't build the expander with an inputStreamReader on a used
And If I use two FileReader on the same dsl file it work's
dslReader = new
DSLMappingFile dslMappingFile = new DSLMappingFile();
the package built is invalid because the mappings property in the expander
Any explaination to this ?
> In fact I used the dsl Reader before to build a DefaultDslMapping. So the
> problem is fixed
> hypnosat7 wrote:
>> I have an error when I try to buil a package using a dsl Reader :
>> org.drools.lang.ExpanderException@983d95[16,1]: unknown:16:1 Unexpected
>> token 'une'
>> I try to debug it with eclipse and I find no mappings in the variable
>> final String expanded = expander.expand( source );
>> I'ts in the method DrlParser.parse(final String source, final Reader
>> throws DroolsParserException
>> So what can be the problem
View this message in context:
Sent from the drools - user mailing list archive at Nabble.com
rules-users mailing list