[JBoss JIRA] (WFLY-2422) Simplify the remote-outbound connections
by Cheng Fang (JIRA)
[ https://issues.jboss.org/browse/WFLY-2422?page=com.atlassian.jira.plugin.... ]
Cheng Fang reassigned WFLY-2422:
--------------------------------
Assignee: Tomek Adamski (was: Cheng Fang)
Tomek, can you take it over? Looks like I won't be able to get to it any time soon.
> Simplify the remote-outbound connections
> ----------------------------------------
>
> Key: WFLY-2422
> URL: https://issues.jboss.org/browse/WFLY-2422
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: EJB, Remoting
> Affects Versions: 8.0.0.Beta1
> Reporter: Wolf-Dieter Fink
> Assignee: Tomek Adamski
>
> At the moment the application need to reference each outbound connection with a remote-ejb-receiver element in the jboss-ejb-client.xml.
> But from an application perspective it is not relevant whether the server environment provide one or many receivers or whether the ejb-receiver is a cluster.
> It should be possible to add many outbound-socket-binding-ref elements and related properties to the remote-outbound-connection element of the server configuration.
> In this case it is possible to keep the application deployment independent from the server environment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-972) EJB calendar timer Sunday calculation problem in certain locales
by Cheng Fang (JIRA)
[ https://issues.jboss.org/browse/WFLY-972?page=com.atlassian.jira.plugin.s... ]
Cheng Fang reassigned WFLY-972:
-------------------------------
Assignee: Tomek Adamski (was: Cheng Fang)
Tomek, can you look into this issue?
> EJB calendar timer Sunday calculation problem in certain locales
> ----------------------------------------------------------------
>
> Key: WFLY-972
> URL: https://issues.jboss.org/browse/WFLY-972
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EJB
> Environment: JDK 6 & 7
> Reporter: Cheng Fang
> Assignee: Tomek Adamski
>
> My ejb class contains this timeout method:
> {code:java}
> @Schedule(dayOfWeek="Sun", persistent=false)
> private void sunday(Timer t) {
> }
> {code}
> When calling this timer.getNextTimeout(), it returned the Sunday after next Sunday (expecting next Sunday) when running on certain locales (it_IT, es_PE, etc). It works as expected on other locales like en_US.
> I added -Duser.language=it -Duser.country=IT to JAVA_OPTS when starting standalone server to use that locale.
> Seems to be a JDK bug. There could be some differences how dates are calculated in different locales, but shouldn't be that big like skip one Sunday. Today is Wed.
> One workaround is "to use locale.English when instantiating GregorianCalendar in the following classes." I tried it on 7.2 with it_IT, and got the expected Sunday.
> {noformat}
> ejb3/src/main/java/org/jboss/as/ejb3/timerservice/schedule/CalendarBasedTimeout.java
> ejb3/src/main/java/org/jboss/as/ejb3/timerservice/schedule/util/CalendarUtil.java
> ejb3/src/main/java/org/jboss/as/ejb3/timerservice/task/CalendarTimerTask.java
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (DROOLS-349) Accumulate.accumulate(Accumulate.java:182) NullPointerException
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-349?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-349.
--------------------------------
Resolution: Rejected
The NPE is not a drools bug, but caused by the fact that the employee inside the ShiftAssignment is null. Changing the first pattern in that rule with the following one fixes the problem.
ShiftAssignment($employee : employee != null, $shiftType : shiftType)
> Accumulate.accumulate(Accumulate.java:182) NullPointerException
> ---------------------------------------------------------------
>
> Key: DROOLS-349
> URL: https://issues.jboss.org/browse/DROOLS-349
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.CR1
> Environment: Windows 7 64 bit, Optaplanner 6.0.0.CR1, Java 1.7.0_17-b02
> Reporter: Nick Snels
> Assignee: Mario Fusco
>
> I reported my issue with a Drools rule in Optaplanner on the Drools user forum (http://drools.46999.n3.nabble.com/Optaplanner-rules-NullPointerException-...). I was adviced to create a JIRA ticket.
> =============
> 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:
> {code}
> 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
> {code}
> I get the following error:
> {code}
> 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
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-3156) Upgrade RestEasy to 3.0.7
by Tomaz Cerar (JIRA)
Tomaz Cerar created WFLY-3156:
---------------------------------
Summary: Upgrade RestEasy to 3.0.7
Key: WFLY-3156
URL: https://issues.jboss.org/browse/WFLY-3156
Project: WildFly
Issue Type: Component Upgrade
Security Level: Public (Everyone can see)
Components: REST
Affects Versions: 8.0.0.Final
Reporter: Tomaz Cerar
Assignee: Bill Burke
Priority: Blocker
Fix For: 8.0.1.Final
We need new release of RestEasy as it includes few fixes community wants.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-3155) Upgrade MSC to 1.2.2.Final
by David Lloyd (JIRA)
David Lloyd created WFLY-3155:
---------------------------------
Summary: Upgrade MSC to 1.2.2.Final
Key: WFLY-3155
URL: https://issues.jboss.org/browse/WFLY-3155
Project: WildFly
Issue Type: Component Upgrade
Security Level: Public (Everyone can see)
Reporter: David Lloyd
Assignee: David Lloyd
Priority: Blocker
Fix For: 8.0.1.Final
This upgrade should be done before release.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-3154) Operation which require server reload should check if something was changed
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-3154?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated WFLY-3154:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=976228
> Operation which require server reload should check if something was changed
> ----------------------------------------------------------------------------
>
> Key: WFLY-3154
> URL: https://issues.jboss.org/browse/WFLY-3154
> Project: WildFly
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Domain Management
> Affects Versions: 8.0.0.Final
> Reporter: Emmanuel Hugonnet
> Assignee: Emmanuel Hugonnet
>
> Description of problem:
> Server reload is required even if nothing was actually changed. This could have negative impact on usability of WildFly.
> Steps to Reproduce:
> - start standalone
> - connect to cli
> - run: /subsystem=jpa:write-attribute(name=default-extended-persistence-inheritance, value=SHALLOW)
> - reload server
> - run: /subsystem=jpa:write-attribute(name=default-extended-persistence-inheritance, value=SHALLOW)
> Actual results:
> {
> "outcome" => "success",
> "response-headers" => {
> "operation-requires-reload" => true,
> "process-state" => "reload-required"
> }
> }
> Expected results:
> - reload is not required
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-3154) Operation which require server reload should check if something was changed
by Emmanuel Hugonnet (JIRA)
Emmanuel Hugonnet created WFLY-3154:
---------------------------------------
Summary: Operation which require server reload should check if something was changed
Key: WFLY-3154
URL: https://issues.jboss.org/browse/WFLY-3154
Project: WildFly
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Domain Management
Affects Versions: 8.0.0.Final
Reporter: Emmanuel Hugonnet
Assignee: Emmanuel Hugonnet
Description of problem:
Server reload is required even if nothing was actually changed. This could have negative impact on usability of WildFly.
Steps to Reproduce:
- start standalone
- connect to cli
- run: /subsystem=jpa:write-attribute(name=default-extended-persistence-inheritance, value=SHALLOW)
- reload server
- run: /subsystem=jpa:write-attribute(name=default-extended-persistence-inheritance, value=SHALLOW)
Actual results:
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
Expected results:
- reload is not required
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-3147) spec-descriptor-property-replacement causes NPE while parsing exclude element in beans.xml
by Maxim Frolov (JIRA)
[ https://issues.jboss.org/browse/WFLY-3147?page=com.atlassian.jira.plugin.... ]
Maxim Frolov commented on WFLY-3147:
------------------------------------
Bug in Weld. See this thread: http://lists.jboss.org/pipermail/weld-dev/2014-March/003224.html
> spec-descriptor-property-replacement causes NPE while parsing exclude element in beans.xml
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-3147
> URL: https://issues.jboss.org/browse/WFLY-3147
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: CDI / Weld, EE
> Affects Versions: 8.0.0.Final
> Reporter: Maxim Frolov
> Assignee: Stuart Douglas
>
> A CDI Bean Archive with a _beans.xml_ which contains {{beans/scan/*exclude*}} XML element causes {{NullPointerExcpetion}} during deployment on server with enabled {{<spec-descriptor-property-replacement>}} parameter in server's _standalone.xml_.
> The error stack trace is:
> {noformat}
> 2014-03-21 11:22:52,455 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.deployment.subunit."example.ear"."example-ejb.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."example.ear"."example-ejb.jar".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "example-ejb.jar" of deployment "example.ear"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
> at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.parseBeansXml(BeansXmlProcessor.java:140)
> at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.deploy(BeansXmlProcessor.java:117)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
> ... 5 more
> Caused by: java.lang.NullPointerException
> at org.jboss.metadata.property.DefaultPropertyReplacer.replaceProperties(DefaultPropertyReplacer.java:52)
> at org.jboss.as.weld.deployment.PropertyReplacingBeansXmlHandler.interpolate(PropertyReplacingBeansXmlHandler.java:64)
> at org.jboss.weld.xml.BeansXmlHandler$4.processStartChildElement(BeansXmlHandler.java:229)
> at org.jboss.weld.xml.BeansXmlHandler.startElement(BeansXmlHandler.java:297)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
> at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:93)
> at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.parseBeansXml(BeansXmlProcessor.java:136)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (WFLY-1547) deploy directories not cleaned up
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-1547?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-1547:
-----------------------------------------------
Petr Kremensky <pkremens(a)redhat.com> changed the Status of [bug 901210|https://bugzilla.redhat.com/show_bug.cgi?id=901210] from ON_QA to VERIFIED
> deploy directories not cleaned up
> ---------------------------------
>
> Key: WFLY-1547
> URL: https://issues.jboss.org/browse/WFLY-1547
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 8.0.0.Alpha1
> Reporter: Shaun Appleton
> Assignee: jaikiran pai
> Fix For: 8.0.0.Beta1
>
> Attachments: deployment_with_hack_no_hook.txt
>
>
> JBoss EAP 6.0.0 (and 6.0.1.ER3) doesn't clean up it's tmp/vfs directories.
> The following reproduces this -
> i) ensure run.conf has the -Xrs set
> ii) ensure deployments has a deployable .ear in it
> iii) ./run standalone.sh and allow the deployments to deploy
> iv) stop the EAP process ie kill <process_id>
> v) observe content tmp/vfs
> (The -Xrs parameter is used to "-Xrs" to prevent possible interference when JVM is running as a service and receives CTRL_LOGOFF_EVENT or SIGHUP)
> This will eventually cause problems with lack of disk space.
> Note if the -Xrs parameter content is removed but the tmp/vfs dirs stills exist. This could potentially cause inode problems.
> It would be better if there were any additional code so the temp dirs are cleaned up on start up. That would resolve both the -Xrs problem and the excessive dir creation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (DROOLS-419) "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository.
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-419?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-419.
--------------------------------
Resolution: Done
> "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-419
> URL: https://issues.jboss.org/browse/DROOLS-419
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.1.Final
> Environment: Right hand side of diagram at http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/...
> Reporter: Matteo Mortari
> Assignee: Mario Fusco
> Priority: Minor
> Attachments: 20140130.drools6testmvnlatest.zip
>
>
> Hello, this is to report (potentially) a bug about "Cannot find KieModule: com.acme:X:RELEASE" or "Cannot find KieModule: com.acme:X:LATEST" when invoking {{kieServices.newKieContainer( releaseId )}} with LATEST or RELEASE instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository.
> More precisely, with reference to http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/... , I mean that before launching Application, I performed
> {code}
> mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:drools6testmvnlatest.therules:LATEST -DrepoUrl=http://nexus-hostname/nexus/content/repositories/releases/
> {code}
> h5. Disclaimer
> I'm not 100% sure whether this is bug of maven process, maven libraries, or Drools library; I prefer to report it anyway because likely could impact other users if installing via the maven-dependency-plugin:get goal, especially in distributed or JavaEE deployments? Sorry if actually not Drools library bug, I report all details below, *including current workaround* I have found to avoid this issue.
> h5. DETAILS
> Suppose there is a kjar artifact KIE module, {{'drools6testmvnlatest.therules'}}, as per attached project zip file. And this artifact is installed in local nexus repository at http://nexus-hostname/nexus/content/repositories/releases/ .
> Now ,suppose with reference to http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/... , _Application_ is jar {{'drools6testmvnlatest.thestandaloneengine'}} as per attached project zip file, and is being executed on a dedicate machine, not the development computers.
> {code:title=App.java}
> public static void main( String[] args ) {
> KieServices kieServices = KieServices.Factory.get();
> ReleaseId releaseId = kieServices.newReleaseId( "com.acme", "drools6testmvnlatest.therules", args[0] );
> KieContainer kContainer = kieServices.newKieContainer( releaseId );
> KieBaseConfiguration kieBaseConf = kieServices.newKieBaseConfiguration();
> kieBaseConf.setOption( EventProcessingOption.STREAM );
> KieBase kBase = kContainer.newKieBase(kieBaseConf);
> for ( KiePackage a : kBase.getKiePackages()) {
> for (Rule r : a.getRules()) {
> logger.info("KiePackage {} Rule {}", new Object[]{a.getName(), r.getName()});
> }
> }
> }
> {code}
> The first thing to do before executing it, would be to fetch and install into local .m2 repository the required KIE module Rule artifact project kjar {{'drools6testmvnlatest.therules'}}. To do so, the following command is executed:
> {code}
> mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:drools6testmvnlatest.therules:LATEST -DrepoUrl=http://nexus-hostname/nexus/content/repositories/releases/
> {code}
> Execution of
> {code}
> java -jar drools6testmvnlatest.thestandaloneengine-jar-with-dependencies.jar RELEASE
> {code}
> Would generate the following stack trace
> {code}
> Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: com.acme:drools6testmvnlatest.therules:RELEASE
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
> at com.acme.drools6testmvnlatest.thestandaloneengine.App.main(App.java:24)
> {code}
> Same for LATEST as launch parameter.
> But fixed version, eg: 0.0.2 as launch parameter, will work.
> {code}
> D:\inbox>java -jar drools6testmvnlatest.thestandaloneengine-jar-with-dependencies.jar 0.0.2
> 2014-01-30 19:24:12,128 [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added:ZipKieModule[ ReleaseId=com.acme:drools6testmvnlatest.therules:0.0.2file=D:\Documents and Settings\mmortari\.m2\repository\com\acme\drools6testmvnlatest.therules\0.0.2\drools6testmvnlatest.therules-0.0.2.jar]
> 2014-01-30 19:24:12,440 [main] INFO com.acme.drools6testmvnlatest.thestandaloneengine.App - KiePackage com.acme.drools6testmvnlatest.therules Rule Dummy rule on String
> {code}
> Please notice at this point this is the content of the .m2 local repository (this led me to discover the workaround)
> {code}
> D:\DOCUMENTS AND SETTINGS\MMORTARI\.M2\REPOSITORY\COM\ACME
> └───drools6testmvnlatest.therules
> │ maven-metadata-nexus-hostname-nexus.xml
> │ maven-metadata-nexus-hostname-nexus.xml.sha1
> │ maven-metadata-temp.xml
> │ maven-metadata-temp.xml.sha1
> │ resolver-status.properties
> │
> └───0.0.2
> drools6testmvnlatest.therules-0.0.2.jar
> drools6testmvnlatest.therules-0.0.2.jar.sha1
> drools6testmvnlatest.therules-0.0.2.pom
> drools6testmvnlatest.therules-0.0.2.pom.sha1
> _remote.repositories
> {code}
> h5. WORKAROUND
> The only options 1-2-3 ways I found to avoid this issue, and be able to launch successfully with RELEASE or LATEST as the launch parameter for the ReleaseId version, is to:
> h6. Workaround Option 1
> Do 'fake' a pom.xml with the dependency, something similar to:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.acme</groupId>
> <artifactId>fakepom</artifactId>
> <version>0.0.1</version>
> <packaging>jar</packaging>
> <dependencies>
> <dependency>
> <groupId>com.acme</groupId>
> <artifactId>drools6testmvnlatest.therules</artifactId>
> <version>RELEASE</version>
> </dependency>
> </dependencies>
>
> </project>
> {code}
> And then launch maven in the same directory of this 'fake' pom.xml with the following command:
> {code}
> mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline
> {code}
> This usually generate the 'maven-metadata-local' file in the local .m2 repo:
> {code}
> D:\DOCUMENTS AND SETTINGS\MMORTARI\.M2\REPOSITORY\COM\ACME
> └───drools6testmvnlatest.therules
> │ maven-metadata-nexus-hostname-nexus.xml
> │ maven-metadata-nexus-hostname-nexus.xml.sha1
> │ maven-metadata-local.xml
> │ maven-metadata-local.xml.sha1
> │ maven-metadata-temp.xml
> │ maven-metadata-temp.xml.sha1
> │ resolver-status.properties
> │
> └───0.0.2
> drools6testmvnlatest.therules-0.0.2.jar
> drools6testmvnlatest.therules-0.0.2.jar.sha1
> drools6testmvnlatest.therules-0.0.2.pom
> drools6testmvnlatest.therules-0.0.2.pom.sha1
> _remote.repositories
> {code}
> h6. Workaround Option2
> Well, actually this is to report that not all the time the Option1 works, so what I do, is that I copy-rename the 'maven-metadata-temp.xml' file into the 'maven-metadata-local.xml' file.
> h6. Workaround Option3
> Download manually the .jar file, the .pom file from the nexus webapplication, then usual maven
> {code}
> D:\inbox>mvn install:install-file -Dfile=drools6testmvnlatest.therules-0.0.2.jar -DpomFile=drools6testmvnlatest.therules-0.0.2.pom -Dpackaging=jar
> {code}
> This will create directly the 'maven-metadata-local.xml' file and the ' -Dpackaging=jar' option do force it to install it in the .m2 local repository with .jar extension (not kjar)
> {code}
> D:\DOCUMENTS AND SETTINGS\MMORTARI\.M2\REPOSITORY\COM\ACME
> └───drools6testmvnlatest.therules
> │ maven-metadata-local.xml
> │
> └───0.0.2
> drools6testmvnlatest.therules-0.0.2.jar
> drools6testmvnlatest.therules-0.0.2.pom
> _remote.repositories
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months