[JBoss Seam] - Re: Problem injecting drools WorkingMemory
by sjmenden
I made some progress but now getting massive exceptions. I changed the components.xml to look like the drools example one:
components.xml
| ...
| <component name="ruleBase" class="org.jboss.seam.drools.RuleBase">
| <property name="ruleFiles">purchasingRules.drl</property>
| </component>
|
| <component name="purchasingRulesMemory" class="org.jboss.seam.drools.ManagedWorkingMemory">
| <property name="ruleBase">#{ruleBase}</property>
| </component>
| ...
|
But now I'm getting a ClassCastException, and I have verified my jars exactly(crosses fingers) mirror the ones in the example. I'm running SEAM CR2 with JBoss 4.0.5
| 17:16:25,918 ERROR [STDERR] StringTemplate: problem parsing group <unknown>: java.lang.ClassCastException: antlr.CommonToken cannot be cast to antlr.Token
| 17:16:25,919 ERROR [STDERR] java.lang.ClassCastException: antlr.CommonToken cannot be cast to antlr.Token
| 17:16:25,919 ERROR [STDERR] at antlr.CharScanner.makeToken(CharScanner.java:173)
| 17:16:25,920 ERROR [STDERR] at org.antlr.stringtemplate.language.GroupLexer.mID(GroupLexer.java:333)
| 17:16:25,920 ERROR [STDERR] at org.antlr.stringtemplate.language.GroupLexer.nextToken(GroupLexer.java:103)
| 17:16:25,920 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69)
| 17:16:25,920 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80)
| 17:16:25,920 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52)
| 17:16:25,920 ERROR [STDERR] at antlr.Parser.match(Parser.java:210)
| 17:16:25,921 ERROR [STDERR] at org.antlr.stringtemplate.language.GroupParser.group(GroupParser.java:117)
| 17:16:25,921 ERROR [STDERR] at org.antlr.stringtemplate.StringTemplateGroup.parseGroup(StringTemplateGroup.java:754)
| 17:16:25,921 ERROR [STDERR] at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:264)
| 17:16:25,921 ERROR [STDERR] at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:244)
| 17:16:25,921 ERROR [STDERR] at org.drools.semantics.java.RuleBuilder.<clinit>(Unknown Source)
| 17:16:25,921 ERROR [STDERR] at org.drools.compiler.PackageBuilder.addRule(Unknown Source)
| 17:16:25,922 ERROR [STDERR] at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)
| 17:16:25,922 ERROR [STDERR] at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:52)
| 17:16:25,922 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 17:16:25,922 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 17:16:25,922 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 17:16:25,922 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 17:16:25,923 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992101#3992101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992101
19 years, 4 months
[JBoss Seam] - Errors when using Seam components with Trinidad
by lowecg2004
If I use <s:link> with the Trinidad components installed, I get this message for each instance of <s:link>:
22:02:57,484 ERROR [STDERR] 07-Dec-2006 22:02:57 org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
| WARNING: Renderer 'javax.faces.Link' not found for component family 'javax.faces.Output'
| 22:02:57,484 INFO [[/ripuk]] No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /view/public/order-format.xhtml][Class: org.apache.myfaces.trinidad.component.html.HtmlBody,Id: _id9][Class: org.jboss.seam.ui.HtmlLink,Id: lnkTermsAndConditions]} (component-family=javax.faces.Output, renderer-type=javax.faces.Link)
| 22:02:57,484 WARN [UIComponentBase] No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /view/public/order-format.xhtml][Class: org.apache.myfaces.trinidad.component.html.HtmlBody,Id: _id9][Class: org.jboss.seam.ui.HtmlLink,Id: lnkTermsAndConditions]} (component-family=javax.faces.Output, renderer-type=javax.faces.Link)
I have configured Trinidad in web.xml as:
<context-param>
| <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
| <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
| </context-param>
Any ideas on what might be the problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992098#3992098
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992098
19 years, 4 months
[JBoss Seam] - Re: How many EntityManagers and SFSBs in a web app?
by petemuir
You really seem to have missed the point.
If you use a Seam Managed Persistence Context (RTM) then it solves the LIE situation for conversations (which can be used 99% of the time you used to use the session scope).
I suspect the problem is that you are using session scoping when you needn't. I think it is fair to say that you should, in most normal apps, only need to store one entity in the session scope - the logged in user - and I've never had to place any in the application context.
anonymous wrote : The problem is, how do I avoid LazyInitializationExceptions when my objects have collections in them? Obvious answer: use eager fetching. But for situations where that is not practical, the thing to do is to have an EntityManager available while the page is being rendered.
No. The obvious answer is to use a conversation and a conversation scope entity manager (which Seam does for you) (and certainly provides the same entity manager whilst the page is rendered.
anonymous wrote : I can access the FacesMessages from any object and the FacesMessages is retrieved from the Thread itself.
Thats because FacesMessages is conversation scoped. An EXTENDED persistence context isn't, an SMPC is.
petemuir wrote : For SESSION and APPLICATION scopes either eager fetch what you need or create a manager that reloads entities when they become detached (this is somewhere in the forum archive).
I forgot I wrote this up:
http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEntityHomeForLongRunningCont...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992094#3992094
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992094
19 years, 4 months
[JBoss Seam] - Problem injecting drools WorkingMemory
by sjmenden
I am following the documentation for injecting the WorkingMemory into an EJB. I know my problem is configuration, but there are no working examples specific to the documentation, so I'm having trouble:
| SEVERE: Error Rendering View[/purchase.xhtml]
| org.jboss.seam.RequiredException: In attribute requires value for component: purchaseHome.purchasingRulesMemory
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1844)
| at org.jboss.seam.Component.injectFields(Component.java:1317)
| at org.jboss.seam.Component.inject(Component.java:1087)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| ...
|
components.xml
| <components xmlns:drools="http://jboss.com/products/drools">
|
| ...
|
| <drools:rule-base name="purchasingRules">
| <drools:rule-files>
| <value>purchasingRules.drl</value>
| </drools:rule-files>
| </drools:rule-base>
|
| <drools:managed-working-memory name="purchasingRulesMemory" auto-create="true" rule-base="#{purchasingRules}"/>
|
| ...
|
| </components>
|
purchasingRules.drl, located in the resources dir, but I'm copying it over to WEB-INF/classes because the docs say that the rule is looked for on the classpath
| package test.purchasing
|
| rule "Step 1"
|
| when
| s : PurchaseStatus( status == "New Request")
| then
| System.out.println("Rule Triggered!!!!!!!!!");
| System.out.println(s);
| s.setStatus("Waiting for purchase Approval.");
| s.setNextStep("Step 1");
|
| end
|
PurchaseHome.java
| ...
|
| @Name("purchaseHome")
| @LoggedIn
| public class PurchaseHome extends EntityHome<Purchase> {
|
| @In WorkingMemory purchasingRulesMemory;
|
| ...
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992092#3992092
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992092
19 years, 4 months
[JBoss Messaging] - crashing under load
by nbreau
We are running standalone messaging on a single server under load of about 50 messages/sec.
After about 20 mins of execution our producer is crashing with the following stack trace... I would greatly appreciate if anyone could shed some light on the cause. The application is producing to a non-persistent queue.
thanks,
Nick.
stack trace:
org.jboss.aop.NotFoundInDispatcherException: Object with oid: -2147483597 was not found in the Dispatcher
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:127)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:1008)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:857)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:454)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:541)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:261)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:172)
at org.jboss.remoting.Client.invoke(Client.java:589)
at org.jboss.remoting.Client.invoke(Client.java:581)
at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:111)
at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
at org.jboss.jms.client.container.TransactionAspect.handleSend(TransactionAspect.java:176)
at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect16.invoke(TransactionAspect16.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:182)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:253)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:182)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:172)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:220)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:147)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:138)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992078#3992078
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992078
19 years, 4 months