Exception when uploading JAR without POM in 6.0.0-Final
by SrjTx
If you try to upload a JAR without a pom.xml, it requests GAV info and then
throws the exception included at the bottom of the list.
I'm thinking that at line 141 in FileServlet.java, gav is not null and
therefore fileData is not converted to a BufferedInputStream at line 146,
which cause line 174 to throw the exception.
This is on CentOS 6.4
Work-around is to make sure you always have pom.xml in META-INF/maven
09:29:27,273 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/guvnor].[M2RepoFileServlet]]
(http-localhost/127.0.0.1:8080-4) JBWEB000236: Servlet.service() for servlet
M2RepoFileServlet threw exception:
org.guvnor.common.services.shared.exceptions.GenericPortableException:
mark/reset not supported
at
org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:24)
[guvnor-services-api-6.0.0.Final.jar:6.0.0.Final]
at
org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:180)
[guvnor-m2repo-editor-backend-6.0.0.Final.jar:6.0.0.Final]
at
org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84)
[guvnor-m2repo-editor-backend-6.0.0.Final.jar:6.0.0.Final]
at
org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70)
[guvnor-m2repo-editor-backend-6.0.0.Final.jar:6.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
[uberfire-security-server-0.3.0.Final.jar:0.3.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
[jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
[jbossweb-7.2.0.Final.jar:7.2.0.Final]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10]
--
View this message in context: http://drools.46999.n3.nabble.com/Exception-when-uploading-JAR-without-PO...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Drools 6 Unable to build index of kmodule.xml
by captainrhino
I have a non maven project which I think I have included all the relevant
dependencies manually into
I run the following code
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieBase kieBase = kContainer.getKieBase();
StatelessKieSession session = kContainer.newStatelessKieSession();
session.execute("test");
and get the following error message. Is there anything obvious anyone can
suggest? kmodule.xml is in a META_INF folder on the classpath.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
15-Nov-2013 16:12:41
org.drools.compiler.kie.builder.impl.ClasspathKieProject discoverKieModules
INFO: Found kmodule:
file:/C:/eclipse%20workspace/Sales/build/classes/META-INF/kmodule.xml
15-Nov-2013 16:12:41
org.drools.compiler.kie.builder.impl.ClasspathKieProject getPomProperties
WARNING: Unable to load pom.properties tried recursing down from/eclipse
workspace/Sales/build/classes
null
15-Nov-2013 16:12:41
org.drools.compiler.kie.builder.impl.ClasspathKieProject discoverKieModules
SEVERE: Unable to build index of kmodule.xml
url=file:/C:/eclipse%20workspace/Sales/build/classes/META-INF/kmodule.xml
null
Exception in thread "main" java.lang.RuntimeException: Cannot find a default
KieBase
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:160)
at com.axa.travel.drools.DroolsSalesTest.go(DroolsSalesTest.java:82)
at com.axa.travel.drools.DroolsSalesTest.main(DroolsSalesTest.java:26)l
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Unable-to-build-index-of-kmodu...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Drools Problems
by Kumarshorav
Hi All,
I have deployed the rest service in Tomcat 7. When I am hitting the resource through browser; resulting is coming. But when I am sending continuous hit for the resource through CTRL+F5 or through Apache J Meter; it is throwing Exception:
Some errors exists in packageBuilder
[DialectError message='Unable to wire compiled classes, probably related to compilation failures:null']
Or some times -
Some errors exists in packageBuilder
[DialectError message='Unable to wire compiled classes, probably related to compilation failures:JavaDialect ']
But when I added "core-3.4.2.v_883_R34x.jar" in the class path; first error message come up frequently.
I am using DroolsInitializer java class where different way of executing rules method is written. I am also using some of your method; where in both cases same exception is coming up.
Please look on this.
Love
Kumar Shorav
12 years, 3 months
SolutionInitializer for Nullable Planning Variable
by newbie
I created a custom solver which assign planning variables to planning
entities. I have a simple rule checking if there are no assign variable
that adds negative soft constraint. But when I assigned my planning variable
it increases the negative score instead of reducing it. I have for example
12 entities and my starting score was
0/-12.But when I initialized it with 4 variables it increases to 0/-16.
rule "null variable"
when
$myEntity : Entity( variable == null )
then
scoreHolder.addSoftConstraintMatch(kcontext, 0, -1);
end
--
View this message in context: http://drools.46999.n3.nabble.com/SolutionInitializer-for-Nullable-Planni...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Inquiring about Online Drools Training quality ...
by profversaggi
I'm curious about the experiences anyone has had investing in the online
training offerings for Drools. I've seen a lot of offerings coming from many
different directions, with equally disparate price tags, and originating
from different places on the globe. This immediately brings up a question of
quality.
I'm one who would rather forage my way through the 3 recommended books, and
the online docs, free tutorials, etc to get a solid foundation before
embarking on anything more, but I do appreciate opportunities to shorten up
the learning curve if it's good quality stuff.
I'm soliciting opinions please, your thoughts?
--
View this message in context: http://drools.46999.n3.nabble.com/Inquiring-about-Online-Drools-Training-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Compiling drools-examples
by baloodevil
Newbie question. I've imported drools-examples project into Eclipse (Kepler)
(which has GEF installed). I resolved build path errors by creating folders
src/test/java and src/test/resources. I resolved another issue by adding an
External JAR of org.eclipse.jdt.core_3.10.0.v20131029-1755.jar to the
project. (Those two changes allow me to create a new Drools Hello World
project and execute, however no such luck with complete examples) There are
hundreds of Drools Errors and hundreds of Java Problems, which I assume can
only be because of setup issues. The first Drools error is
"ArrayList is a raw type. References to generic type ArrayList<E> should be
parameterized AdventureFrame.java
/drools-examples/src/main/java/org/drools/games/adventures". That file
shows an import problem with
"import net.miginfocom.layout.ConstraintParser;" and "import
net.miginfocom.swing.MigLayout;". Those are referenced in the pom.xml file
in...
<dependency>
<groupId>com.miglayout</groupId>
<artifactId>miglayout</artifactId>
<version>3.7.4</version>
</dependency>
I don't know where to go next. Complete Drools newbie, and also fumbling
around with Eclipse.
--
View this message in context: http://drools.46999.n3.nabble.com/Compiling-drools-examples-tp4026895.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Optaplanner: Unexpected global [scoreHolder]
by jonathan.labin
I am using Optaplanner 6.0.0-Beta2 and I am in some cases receiving the
following error during initial solution construction:
Exception in thread "main" java.lang.RuntimeException: Unexpected global
[scoreHolder]
at
org.drools.core.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:515)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessionImpl.java:360)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.resetKieSession(DroolsScoreDirector.java:83)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.setWorkingSolution(DroolsScoreDirector.java:74)
at
org.optaplanner.core.impl.solver.scope.DefaultSolverScope.setWorkingSolutionFromBestSolution(DefaultSolverScope.java:176)
at
org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:176)
at
org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:154)
I noticed this error in gist:
https://gist.github.com/ge0ffrey/5236604
If this is the same error, what are the current constraints that I need
adhere to in order to avoid this error?
Jon
--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-Unexpected-global-scoreHold...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
using Drools in Tomcat 6.0 enviourment
by Erez Zarini
Hi,
I am new to Drools.
I have successfully created a project from the Examples provided at the site
using Java APP project.
but when trying to move it as a Dynamic Web Project in Eclipse I get the
following Exception:
(the files kmodule and pom.xml resides in all subfolders of the project)
21/11/2013 15:49:42 org.drools.compiler.kie.builder.impl.ClasspathKieProject
discoverKieModules
INFO: Found kmodule:
file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/DecisionTableGvia/WEB-INF/classes/META-INF/kmodule.xml
21/11/2013 15:49:43 org.drools.compiler.kie.builder.impl.ClasspathKieProject
getPomProperties
WARNING: Unable to load pom.properties tried recursing down
from/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/DecisionTableGvia/WEB-INF/classes
null
21/11/2013 15:49:43 org.drools.compiler.kie.builder.impl.ClasspathKieProject
discoverKieModules
SEVERE: Unable to build index of kmodule.xml
url=file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/DecisionTableGvia/WEB-INF/classes/META-INF/kmodule.xml
null
[]
21/11/2013 15:49:43 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet getDecisionGvia threw exception
java.lang.NullPointerException
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newStatelessKieSession(KieContainerImpl.java:360)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newStatelessKieSession(KieContainerImpl.java:351)
at
gvia.PricingRuleDTExample.executeExample(PricingRuleDTExample.java:39)
at gvia.PricingRuleDTExample.main(PricingRuleDTExample.java:32)
at gvia.getDecisionGvia.doGet(getDecisionGvia.java:33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
when running as a Java project (not Java EE) it seems to work find and
continues to find pom.xml instead of pom.properties.
any ideas?
--
View this message in context: http://drools.46999.n3.nabble.com/using-Drools-in-Tomcat-6-0-enviourment-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Optaplanner rules NullPointerException
by ns
Hi,
I am trying to accomplish the following, a part time employee (eg 50%) needs
to do only half the shifts a full time employee needs to do. I have created
a rule, that
1. count number of shifts of certain shiftType
2. count number of shifts of a certain shiftType per employee
3. count the total number of "arbeidsbreuken" per employee and within a
certain shiftType
4. do something with these numbers so that an part time employee only gets
half the shifts assigned that a full time employee gets
The complete rule is:
rule "arbeidsbreuk"
when
//System.out.println("arbeidsbreuk, Drools!");
ShiftAssignment($employee : employee, $shiftType : shiftType)
//count aantal shifts
$assignmentTotal : Number() from accumulate(
$assignment : ShiftAssignment(shiftType == $shiftType),
count($assignment)
)
//count aantal shifts per medewerker
$assignmentTotalEmployee : Number() from accumulate(
$assignmentEmployee : ShiftAssignment(employee == $employee,
shiftType == $shiftType),
count($assignmentEmployee)
)
//count arbeidsbreuken van alle medewerkers
$arbeidsbreukTotal : Number() from accumulate(
//Employee($breuk : arbeidsbreuk),
ShiftAssignment(employee == $employee, shiftType == $shiftType),
sum($employee.getArbeidsbreuk())
)
$assignmentTotalEmployee.intValue())
then
System.out.println("Arbeidsbreuk drools: " +
$employee.getArbeidsbreuk() + " - " + $assignmentTotal.intValue() + " - " +
$assignmentTotalEmployee.intValue() + " - " + $arbeidsbreukTotal);
scoreHolder.addSoftConstraintMatch(kcontext,
-(Math.abs(($employee.getArbeidsbreuk() * $assignmentTotal.intValue()) -
$assignmentTotalEmployee.intValue()) *
(Math.abs(($employee.getArbeidsbreuk() * $assignmentTotal.intValue()) -
$assignmentTotalEmployee.intValue()))) );
end
I get the following error:
Exception in thread "main" org.drools.core.RuntimeDroolsException:
java.lang.NullPointerException
at org.drools.core.rule.Accumulate.accumulate(Accumulate.java:182)
at
org.drools.core.phreak.PhreakAccumulateNode.addMatch(PhreakAccumulateNode.java:756)
at
org.drools.core.phreak.PhreakAccumulateNode.doLeftInserts(PhreakAccumulateNode.java:164)
at
org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:81)
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:524)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:494)
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:277)
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at
org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:205)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:65)
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:936)
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1183)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:935)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:909)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:233)
at
org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.calculateScore(DroolsScoreDirector.java:98)
at
org.optaplanner.core.impl.solver.scope.DefaultSolverScope.calculateScore(DefaultSolverScope.java:101)
at
org.optaplanner.core.impl.bestsolution.BestSolutionRecaller.solvingStarted(BestSolutionRecaller.java:58)
at
org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:177)
at
org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:154)
at be.ocmwturnhout.permanenties.Main.main(Main.java:495)
Caused by: java.lang.NullPointerException
at
be.ocmwturnhout.permanenties.solver.Rule_arbeidsbreuk654888368.accumulateExpression2(Rule_arbeidsbreuk654888368.java:23)
at
be.ocmwturnhout.permanenties.solver.Rule_arbeidsbreuk654888368AccumulateExpression2Invoker.evaluate(Rule_arbeidsbreuk654888368AccumulateExpression2Invoker.java:25)
at
org.drools.core.base.accumulators.JavaAccumulatorFunctionExecutor.accumulate(JavaAccumulatorFunctionExecutor.java:107)
at org.drools.core.rule.Accumulate.accumulate(Accumulate.java:173)
... 21 more
Any idea how I can solve this? Thanks.
Kind regards,
Nick
--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-rules-NullPointerException-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
How to deal with doubles in Optaplanner drools rules
by ns
Hi,
I am having trouble dealing with doubles in the Optaplanner drools rule drl
file. See error message below.
Exception in thread "main" java.lang.IllegalStateException: There are errors
in the scoreDrl's:
Error Messages:
Message [id=1, level=ERROR,
path=optaplanner-kie-namespace//be/ocmwturnhout/permanenties/solver/permanentiesScoreRules.drl,
line=96, column=0
text=Rule Compilation error The method
addSoftConstraintMatch(RuleContext, int) in the type HardSoftScoreHolder is
not applicable for the arguments (RuleContext, double)]
I have the following then rule part:
scoreHolder.addSoftConstraintMatch(kcontext, -(10 *
Math.abs(($employee.getArbeidsbreuk() * $assignmentTotal.intValue()) -
$assignmentTotalEmployee.intValue())) * (10 *
Math.abs(($employee.getArbeidsbreuk().intValue() *
$assignmentTotal.intValue()) - $assignmentTotalEmployee.intValue())) );
$employee.getArbeidsbreuk() is a double.
Aren't doubles allowed or can I convert it? Thanks.
Kind regards,
Ncik
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-deal-with-doubles-in-Optaplanner...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months