Forum Stats

  • 3,782,334 Users
  • 2,254,638 Discussions
  • 7,880,046 Comments

Discussions

problem for Invoking Static method in campaign

699655
699655 Member Posts: 94
edited Jul 9, 2009 10:24AM in WebLogic Portal
Hi,
I have created a campaign, which calls static method when contentupdateevent occur.
Campaign don't show any compilation in workshop but when i look the same campaign in the portal admin
console the action content part shows following exception.

javax.el.PropertyNotFoundException: The class 'com.bea.p13n.rules.model.StaticMethodModel' does not have the property 'contentQueryModel'.
at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
at weblogic.servlet.jsp.ELHelper.evaluate(ELHelper.java:32)
at jsp_servlet._im._campaigns._scenarios._rules._details.__ruledetails._jsp__tag97(__ruledetails.java:4813)
at jsp_servlet._im._campaigns._scenarios._rules._details.__ruledetails._jsp__tag96(__ruledetails.java:4778)
at jsp_servlet._im._campaigns._scenarios._rules._details.__ruledetails._jspService(__ruledetails.java:1839)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

Campaign is also not working.
can anybody please tell , if i missed some setting for campaign.

Thanks a ton in advance

Answers

  • 663697
    663697 Member Posts: 108
    That error message in the Portal Admin Console is a know outage with displaying the campaign. It shouldn't have any effect on the execution of the campaign. Are there are error messages in the server console, either at application deployment time or when the content update event (which should fire the campaign) is triggered.

    Also, only methods of application-scoped classes can be invoked. If the static-method-calls class is coming from a web project it won't work.

    And, make sure that your content repository is configured to fire events.

    Greg
  • 699655
    699655 Member Posts: 94
    Hi,
    I have done the configuration as per your comment.
    I have created a Utility project which contains the static method class.
    This method used in the campaign,gets called when content updated in CMS.
    but campaign through following exception.



    com.bea.p13n.expression.internal.parser.ParseException: The parsing engine has encountered a fatal error condition; see embedded exception for details.
    at com.bea.p13n.expression.internal.parser.ExpressionParserImpl.parse(ExpressionParserImpl.java:188)
    at com.bea.campaign.internal.ScenarioManager.parseRuleSet(ScenarioManager.java:794)
    at com.bea.campaign.internal.ScenarioManager.getRuleSet(ScenarioManager.java:741)
    at com.bea.p13n.rules.manager.internal.ContextPool.<init>(ContextPool.java:149)
    at com.bea.p13n.rules.manager.internal.ContextPoolFactory.getContextPool(ContextPoolFactory.java:214)
    at com.bea.campaign.internal.ScenarioServiceImpl.getActions(ScenarioServiceImpl.java:839)
    at com.bea.campaign.internal.ScenarioServiceImpl.executeScenarios(ScenarioServiceImpl.java:736)
    at com.bea.campaign.internal.ScenarioServiceImpl.handleEvent(ScenarioServiceImpl.java:404)
    at com.bea.campaign.internal.ScenarioService_ibzd0g_EOImpl.handleEvent(ScenarioService_ibzd0g_EOImpl.java:935)
    at com.bea.campaign.internal.CampaignServiceImpl.handleEvent(CampaignServiceImpl.java:436)
    at com.bea.campaign.internal.CampaignService_qo26xs_EOImpl.handleEvent(CampaignService_qo26xs_EOImpl.java:288)
    at com.bea.campaign.internal.CampaignEventListener.handleEvent(CampaignEventListener.java:251)
    at com.bea.p13n.events.internal.EventHandler.notifyListeners(EventHandler.java:299)
    at com.bea.p13n.events.internal.EventHandler.dispatchEvent(EventHandler.java:99)
    at com.bea.p13n.events.internal.EventServiceBean.dispatchEvent(EventServiceBean.java:174)
    at com.bea.p13n.events.internal.EventService_uanzu_EOImpl.dispatchEvent(EventService_uanzu_EOImpl.java:61)
    at com.bea.content.federated.internal.events.ContentEventHelper.fireUpdateContentEvent(ContentEventHelper.java:247)
    at com.bea.content.federated.internal.VersionManagerImpl.checkOut(VersionManagerImpl.java:145)
    at com.bea.portal.tools.content.controls.ContentVersionControlImpl.checkOut(ContentVersionControlImpl.java:121)
    at com.bea.portal.tools.content.controls.ContentVersionControlBean.checkOut(ContentVersionControlBean.java:257)
    at content.BaseContent.handleLibraryOpForSelectedNode(BaseContent.java:1019)
    at content.node.nodeSelected.summary.NodeSummaryController.checkOutLatestVersion(NodeSummaryController.java:339)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:879)
    at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    at global.internal.AbstractBaseController.internalExecute(AbstractBaseController.java:360)
    at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
    at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:91)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
    at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
    at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:687)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
    at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:107)
    at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    java.lang.NullPointerException
    at com.bea.p13n.expression.internal.parser.expression.ExpressionTransformVisitor.createStaticMethodCall(ExpressionTransformVisitor.java:1144)
    at com.bea.p13n.expression.internal.parser.expression.ExpressionTransformVisitor.visit(ExpressionTransformVisitor.java:388)
    at com.bea.p13n.expression.internal.parser.expression.StaticMethodNode.accept(StaticMethodNode.java:38)
    at com.bea.p13n.expression.internal.parser.expression.ExpressionCompositeNode.accept(ExpressionCompositeNode.java:44)
    at com.bea.p13n.rules.internal.parser.core.CoreTransformVisitor.visit(CoreTransformVisitor.java:384)
    at com.bea.p13n.rules.internal.parser.core.ActionsNode.accept(ActionsNode.java:35)
    at com.bea.p13n.rules.internal.parser.core.CoreCompositeNode.accept(CoreCompositeNode.java:42)
    at com.bea.p13n.expression.internal.parser.expression.ExpressionCompositeNode.accept(ExpressionCompositeNode.java:44)
    at com.bea.p13n.rules.internal.parser.core.CoreTransformVisitor.visit(CoreTransformVisitor.java:199)
    at com.bea.p13n.rules.internal.parser.core.RuleNode.accept(RuleNode.java:35)
    at com.bea.p13n.rules.internal.parser.core.CoreCompositeNode.accept(CoreCompositeNode.java:42)
    at com.bea.p13n.expression.internal.parser.expression.ExpressionCompositeNode.accept(ExpressionCompositeNode.java:44)
    at com.bea.p13n.rules.internal.parser.core.CoreTransformVisitor.visit(CoreTransformVisitor.java:131)
    at com.bea.p13n.rules.internal.parser.core.RuleSetNode.accept(RuleSetNode.java:35)
    at com.bea.p13n.rules.internal.parser.core.CoreCompositeNode.accept(CoreCompositeNode.java:42)
    at com.bea.p13n.expression.internal.parser.expression.ExpressionCompositeNode.accept(ExpressionCompositeNode.java:44)
    at com.bea.p13n.rules.internal.parser.core.CoreTransformVisitor.transform(CoreTransformVisitor.java:95)
    at com.bea.p13n.expression.internal.parser.ExpressionParserImpl.parse(ExpressionParserImpl.java:183)
    at com.bea.campaign.internal.ScenarioManager.parseRuleSet(ScenarioManager.java:794)
    at com.bea.campaign.internal.ScenarioManager.getRuleSet(ScenarioManager.java:741)
    at com.bea.p13n.rules.manager.internal.ContextPool.<init>(ContextPool.java:149)
    at com.bea.p13n.rules.manager.internal.ContextPoolFactory.getContextPool(ContextPoolFactory.java:214)
    at com.bea.campaign.internal.ScenarioServiceImpl.getActions(ScenarioServiceImpl.java:839)
    at com.bea.campaign.internal.ScenarioServiceImpl.executeScenarios(ScenarioServiceImpl.java:736)
    at com.bea.campaign.internal.ScenarioServiceImpl.handleEvent(ScenarioServiceImpl.java:404)
    at com.bea.campaign.internal.ScenarioService_ibzd0g_EOImpl.handleEvent(ScenarioService_ibzd0g_EOImpl.java:935)
    at com.bea.campaign.internal.CampaignServiceImpl.handleEvent(CampaignServiceImpl.java:436)
    at com.bea.campaign.internal.CampaignService_qo26xs_EOImpl.handleEvent(CampaignService_qo26xs_EOImpl.java:288)
    at com.bea.campaign.internal.CampaignEventListener.handleEvent(CampaignEventListener.java:251)
    at com.bea.p13n.events.internal.EventHandler.notifyListeners(EventHandler.java:299)
    at com.bea.p13n.events.internal.EventHandler.dispatchEvent(EventHandler.java:99)
    at com.bea.p13n.events.internal.EventServiceBean.dispatchEvent(EventServiceBean.java:174)
    at com.bea.p13n.events.internal.EventService_uanzu_EOImpl.dispatchEvent(EventService_uanzu_EOImpl.java:61)
    at com.bea.content.federated.internal.events.ContentEventHelper.fireUpdateContentEvent(ContentEventHelper.java:247)
    at com.bea.content.federated.internal.VersionManagerImpl.checkOut(VersionManagerImpl.java:145)
    at com.bea.portal.tools.content.controls.ContentVersionControlImpl.checkOut(ContentVersionControlImpl.java:121)
    at com.bea.portal.tools.content.controls.ContentVersionControlBean.checkOut(ContentVersionControlBean.java:257)
    at content.BaseContent.handleLibraryOpForSelectedNode(BaseContent.java:1019)
    at content.node.nodeSelected.summary.NodeSummaryController.checkOutLatestVersion(NodeSummaryController.java:339)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)



    can u please suggest on the same.
    Thanks a ton
    Nitin
  • Sroth-Oracle
    Sroth-Oracle Member Posts: 74 Employee
    This NPE is occurring when looking up the target class name and package.

    Please verify the target class is in the enterprise app's APP-INF/lib directory, or system classpath. Also note that anything it calls must be ent-app or system classpath scoped.

    While investigating, it may be worthwhile having the campaign invoke a very simple class, with simply a static method which does a system.out and a static initializer block which does a System.out when the class is loaded. That way you can determine if the class is being loaded properly, and check that a class without any dependencies works properly.

    -Steve
  • 663697
    663697 Member Posts: 108
    Another thing to check -- is the class you're using not in a package? If so, refactor it into a java package (e.g. TestClass -> test.TestClass), update the campaign and see if that makes a difference.

    Greg
This discussion has been closed.