Did you import KundenEntscheidung into the spreadsheet?

Can you import and use the class in a simple handcoded DRL?

-W

On 20 October 2011 11:42, DerLonG <Longbow98@gmx.de> wrote:
Hi,

I have a problem when i compile a spreadsheet into a PKG. Hope you can
help me.
(Bevor this i used Guvnor to create a PKG from Spreadsheet, but i decide to
do this by my own)
The question is, how do I add this class to the package builder?

This is my Programm:

   public static void main(String[] args) {
       try {

           final SpreadsheetCompiler converter = new SpreadsheetCompiler();
           FileInputStream fis = new FileInputStream(new
File("E:\\temp\\myfirstDecTable.xls"));
           final String drl = converter.compile(fis, InputType.XLS);

           PackageBuilder builder = new PackageBuilder();

           builder.addPackageFromDrl(new StringReader(drl));
           Package pkg = builder.getPackage();

       } catch (Exception e) {
           System.out.println("Error: " + e);
       }
   }


The Exception:

java.lang.ClassNotFoundException: Unable to find class 'KundenEntscheidung'
       at
org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java:215)
       at
org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:1002)
       at org.drools.compiler.PackageBuilder.newPackage(PackageBuilder.java:971)
       at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:684)
       at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:336)
       at de.ceg.tools.drools.xlsCompiler.main(xlsCompiler.java:48)
java.lang.ClassNotFoundException: Unable to find class 'KundenEntscheidung'
       at
org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java:215)
       at
org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:1002)
       at org.drools.compiler.PackageBuilder.newPackage(PackageBuilder.java:971)
       at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:684)
       at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:336)
       at de.ceg.tools.drools.xlsCompiler.main(xlsCompiler.java:48)


Yours faithfully,
DerLonG

--
View this message in context: http://drools.46999.n3.nabble.com/Problem-in-adding-a-Class-to-PKG-tp3437199p3437199.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users