[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1640) Packaged rules use StringBuilder even when JavaDialectConfiguration languageLevel set to 1.4

Brad Koehn (JIRA) jira-events at lists.jboss.org
Thu Jun 19 16:08:37 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1640?page=all ]

Brad Koehn closed JBRULES-1640.
-------------------------------

    Resolution: Rejected

This is actually a bug in Janino, not Drools. See here: http://jira.codehaus.org/browse/JANINO-124

> Packaged rules use StringBuilder even when JavaDialectConfiguration languageLevel set to 1.4
> --------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1640
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1640
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Drl Parser/Builder
>    Affects Versions: 4.0.7
>         Environment: Java 5/6 for building packages, Java 2 (1.4) for reading them. 
>            Reporter: Brad Koehn
>         Assigned To: Mark Proctor
>
> When creating a package and serializing it under Java 5/6, and the languageLevel is set to "1.4", Drools will generate code that uses StringBuilder, a class that doesn't exist in Java 1.4. 
> Here's some code that is used to generate the package:
> 		PackageBuilderConfiguration packageBuilderConfiguration = new PackageBuilderConfiguration();
> 		JavaDialectConfiguration javaDialectConfiguration = (JavaDialectConfiguration) packageBuilderConfiguration
> 				.getDialectConfiguration("java");
> 		javaDialectConfiguration.setJavaLanguageLevel("1.4");
> 		javaDialectConfiguration.setCompiler(JavaDialectConfiguration.JANINO);
> 		packageBuilderConfiguration.setDialectConfiguration("java",
> 				javaDialectConfiguration);
> Drools (Janino, in this case) generates the correct major/minor version of the classes, so they load correctly under a 1.4 JVM, but I then get a NoClassDefFoundError: java.util.StringBuilder at rule execution time. 
> If I build the same package under a 1.4 JVM, Drools doesn't use StringBuilder and the rules execute correctly on a 1.4 JVM. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list