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. <br><br><div><span class="gmail_quote">On 8/13/07, <b class="gmail_sendername">hypnosat7
</b> &lt;<a href="mailto:ablarbi@yahoo.fr">ablarbi@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>But why the expand methode in 
DrlParser.parse(final String source, final<br>Reader dsl)&nbsp;&nbsp;can&#39;t build the expander with an inputStreamReader on a used<br>ressource ?<br>And If I use two FileReader on the same dsl file it work&#39;s<br><br>example :
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;dslReader = new<br>InputStreamReader(getClass().getResourceAsStream(dslSource));<br>&nbsp;&nbsp;&nbsp;&nbsp;...<br>&nbsp;&nbsp; DSLMappingFile dslMappingFile = new DSLMappingFile();<br>&nbsp;&nbsp; dslMappingFile.parseAndLoad(dslReader);<br>&nbsp;&nbsp; ...<br>
&nbsp;&nbsp; builder.addPackageFromDrl(drlReader, dslReader);<br><br>the package built is invalid because the mappings property in the expander<br>is empty<br><br>Any explaination to this ?<br>thanks<br><br><br><br><br>hypnosat7 wrote:
<br>&gt;<br>&gt;<br>&gt; In fact I used the dsl Reader before to build a DefaultDslMapping. So the<br>&gt; problem is fixed<br>&gt;<br>&gt;<br>&gt; hypnosat7 wrote:<br>&gt;&gt;<br>&gt;&gt; Hi,<br>&gt;&gt;&nbsp;&nbsp;I have an error when I try to buil a package using a dsl Reader :
<br>&gt;&gt; org.drools.lang.ExpanderException@983d95[16,1]: unknown:16:1 Unexpected<br>&gt;&gt; token &#39;une&#39;<br>&gt;&gt;<br>&gt;&gt; I try to debug it with eclipse and I find no mappings in the variable<br>&gt;&gt; &quot;expander&quot;
<br>&gt;&gt;<br>&gt;&gt; final String expanded = expander.expand( source );<br>&gt;&gt;<br>&gt;&gt; I&#39;ts in the method DrlParser.parse(final String source, final Reader dsl)<br>&gt;&gt; throws DroolsParserException<br>
&gt;&gt;<br>&gt;&gt; So what can be the problem<br>&gt;&gt;<br>&gt;<br>&gt;<br><br>--<br>View this message in context: <a href="http://www.nabble.com/expander-mappings-empty-%21-tf4260034.html#a12124221">http://www.nabble.com/expander-mappings-empty-%21-tf4260034.html#a12124221
</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>