[rules-users] Error running DroolsCompilerAntTask in CR1

Jeff Davis jdavis at idalica.com
Fri Mar 20 10:29:22 EDT 2009


Hi,
I upgraded everything from M5 to CR1 last night, but noticed that my ant
task no longer worked and was returning an error (it had worked previously
under M5, and I confirmed by switching everything back to test). The error I
now receive is:

[compiler] java.util.zip.ZipException: error in opening zip file
[compiler]     at java.util.zip.ZipFile.open(Native Method)
[compiler]     at java.util.zip.ZipFile.<init>(ZipFile.java:203)
[compiler]     at java.util.zip.ZipFile.<init>(ZipFile.java:234)
[compiler]     at
org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[compiler]     at
org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
[compiler]     at
org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:130)
[compiler]     at
org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
[compiler]     at
sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
[compiler]     at
org.drools.util.ChainedProperties.loadProperties(ChainedProperties.java:233)
[compiler]     at
org.drools.util.ChainedProperties.<init>(ChainedProperties.java:119)
[compiler]     at
org.drools.util.ChainedProperties.<init>(ChainedProperties.java:41)
[compiler]     at
org.drools.util.ChainedProperties.<init>(ChainedProperties.java:35)
[compiler]     at
org.drools.RuleBaseConfiguration.init(RuleBaseConfiguration.java:376)
[compiler]     at
org.drools.RuleBaseConfiguration.<init>(RuleBaseConfiguration.java:234)
[compiler]     at
org.drools.common.AbstractRuleBase.<init>(AbstractRuleBase.java:149)
[compiler]     at
org.drools.reteoo.ReteooRuleBase.<init>(ReteooRuleBase.java:144)
[compiler]     at
org.drools.reteoo.ReteooRuleBase.<init>(ReteooRuleBase.java:121)
[compiler]     at
org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:58)
[compiler]     at
org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:38)
[compiler]     at
org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:241)
[compiler]     at
org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:170)
[compiler]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[compiler]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[compiler]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[compiler]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[compiler]     at java.lang.reflect.Method.invoke(Method.java:585)
[compiler]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[compiler]     at org.apache.tools.ant.Task.perform(Task.java:348)
[compiler]     at org.apache.tools.ant.Target.execute(Target.java:357)
[compiler]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
[compiler]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[compiler]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[compiler]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[compiler]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[compiler]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
[compiler]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
[compiler]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[compiler]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

My build.xml is:

<project name="test" default="compile">

<path id="drools.path.task">
<fileset dir="C:\Apps\drools-5.0.0.CR1-bin">
<include name="drools-compiler-5.0.0.CR1.jar"/>
<include name="drools-ant-5.0.0.CR1.jar"/>
<include name="drools-core-5.0.0.CR1.jar"/>
<include name="drools-decisiontables-5.0.0.CR1.jar"/>
<include name="drools-api-5.0.0.CR1.jar"/>
</fileset>
<fileset dir="C:\Apps\drools-5.0.0.CR1-bin\lib">
<include name="*.jar"/>
</fileset>
</path>
 <path id="drools.path">
<pathelement path="target\classes"/>
<fileset dir="C:\Apps\drools-5.0.0.CR1-bin">
<include name="drools-ant-5.0.0.CR1.jar"/>
<include name="drools-decisiontables-5.0.0.CR1.jar"/>
<include name="drools-api-5.0.0.CR1.jar"/>
</fileset>
</path>

<taskdef name="compiler"
classname="org.drools.contrib.DroolsCompilerAntTask"
classpathref="drools.path.task" />

    <target name="create.rules.package" >
        <compiler
            srcdir="src\main\rules"
            tofile="target\package\packge.pkg"
            classpathref="drools.path">
            <include name="Sample.drl" />
        </compiler>
    </target>

    <target name="clean">
<delete includeemptydirs="true">
<fileset dir="target"/>
</delete>
</target>
 <target name="compile" depends="clean">
<mkdir dir="target/classes"/>
<mkdir dir="logs"/>
<javac destdir="target/classes" debug="on" source="1.5" target="1.5">
<src path="src\main\java"/>
<classpath refid="drools.path.task"/>
</javac>
</target>

<target name="init">
<mkdir dir="target/classes"/>
<mkdir dir="target"/>
<mkdir dir="target/wsdl2javasource"/>
</target>
</project>

If anyone has any ideas, they would be much appreciated!

Thanks!

jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090320/07843d5d/attachment.html 


More information about the rules-users mailing list