I forgot to mention, i changed my xml invoke.
-----
SolverFactory solverFactory = new
XmlSolverFactory().configure(getDroolsConfiguration());
-----
private static ByteArrayInputStream getDroolsConfiguration(){
String t = "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>"
+ "<solver>"
+ "
<solutionClass>com.my.proj.planner.facts.PlannerConfig</solutionClass>"
+ "
<planningEntityClass>com.my.proj.planner.facts.WorkOrderFact</planningEntityClass>"
+ ""
+ " <scoreDirectorFactory>"
+ "
<scoreDefinitionType>HARD_AND_SOFT</scoreDefinitionType>"
+ "
<simpleScoreCalculatorClass>com.my.proj.planner.solver.PlannerScoreCalculator</simpleScoreCalculatorClass>"
+ " </scoreDirectorFactory>"
+ ""
+ " <termination>"
+ "
<maximumSecondsSpend>1</maximumSecondsSpend>"
+ " </termination>"
+ " <constructionHeuristic>"
+ "
<constructionHeuristicType>FIRST_FIT_DECREASING</constructionHeuristicType>"
+ "
<constructionHeuristicPickEarlyType>FIRST_LAST_STEP_SCORE_EQUAL_OR_IMPROVING</constructionHeuristicPickEarlyType>"
+ " </constructionHeuristic>"
+ " <localSearch>"
+ " <acceptor>"
+ "
<planningEntityTabuSize>7</planningEntityTabuSize>"
+ " </acceptor>"
+ " <forager>"
+ "
<minimalAcceptedSelection>1000</minimalAcceptedSelection>"
+ " </forager>"
+ " </localSearch>"
+ "</solver>";
byte b[] = t.getBytes();
return new ByteArrayInputStream(b);
}
2013/3/21 André Fróes <arfmoraes(a)gmail.com>
The exception persist. I added the artifact at web project and also
checked if it was there at the lib when compiled and also checked at
glassfish lib folder, it is at both places. I still can't figure what is
the problem with it, it runs perfectly in my mock, as I said before, but is
not working when invoked by web.
---------
SEVERE: Error Rendering View[/protected/crud/planner.xhtml]
javax.el.ELException: /protected/crud/planner.xhtml:
com.thoughtworks.xstream.io.StreamException: Cannot create XmlPullParser
at
com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:88)
at
com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
at
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
at
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.my.proj.view.listener.LoginFilter.doFilter(LoginFilter.java:40)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.thoughtworks.xstream.io.StreamException: Cannot create
XmlPullParser
at
com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:60)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:87)
at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:77)
at com.my.proj.planner.plan.ExecutePlan.doPlan(ExecutePlan.java:217)
at
com.my.proj.planner.plan.ExecutePlan.planWorkOrders(ExecutePlan.java:206)
at
com.my.proj.planner.plan.ExecutePlan.executePlanning(ExecutePlan.java:86)
at
com.my.proj.view.controller.crud.PlannerCrud.runPlanner(PlannerCrud.java:187)
at
com.my.proj.view.controller.crud.PlannerCrud.attributeResourceById(PlannerCrud.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:779)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:528)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:257)
at com.sun.el.parser.AstValue.getValue(AstValue.java:134)
at com.sun.el.parser.AstValue.getValue(AstValue.java:183)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at
org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at
com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:227)
at
com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:150)
at
com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
... 52 more
WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service()
for servlet Faces Servlet threw exception
com.thoughtworks.xstream.io.StreamException: Cannot create XmlPullParser
at
com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:60)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:87)
at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:77)
at com.my.proj.planner.plan.ExecutePlan.doPlan(ExecutePlan.java:217)
at
com.my.proj.planner.plan.ExecutePlan.planWorkOrders(ExecutePlan.java:206)
at
com.my.proj.planner.plan.ExecutePlan.executePlanning(ExecutePlan.java:86)
at
com.my.proj.view.controller.crud.PlannerCrud.runPlanner(PlannerCrud.java:187)
at
com.my.proj.view.controller.crud.PlannerCrud.attributeResourceById(PlannerCrud.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:779)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:528)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:257)
at com.sun.el.parser.AstValue.getValue(AstValue.java:134)
at com.sun.el.parser.AstValue.getValue(AstValue.java:183)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at
org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at
com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:227)
at
com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:150)
at
com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
at
com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
at
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
at
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.my.proj.view.listener.LoginFilter.doFilter(LoginFilter.java:40)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
2013/3/20 Geoffrey De Smet <ge0ffrey.spam(a)gmail.com>
> Check WEB-INF/lib of the build war for the xml pull jar.
> Op 20-03-13 20:05, André Fróes schreef:
>
> Caused by: com.thoughtworks.xstream.io.StreamException: Cannot create
> XmlPullParser
> at
>
com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:60)
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>