I think because the stream has reached the end once you load it the first time. Get a fresh reader from a fresh stream and it should work.
On 8/13/07, hypnosat7 <[EMAIL PROTECTED]> wrote: > > > 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 > ressource ? > And If I use two FileReader on the same dsl file it work's > > example : > > dslReader = new > InputStreamReader(getClass().getResourceAsStream(dslSource)); > ... > DSLMappingFile dslMappingFile = new DSLMappingFile(); > dslMappingFile.parseAndLoad(dslReader); > ... > builder.addPackageFromDrl(drlReader, dslReader); > > the package built is invalid because the mappings property in the expander > is empty > > Any explaination to this ? > thanks > > > > > hypnosat7 wrote: > > > > > > In fact I used the dsl Reader before to build a DefaultDslMapping. So > the > > problem is fixed > > > > > > hypnosat7 wrote: > >> > >> Hi, > >> I have an error when I try to buil a package using a dsl Reader : > >> [EMAIL PROTECTED],1]: unknown:16:1 Unexpected > >> token 'une' > >> > >> I try to debug it with eclipse and I find no mappings in the variable > >> "expander" > >> > >> final String expanded = expander.expand( source ); > >> > >> I'ts in the method DrlParser.parse(final String source, final Reader > dsl) > >> throws DroolsParserException > >> > >> So what can be the problem > >> > > > > > > -- > View this message in context: > http://www.nabble.com/expander-mappings-empty-%21-tf4260034.html#a12124221 > Sent from the drools - user mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
