[JBoss JIRA] Created: (JBRULES-2377) Problems with DSL / DSLR files when used with a KnowledgeAgent / Change Sets
by Macon Pegram (JIRA)
Problems with DSL / DSLR files when used with a KnowledgeAgent / Change Sets
----------------------------------------------------------------------------
Key: JBRULES-2377
URL: https://jira.jboss.org/jira/browse/JBRULES-2377
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler, drools-compiler (expert), drools-compiler-DSL
Affects Versions: 5.0.1.FINAL
Environment: Windows XP, Mac OS X, JDK 1.5.0_12
Reporter: Macon Pegram
Assignee: Mark Proctor
I tried to address this on the Drools Mailing list but did not receive an answer. See:
Mailing list message threads: "[rules-users] DSL, DSLR and Changesets...", "[rules-users] Can DSL / DSLR be loaded in a changeset?"
----
Are DSL and DSLR files supported by the KnowledgeAgent / Changeset code. Here's the details of my test case:
I have a Changeset file I'm trying to load which looks like the following:
<?xml version="1.0" encoding="UTF-8"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance' >
<add>
<resource source="classpath:com/test/general/" type="DSL" />
<resource source="classpath:com/test/general/" type="DSLR" />
</add>
</change-set>
There's a single DSL and a single DSLR file in this folder. I'm loading the change set as follows:
KnowledgeAgent ka = KnowledgeAgentFactory.newKnowledgeAgent(agentName);
ka.applyChangeSet(ResourceFactory.newClassPathResource(agentName + "-changeset.xml", getClass()));
When I run this code, the logger suggests the DSL and DSLR are being loaded and compiled:
[2009:10:299 16:10:52:info] KnowledgAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
++ Constructing and applying changeSet: dsl-test
[2009:10:299 16:10:52:info] KnowledegAgent has started listening for ChangeSet notifications
(null: 3, 68): cvc-elt.1: Cannot find the declaration of element 'change-set'.
[2009:10:299 16:10:317:info] KnowledgAgent applying ChangeSet
[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to directory=[ClassPathResource path='com/test/general/']
[2009:10:299 16:10:317:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to resource=[ClassPathResource path='com/test/general/']
[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49 to resource=[ClassPathResource path='com/test/general/']
[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to directory content resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']
[2009:10:299 16:10:317:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']
[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49 to resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']
[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to directory content resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']
[2009:10:299 16:10:317:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']
[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49 to resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']
[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to directory=[ClassPathResource path='com/hmc/test/general/']
[2009:10:299 16:10:317:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to resource=[ClassPathResource path='com/hmc/test/general/']
[2009:10:299 16:10:317:debug] KnowledgeAgent ChangeSet requires KnowledgeBuilder
[2009:10:299 16:10:317:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
[2009:10:299 16:10:317:debug] KnowledgeAgent building resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']
[2009:10:299 16:10:333:debug] KnowledgeAgent building resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']
[2009:10:299 16:10:333:info] KnowledgeAgent new KnowledgeBase now built and in use
However after load is completed I try to run the following code:
System.out.println("KB Info");
Collection<KnowledgePackage> pkgs = ka.getKnowledgeBase().getKnowledgePackages();
for (KnowledgePackage kp : pkgs) {
for (Rule rule : kp.getRules()) {
System.out.println("Rule: " + rule.getName() + ", " + ule.getPackageName());
for (String attribs : rule.listMetaAttributes())
System.out.println("---- " + attribs);
}
}
}
I get NO output (except of course "KB Info").
If I initialize the knowledgebase like this:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(ResourceFactory
.newClassPathResource("com/test/general/test.dsl"),
ResourceType.DSL);
kbuilder.add(ResourceFactory
.newClassPathResource("com/test/general/test-dsl.dslr"),
ResourceType.DSLR);
if (kbuilder.hasErrors()) {
throw new Exception(kbuilder.getErrors().toString());
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
}
... and run the same output code I get a list of the rules that were loaded.
Any clues why the different behavior?
--
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
15 years, 2 months
[JBoss JIRA] Created: (JGRP-1293) Mixture of logical names (host+number) and UUIDs appears in a view addresses
by Allen Zhao (JIRA)
Mixture of logical names (host+number) and UUIDs appears in a view addresses
----------------------------------------------------------------------------
Key: JGRP-1293
URL: https://issues.jboss.org/browse/JGRP-1293
Project: JGroups
Issue Type: Bug
Affects Versions: 2.11
Environment: Windows
Reporter: Allen Zhao
Assignee: Bela Ban
We are using jGroups a lot in our applications. Mixture of logical names (host+number) and UUIDs appears in a view addresses some time when we restart some group members. At some point, the view for one member is
[dev-zhaoa-48631|22] [dev-zhaoa-48631, dev-zhaoa-14374, dev-zhaoa-45685]
but for another member, it is
[dev-zhaoa-48631|23] [dev-zhaoa-48631, fb564aa3-5328-569b-ff3f-84de4a6323c3, d38da714-6217-b59f-e80c-7904b047b875, dev-zhaoa-50510]
I tried to catch the exact scenario to reproduce this, but it is difficult when I try it on purpose. But this happens quite often. I'll try to add more information here.
Thank you very much for look into the problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (EJBTHREE-1434) 5.0.0CR1: EJB refs across EARs don't work
by Juergen Zimmermann (JIRA)
5.0.0CR1: EJB refs across EARs don't work
-----------------------------------------
Key: EJBTHREE-1434
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1434
Project: EJB 3.0
Issue Type: Bug
Affects Versions: AS 5.0.0.CR1
Environment: JBoss 5.0.0.CR1, JDK 6u10beta
Reporter: Juergen Zimmermann
I'm having 2 different EARs and stateless session beans of the 2nd EAR are referencing stateless session beans of the 1st ear. It worked fine with 4.2.2
I'll attach a stripped down testcase:
* src.zip: source of projects for Eclipse w/ JBoss Tools
* hska.ear.zip: exploded EAR 1 (and zipped for transferring)
* testHska.ear.zip: exploded EAR 1 (and zipped for transferring)
src.zip:
* hska is the 1st EAR project
* hskaEJB contains the ejb module for hska
* testHska is the EAR project for the 2nd EAR
* testHskaEJB is the ejb module for testHska and references a SLSB of hskaEJB
* testHskaClient is an application client module for testHska using JUnit
--
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
15 years, 2 months
[JBoss JIRA] Created: (JBAS-7883) @Resource mail session injection, injects incrrect mail session
by Mark Lowe (JIRA)
@Resource mail session injection, injects incrrect mail session
---------------------------------------------------------------
Key: JBAS-7883
URL: https://jira.jboss.org/jira/browse/JBAS-7883
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-5.1.0.GA, JBossAS-5.0.1.GA
Environment: Linux 64 bit , sun JDK 1.6.0.14
Reporter: Mark Lowe
Please forgive me if I've posted this to the incorrect component or failed to find an existing bug, I did look.
I'm porting our applications from Jboss 4.2.3 and found the following problem injecting mail sessions in EJBs and Servlet components.
I have several mails sessions configured. For example
<mbean code="org.jboss.mail.MailService" name="jboss:service=MyMailServer1">
<attribute name="JNDIName">foo/MyMailServer1</attribute>
<attribute name="User">myuser</attribute>
<attribute name="Password">myuserpw</attribute>
<attribute name="Configuration">
<configuration>
</configuration>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
The jndi tree is created and all is present and correct.
@Resource(name="MyMailServer1",mappedName="foo/MyMailServer1")
private Session session;
Returns the default mail session (java:/Mail). When I removed the java:/Mail session jboss find the last session from the configuration and arbitrarily injects it. I also tested this placing another configuration after the java:/Mail config, and the result was that the session configured below (i.e. last) was referenced.
In short to recreate the bug.
Create 2 additional mail sessions in a *-service.xml file. Deploy a servlet, ejb or other component that supports @Resource. Attempt to inject one of the custom sessions (not java:/Mail using @Resource(mappedName="[jndi name]".
I also attempted to force the issue using a resource-ref in jboss.xml matching the resource-ref-name with the @Resource(name=".") and using the jndi-name (in case the usage of mappedname as been changed since 4.2.3. ) With no result.
Assuming this is a real bug, workarounds?
--
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
15 years, 2 months