[JBoss JIRA] Created: (EJBTHREE-1754) Fix the "factory" tests in testsuite
by jaikiran pai (JIRA)
Fix the "factory" tests in testsuite
------------------------------------
Key: EJBTHREE-1754
URL: https://jira.jboss.org/jira/browse/EJBTHREE-1754
Project: EJB 3.0
Issue Type: Task
Components: testsuite
Affects Versions: 1.1.1
Environment: AS Branch_5_x
Reporter: jaikiran pai
Assignee: jaikiran pai
During the testing of new release for EJB3, it was observed that the "factory" tests failing against the Branch_5_x of AS. The failures were because of the deployment ERRORs of the ears used for these tests:
Caused by: java.io.IOException: Using reverse path on top file handler: ZipEntryHandler@425886940[path= context=file:/home/alrubinger/business/jboss/wc/jbossas/projects/ejb3/trunk/testsuite/target/test-lib/factory-test.ear real=vfszip:/home/alrubinger/business/jboss/wc/jbossas/projects/ejb3/trunk/testsuite/target/test-lib/factory-test.ear], ../util.jar
at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:667)
at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:165)
at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:481)
at org.jboss.jpa.deployment.PersistenceUnitDeployment.getRelativeURL(PersistenceUnitDeployment.java:201)
... 96 more
--
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
17 years, 4 months
[JBoss JIRA] Created: (JBRULES-1591) Newline in eval expression causes NullPointerException
by Brian Stiles (JIRA)
Newline in eval expression causes NullPointerException
------------------------------------------------------
Key: JBRULES-1591
URL: http://jira.jboss.com/jira/browse/JBRULES-1591
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.7
Reporter: Brian Stiles
Assigned To: Mark Proctor
If a newline splits an eval expression, an NPE is thrown at org.drools.rule.PredicateConstraint.createContextEntry(PredicateConstraint.java:201).
The following code demonstrates the problem. Removing the newline from the eval expression solves the problem.
--
package sample;
import java.io.StringReader;
import org.drools.RuleBase;
import org.drools.RuleBaseConfiguration;
import org.drools.RuleBaseFactory;
import org.drools.StatefulSession;
import org.drools.compiler.PackageBuilder;
import org.drools.compiler.PackageBuilderConfiguration;
public class ExpressionProblem {
public static class Tester {
public boolean test(Object o1, Object o2) {
return o1.equals(o2);
}
}
public static void main(String[] args) throws Exception {
final PackageBuilderConfiguration packageBuilderConfiguration =
new PackageBuilderConfiguration();
final PackageBuilder packageBuilder = new PackageBuilder(packageBuilderConfiguration);
packageBuilder.addPackageFromDrl(new StringReader("\n"
+ "package sample\n"
+ "\n"
+ "import sample.ExpressionProblem.Tester;\n"
+ "global sample.ExpressionProblem.Tester tester;\n"
+ "\n"
+ "rule MyRule\n"
+ "\n"
+ " when\n"
+ " Integer($f : this, eval(tester.test($f,\n" // OFFENDING NEWLINE
+ " $f)))\n"
+ " then \n"
+ " System.out.println($f);\n"
+ "end \n"
+ ""));
final RuleBaseConfiguration ruleBaseConfiguration = new RuleBaseConfiguration();
final RuleBase ruleBase = RuleBaseFactory.newRuleBase(ruleBaseConfiguration);
ruleBase.addPackage(packageBuilder.getPackage());
final StatefulSession session = ruleBase.newStatefulSession(false);
session.setGlobal("tester", new Tester());
session.insert(1);
session.fireAllRules();
}
}
--
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
17 years, 4 months
[JBoss JIRA] Created: (JBRULES-1747) Null pointer exception from AbstractRuleBase.addPackage when loading rules scoped with parens
by Joe Re (JIRA)
Null pointer exception from AbstractRuleBase.addPackage when loading rules scoped with parens
---------------------------------------------------------------------------------------------
Key: JBRULES-1747
URL: https://jira.jboss.org/jira/browse/JBRULES-1747
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder, Reteoo
Affects Versions: 5.0.0.M2, FUTURE
Environment: Windows XP, 1.5.0_12, drools trunk rev 21627
Reporter: Joe Re
Assignee: Mark Proctor
The drl below produces a null pointer exception when calling ruleBase.addPackage(Drl). If the extra parens after the "||" are removed the exception doesn't occur. The rule compiles and runs successfully in 5.0M1.
/***********EXCEPTION****************************/
java.lang.NullPointerException
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:418)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:380)
at com.sample.DroolsTest.readRule(DroolsTest.java:75)
at com.sample.DroolsTest.main(DroolsTest.java:26)
/*************************************************/
/*********TEST DRL****************************/
package test;
import com.sample.TestInput;
rule "TestRule"
when
TestInput( valOne ==true ||(valOne==false && doubVal ==0) )
then
end
/*************************************************/
/***********************TEST INPUT JAVA***********************/
package com.sample;
public class TestInput {
public boolean valOne;
public boolean valTwo;
public double doubVal;
public boolean getValOne() {
return valOne;
}
public void setValOne(boolean valOne) {
this.valOne = valOne;
}
public boolean getValTwo() {
return valTwo;
}
public void setValTwo(boolean valTwo) {
this.valTwo = valTwo;
}
public double getDoubVal() {
return doubVal;
}
public void setDoubVal(double doubVal) {
this.doubVal = doubVal;
}
}
--
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
17 years, 4 months