Fortunately it appeared to be a local issue, now resolved :)
On 28 April 2011 14:15, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
Neither can I, in sync with master from the blessed one.
-W
On 28 April 2011 15:11, Michael Anstis <michael.anstis(a)gmail.com> wrote:
> Hmmm.... Rikkola can't replicate so something is broken here.... :(
>
> On 28 April 2011 13:42, Michael Anstis <michael.anstis(a)gmail.com> wrote:
>>
>> Hi,
>>
>> This boiler plate code demonstrates a rather, I suspect large, problem:-
>>
>> @Test
>> public void testPackageAttributesFromDRL() {
>>
>> KnowledgeBuilder kbuilder =
>> KnowledgeBuilderFactory.newKnowledgeBuilder();
>> kbuilder.add( new ClassPathResource( "org/drools/example.drl"
),
>> ResourceType.DRL ); //<--- Error
>>
>> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
>> kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
>>
>> }
>>
>> throws:-
>>
>> java.lang.NullPointerException
>> at
>>
org.drools.compiler.PackageBuilder.generateDeclaredBean(PackageBuilder.java:1433)
>> at
>>
org.drools.compiler.PackageBuilder.processTypeDeclarations(PackageBuilder.java:1272)
>> at
>> org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:895)
>> at
>> org.drools.compiler.PackageBuilder.newPackage(PackageBuilder.java:883)
>> at
>> org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:601)
>> at
>>
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:297)
>> at
>>
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:473)
>> at
>>
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
>> at
>>
org.drools.BinaryPackage.testPackageAttributesFromDRL(BinaryPackage.java:35)
>>
>> In org.drools.compiler.PackageBuilder.generateDeclaredBean the call to
the
>> following returns null.
>>
>> JavaDialectRuntimeData dialect = (JavaDialectRuntimeData)
>> pkgRegistry.getDialectRuntimeRegistry().getDialectData( "java" );
>>
>> DRL is:-
>>
>> package example
>>
>> declare Person
>> age: Integer
>> name: String
>> end
>>
>> rule "Row 1 dtable"
>> salience 1
>> dialect "mvel"
>> when
>> $p : Person( name == "Bill" , age != "30" )
>> then
>> $p.setAge( 12345 );
>> end
>>
>> It worked OK yesterday.
>>
>> Any takers?
>>
>> With kind regards,
>>
>> Mike
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev