Detect rules changes at runtime using a push mechanism
by rviswanathan
Hi
I am trying to detect rule changes (that I edit using Guvnor) at runtime in
my java program.
I was able to use the resource scanner (as provided in the drools
documentation) to poll and get the changes.
I am also trying to see the possibility of using a push based approach,
instead of the polling. I see the classes for the ResourceChangeMonitor,
ResourceChangeNotifier and ResourceChangeListener, but I am not sure how I
should go about using these.
I tried to use the following method on the ResourceChangeNotifier by passing
in a listener implementation and the ChangeSet as the resource - but what do
I implement inside this method?
void subscribeResourceChangeListener(ResourceChangeListener listener,
Resource resource)
Is this approach correct?
Thanks
Ram
--
View this message in context: http://www.nabble.com/Detect-rules-changes-at-runtime-using-a-push-mechan...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months
ClassCastException when using an accumulate function on a locally declared type
by bill simms
Hello,
Recently I've been working with Drools version 5.0.1 to set up an event
processor. While doing so I have come
across difficulties with the accumulate function, in that it will always
throw a ClassCastException
when inserting events that are declared within my drl file. To illustrate
this I've set up an example which is
shown below. I've search Google and the mailing list for several hours, but
the only way past this problem
appears to be that I will have to declare a class externally and make sure
it implements Serializable. Does
anyone has suggestions for another approach? Secondly, I would have assumed
that since Drools was
compiling these internally declared classes, that Serializable would have
been implemented automatically. So
is this a result of the generated class not implementing Serializable, or
have I missed something in my rules
file? Thanks.
The important part of my drl file is:
declare TestEvent
@role( event )
@expires(10s)
id : String
end
#This rule works fine when 'Accumulate Count' is commented out, and is used
to make
#sure that the event inserting has worked.
rule "Is It There"
when
TestEvent() from entry-point "test"
then
System.out.println("Found a TestEvent.");
end
#This rule throws a ClassCastException when a TestEvent is inserted.
rule "Accumulate Count"
when
$n : Number() from accumulate($t : TestEvent() from entry-point
"test", count($t))
then
System.out.println("Found " + $n + " events.");
end
The unit test does this:
FactType testEventType =
session.getKnowledgeBase().getFactType("com.drools.test", "TestEvent");
for(int i = 0; i < 10; i++){
Object testEvent = testEventType.newInstance();
testEventType.set(testEvent, "id", "id");
WorkingMemoryEntryPoint mainStream =
session.getWorkingMemoryEntryPoint("test");
mainStream.insert(event);
session.fireAllRules();
}
The exception I receive is:
org.drools.RuntimeDroolsException: java.lang.ClassCastException:
com.drools.test.TestEvent cannot be cast to java.io.Serializable
at org.drools.rule.Accumulate.accumulate(Accumulate.java:172)
at org.drools.reteoo.AccumulateNode.modifyTuple(AccumulateNode.java:424)
at
org.drools.reteoo.AccumulateNode.assertObject(AccumulateNode.java:284)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)
at
org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:326)
at
org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:221)
at
org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:394)
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1486)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:158)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:122)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28)
at com.drools.test.MyUnitTest.testEvents(EvaluationTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233)
at
org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197)
at
org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ClassCastException: com.drools.test.TestEvent cannot be
cast to java.io.Serializable
at
org.drools.base.accumulators.JavaAccumulatorFunctionExecutor.accumulate(JavaAccumulatorFunctionExecutor.java:110)
at org.drools.rule.Accumulate.accumulate(Accumulate.java:164)
... 36 more
16 years, 10 months
Re: [rules-users] Hibernate Query delivers wrong values
by Greg Barton
Yes, Hibernate caches in several ways. Go here:
http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/
Search for "cache". :)
Some caching you can disable. (The 2nd level session factory cache.)
http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#con...
The cache on the session cannot be disabled, but you shouldn't be using hibernate sessions for the long term anyway. (i.e. a new one should be opened up each time the rule condition is evaluated.)
--- On Fri, 7/10/09, Thomas Zwifl <tom238(a)gmx.at> wrote:
> From: Thomas Zwifl <tom238(a)gmx.at>
> Subject: [rules-users] Hibernate Query delivers wrong values
> To: rules-users(a)lists.jboss.org
> Date: Friday, July 10, 2009, 5:46 AM
> Hi there!
>
> I'm working with the latest snapshot-releas of v5.1
> (build3098-rev27324-20090630-0403).
> My application consists of two independent processes,
> both are repeated periodically (timer-node).
> the processes both have ruleset-nodes. some rules are
> querying a database with hibernate in the rule condition
> (LHS).
> the queried objects are then inserted into workinmemory
> (insert(object)),
> then some computation follows, the objects are modified and
> written
> back to db, and then the objects are retracted
> (retract(object)).
>
> Now to the problem: when I start the application,
> everything works
> correct, and leads to the right results. But when I change
> a field of a
> db-record manually, the hibernate-query delivers the old
> values!!
> (of course the changes are committed.)
>
> Anyone has an idea whats going wrong here? Is there some
> kind of
> caching mechanism that delivers the old objects instead of
> querying
> the database?
>
> greetz!
> tom
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
16 years, 10 months
Hibernate Query delivers wrong values
by Thomas Zwifl
Hi there!
I'm working with the latest snapshot-releas of v5.1 (build3098-rev27324-20090630-0403).
My application consists of two independent processes,
both are repeated periodically (timer-node).
the processes both have ruleset-nodes. some rules are
querying a database with hibernate in the rule condition (LHS).
the queried objects are then inserted into workinmemory (insert(object)),
then some computation follows, the objects are modified and written
back to db, and then the objects are retracted (retract(object)).
Now to the problem: when I start the application, everything works
correct, and leads to the right results. But when I change a field of a
db-record manually, the hibernate-query delivers the old values!!
(of course the changes are committed.)
Anyone has an idea whats going wrong here? Is there some kind of
caching mechanism that delivers the old objects instead of querying
the database?
greetz!
tom
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
16 years, 10 months
Does drools provide Run time compilation support of java code present in .drl file
by Pardeep.Ruhil@lntinfotech.com
Hi,
I want to know , do we need to compile the the project having drl file
with java code written in it drl file.
Does drools provide Run time compilation support of java code present in
.drl file?
Please help me get out of this question.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
16 years, 10 months
Not able to deploy drools guvnor in Apache Tomcat 5.5
by Ashok Deivasigamani
Hi
I am not able to deply the drools guvnor .war file in Apache Tomcat 5.5
server.
Deploying the .war gives the following exception
SEVERE: Exception sending context initialized event to listener instance of
class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: Could not create Component: assetLockManager
at
org.jboss.seam.init.Initialization.addComponent(Initialization.java:1155)
at
org.jboss.seam.init.Initialization.installComponents(Initialization.java:1071)
at org.jboss.seam.init.Initialization.init(Initialization.java:720)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.TypeNotPresentException: Type
javax.annotation.PostConstruct not present
at
com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38)
at
com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31)
at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:704)
at
java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:191)
at com.ibm.oti.reflect.Method.getAnnotation(Method.java:20)
at java.lang.reflect.Method.getAnnotation(Method.java:693)
at
java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:187)
at org.jboss.seam.intercept.Interceptor.init(Interceptor.java:130)
at org.jboss.seam.intercept.Interceptor.<init>(Interceptor.java:97)
at org.jboss.seam.Component.initDefaultInterceptors(Component.java:1029)
at org.jboss.seam.Component.initInterceptors(Component.java:927)
at org.jboss.seam.Component.<init>(Component.java:251)
at org.jboss.seam.Component.<init>(Component.java:205)
at
org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)
... 18 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:160)
at
com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:33)
... 32 more
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/drools-guvnor] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbweb\WEB-INF\lib\jsp-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/jsp/JspPage.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbweb\WEB-INF\lib\servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Error configuring application listener of class
com.odb.web.servlet.MemoryCleanupListener
java.lang.ClassNotFoundException: com.odb.web.servlet.MemoryCleanupListener
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jodbweb] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbcache\WEB-INF\lib\jsp-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/jsp/JspPage.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbcache\WEB-INF\lib\servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jodbcache] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Jul 9, 2009 10:22:01 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8010
Jul 9, 2009 10:22:01 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Jul 9, 2009 10:22:01 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 9, 2009 10:22:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3993 ms
Kindly give some solution to deploy
--
View this message in context: http://www.nabble.com/Not-able-to-deploy-drools-guvnor-in-Apache-Tomcat-5...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months
How to iterate ArrayList object
by Ashok Deivasigamani
I have a Message Object which has a Attribute Object which has a ArrayList
of AttributeParams Objects. How can I iterate through the ArrayList to get
to a perticular AttributeParans Object in the drl file.
The java representation of these Objects are as Follows
Class Message {
private Attributes attributes;
}
Class Attributes {
private ArrayList<AttributeParams> attributeParams;
}
Class AttributeParsms {
private String name;
}
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
--
Ashok Deivasigamani
16 years, 10 months
Detect changes in rules at runtime
by rviswanathan
Hi
I am using Guvnor for editing my business rules. I am able to write a test
program in java that would fire one sample rule that I have created in
guvnor.
public static final void main(String[] args) {
try {
// load up the knowledge base
//KnowledgeBase kbase = readKnowledgeBase();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent"
);
kagent.applyChangeSet(
ResourceFactory.newFileResource("C:/Test/changeset.xml"));
KnowledgeBase kbase1 = kagent.getKnowledgeBase();
StatefulKnowledgeSession ksession =
kbase1.newStatefulKnowledgeSession();
Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
ksession.insert(message);
ksession.fireAllRules();
ksession.dispose();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
Now I am trying to see if I would be able to detect changes in the rules
that I edit in Guvnor at runtime. What I am trying to do is to edit one of
the rules and save it, and I need this change to be picked up automatically
by my java application.
Is this possible? How do I do this?
Thanks
Ram
--
View this message in context: http://www.nabble.com/Detect-changes-in-rules-at-runtime-tp24379025p24379...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months
How to iterate ArrayList object
by Ashok Deivasigamani
I have a Message Object which has a Attribute Object which has a ArrayList
of AttributeParams Objects. How can I iterate through the ArrayList to get
to a perticular AttributeParans Object in the drl file.
The java representation of these Objects are as Follows
Class Message {
private Attributes attributes;
}
Class Attributes {
private ArrayList<AttributeParams> attributeParams;
}
Class AttributeParsms {
private String name;
}
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
--
Ashok Deivasigamani
16 years, 10 months
Error deploying Guvnor in WAS 6.1
by Sobhana
When we deploy Guvnor web application in WebSphere AppServer 6.1, we get the
following error
[7/9/09 16:18:09:453 IST] 0000001c WebApp E Exception caught while
initializing context
java.lang.RuntimeException: error while reading /WEB-INF/components.xml
at
org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:221)
at org.jboss.seam.init.Initialization.create(Initialization.java:124)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:652)
at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:355)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:292)
at
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
at
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:671)
at
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:624)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1274)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)
at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:921)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1461)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4132)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4229)
at
com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1092)
at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:973)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1106)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:999)
at
com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at
com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:179)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:627)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:480)
at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2717)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2582)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.RuntimeException: Error loading element
RoleBasedPermissionResolver with component name null and component class
null
at
org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:342)
at
org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:217)
... 52 more
--
View this message in context: http://www.nabble.com/Error-deploying-Guvnor-in-WAS-6.1-tp24408096p244080...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 10 months