<div dir="ltr">Thanks Wolfgand Laun. Finally it worked. It was indeed a translation error as the VM was not able to find the DSL file. I changed the content as suggested, included an expander statement and it worked fine.<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 21, 2014 at 10:33 PM, laune [via Drools] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=4028925&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        The corrected version of dsl and dslr works fine.
<br>-----------
<br><div class="">[condition][]There is a Customer with first name {name}=
<br></div>                 $customer : Customer(firstName == {name})
<br><div class="">[consequence][]Greet Customer=
<br>                   System.out.println(&quot;Hello &quot; + $customer.getFirstName());
<br>-----------
<br></div>package dsltest;
<br><div class="">rule &quot;hello rule&quot;
<br>when
<br>    There is a Customer with first name &quot;David&quot;
<br>then
<br>    Greet Customer
<br>end
<br></div>------------
<br><br>You don&#39;t have to write the DSL all in one line. (I fixed that some time ago.)
<br><br>The error message suggests that translation fails.
<br>1) Make sure the DSLR is *exactly* as above. (The package could be
<br>different, and there is tolerance w.r.t. spacing between words.)
<br>2) ALWAYS print builder errors (see below).
<br>3) Make sure you pass resources correctly to the builder. This is how
<br>it is done for 5.x:
<br><br>        KnowledgeBaseConfiguration kBaseConfig =
<br>            KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
<br>        KnowledgeBuilderConfiguration kbConfig =
<br>            KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
<br>        KnowledgeBuilder kBuilder =
<br>            KnowledgeBuilderFactory.newKnowledgeBuilder( kbConfig );
<br><br>        Resource dsl  = ResourceFactory.newFileResource( dslPath );
<br>        Resource dslr = ResourceFactory.newFileResource( dslrPath );
<br>        long t0 = System.currentTimeMillis();
<br>        kBuilder.add( dsl,  ResourceType.DSL );
<br>        kBuilder.add( dslr, ResourceType.DSLR );
<br>        if( kBuilder.hasErrors() ){
<br>            System.err.println( &quot;&gt;&gt;&gt; compilation errors &gt;&gt;&gt;&quot; );
<br>            KnowledgeBuilderErrors errors = kBuilder.getErrors();
<br>            for( KnowledgeBuilderError err: errors ){
<br>                System.err.println( err.getMessage() );
<br>            }
<br>            System.err.println( &quot;&lt;&lt;&lt; compilation errors &lt;&lt;&lt;&quot; );
<br>            throw new IllegalStateException( &quot;compile errors&quot; );
<br>        }
<br>        kBase = KnowledgeBaseFactory.newKnowledgeBase( kBaseConfig );
<br>        kBase.addKnowledgePackages( kBuilder.getKnowledgePackages() );
<br>        kSession = kBase.newStatefulKnowledgeSession();
<br><br>-W
<br><div class=""><br><br><br></div></blockquote></div></div></div>


        
        
        <div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
                                -- Ankit
                        </div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://drools.46999.n3.nabble.com/Not-able-to-detect-how-to-correct-ERR-102-tp4028884p4028925.html">Re: [rules-users] Not able to detect how to correct ERR 102</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>