[jboss-jira] [JBoss JIRA] Created: (JBRULES-1820) Exception: Input stream is not explicitly closed.

Kris Nuttycombe (JIRA) jira-events at lists.jboss.org
Thu Oct 23 12:20:21 EDT 2008


Exception: Input stream is not explicitly closed.
-------------------------------------------------

                 Key: JBRULES-1820
                 URL: https://jira.jboss.org/jira/browse/JBRULES-1820
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler
    Affects Versions: 4.0.7
         Environment: Java 6, Linux
            Reporter: Kris Nuttycombe
            Assignee: Mark Proctor


I am using the Drools PackageBuilder to create business rules from a file. While the rules appear to function correctly, when the JVM which runs the application shuts down, an exception is thrown due to the forced closing of an unclosed stream. It looks from the stack trace like the Drools code is opening a stream using ClassLoader.getResourceAsStream which is then left unclosed and is forced close at JVM shutdown.

On application server shutdown, I receive the following exception. This appears to be the result of an unclosed input stream for a system resource used by the Drools compiler.

[#|2008-10-23T09:55:09.527-0600|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=22;_ThreadName=RMI TCP Connection(1197)-10.97.100.58;_RequestID=341c51d9-08de-4e67-9da1-c57375cb5f35;|Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace
java.lang.Throwable
        at com.sun.enterprise.loader.EJBClassLoader$SentinelInputStream.<init>(EJBClassLoader.java:1169)
        at com.sun.enterprise.loader.EJBClassLoader$InternalJarURLConnection.getInputStream(EJBClassLoader.java:1262)
        at java.net.URL.openStream(URL.java:1009)
        at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1161)
        at com.sun.enterprise.loader.EJBClassLoader.getResourceAsStream(EJBClassLoader.java:799)
        at org.drools.rule.PackageCompilationData$PackageClassLoader.getResourceAsStream(PackageCompilationData.java:384)
        at org.drools.commons.jci.compilers.EclipseJavaCompiler$2.isPackage(EclipseJavaCompiler.java:280)
        at org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:222)
        at org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:204)
        at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:97)
        at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43)
        at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveUnresolvedType(BinaryTypeBinding.java:138)
        at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superclass(BinaryTypeBinding.java:936)
        at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod(BinaryTypeBinding.java:724)
        at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod(BinaryTypeBinding.java:727)
        at org.eclipse.jdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:761)
        at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2002)
        at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:384)
        at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:220)
        at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:432)
        at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:190)
        at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:403)
        at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1047)
        at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1094)
        at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:353)
        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:596)
        at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:411)
        at org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:351)
        at org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
        at org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:342)
        at org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:60)
        at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:308)
        at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)


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

        



More information about the jboss-jira mailing list