[JBoss JIRA] (AS7-5968) jboss-deployment-structure.xml depend on era name
by Marco Benuzzi (JIRA)
Marco Benuzzi created AS7-5968:
----------------------------------
Summary: jboss-deployment-structure.xml depend on era name
Key: AS7-5968
URL: https://issues.jboss.org/browse/AS7-5968
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.1.Final
Reporter: Marco Benuzzi
Assignee: Jason Greene
Priority: Minor
Here's my use case: I've an application ear which contains an ejb module and a war module.
* myapp.ear
** myapp-ejb.jar
** myapp-gwt.war
The application runs in a cluster of 2 nodes.
I've some scheduled EJBs and I need different schedules on the two cluster nodes, so I package my application in two different ear files:
* myapp-node1.ear
* myapp-node1.ear
Both files are identical except ear/myapp-ejb.jar/META-INF/ejb.xml in which I've different <timer> configurations.
ear/META-INF/application.xml is
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID" version="6">
<application-name>myapp</application-name>
<display-name>My Application</display-name>
<module>
<ejb>myapp-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>myapp-gwt.war</web-uri>
<context-root>myapp</context-root>
</web>
</module>
</module>
</application>
{code}
Declaring <application> all my EJB have the same JNDI application name even if they come from different ear files.
The problem is in the ear/META-INF/jboss-deployment-structure.xml
It is not possible to use subdeployments isolation because I must use the real ear name.
{code:xml}
<jboss-deployment-structure>
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="org.apache.commons.lang" />
</dependencies>
</deployment>
<sub-deployment name="myapp-ejb.jar">
<dependencies>
<module name="org.apache.commons.lang" />
<module name="org.apache.commons.collections" />
<module name="org.apache.commons.configuration" />
<module name="org.apache.commons.codec" />
<module name="org.apache.httpcomponents" />
</dependencies>
</sub-deployment>
<sub-deployment name="myapp-gwt.war">
<dependencies>
<module name="deployment.myapp.ear.myapp-ejb.jar" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
{code}
The problem is the line
{quote}
<module name="deployment.*myapp.ear*.myapp-ejb.jar" />
{quote}
beacuse it is mandatory to use the actual ear file name.
In this situation it will be usefull to have an "alias" to indicate the containing ear, so the above line could be
{quote}
<module name="deployment.*self-ear*.myapp-ejb.jar" />
{quote}
The workaround for this issues are:
* use <ear-subdeployments-isolated>false</ear-subdeployments-isolated> and do not declare any dependencies
* use different jboss-deployment-structure.xml files with real ear file names
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (AS7-5971) Module Service Dependencies do not take transitive dependencies into account
by Stuart Douglas (JIRA)
Stuart Douglas created AS7-5971:
-----------------------------------
Summary: Module Service Dependencies do not take transitive dependencies into account
Key: AS7-5971
URL: https://issues.jboss.org/browse/AS7-5971
Project: Application Server 7
Issue Type: Bug
Components: Class Loading
Affects Versions: 7.1.3.Final (EAP)
Reporter: Stuart Douglas
Assignee: Stuart Douglas
A ModuleLoadService has dependencies on all its dependent ModuleSpecServices, however this does not work if the ModuleSpecService has a dependency on another ModuleSpecService with export=true, as the module may attempt to load before transitive dependencies have been started.
This has caused transient failures in EarClassPathTransitiveClosureTestCase.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JBWEB-253) IndexOutOfBoundsException for large PUT or POST request
by Marko Lukša (JIRA)
Marko Lukša created JBWEB-253:
---------------------------------
Summary: IndexOutOfBoundsException for large PUT or POST request
Key: JBWEB-253
URL: https://issues.jboss.org/browse/JBWEB-253
Project: JBoss Web
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossWeb-7.2.0.Alpha1
Reporter: Marko Lukša
Assignee: Remy Maucherat
NOTE: this affects version Alpha2, but Alpha2 is not available in JIRA.
The following code results in an IndexOutOfBoundsException if {{largeFile}} is larger than approximately 8k.
{code}
DefaultHttpClient client = new DefaultHttpClient();
HttpPut put = new HttpPut(url);
put.setEntity(new FileEntity(largeFile, "text/plain"));
HttpResponse response = client.execute(put);
{code}
This is the error:
{code}
17:14:52,502 ERROR [org.apache.coyote.http11] (http-127.0.0.1/127.0.0.1:8080-4) JBWEB003072: Error finishing request: java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:559) [rt.jar:1.7.0_07]
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:259) [rt.jar:1.7.0_07]
at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:404) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.InternalNioInputBuffer$InputBufferImpl.doRead(InternalNioInputBuffer.java:509) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:161) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.AbstractInternalInputBuffer.endRequest(AbstractInternalInputBuffer.java:291) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.Http11NioProcessor.endRequest(Http11NioProcessor.java:437) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:377) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:900) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:1025) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
{code}
This error does not occur on JBossAS 7.1.1.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JBRULES-3689) Organize Imports
by Simon Raess (JIRA)
Simon Raess created JBRULES-3689:
------------------------------------
Summary: Organize Imports
Key: JBRULES-3689
URL: https://issues.jboss.org/browse/JBRULES-3689
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-eclipse (expert)
Affects Versions: 5.5.0.Final
Reporter: Simon Raess
Assignee: Mark Proctor
Support "Organize Imports" [Ctrl+Shift+O] in drl editor, as we all know it from the Java editor. i.e. add missing imports (showing a dialog, if there are ambiguous matches), remove unused imports.
Additionally, when completing a class name, the editor should add an import and "complete" the unqualified name (today, the fully qualified name is added, unless there is already an import).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JBRULES-3688) Provide detailed context information for NoClassDefFoundError: Could not initialize class org.drools.rule.constraint.MvelConstraint$ExecutorHolder at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:232)
by Hendy Irawan (JIRA)
Hendy Irawan created JBRULES-3688:
-------------------------------------
Summary: Provide detailed context information for NoClassDefFoundError: Could not initialize class org.drools.rule.constraint.MvelConstraint$ExecutorHolder at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:232)
Key: JBRULES-3688
URL: https://issues.jboss.org/browse/JBRULES-3688
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.5.0.Final
Environment: Karaf
Karaf version 2.3.0
Karaf home /home/ceefour/git/bippo-commerce5/karaf
Karaf base /home/ceefour/git/bippo-commerce5/karaf
OSGi Framework org.apache.felix.framework - 4.0.3
JVM
Java Virtual Machine OpenJDK 64-Bit Server VM version 23.2-b09
Version 1.7.0_07
Vendor Oracle Corporation
Uptime 8 minutes
Total compile time 44.295 seconds
Threads
Live threads 107
Daemon threads 92
Peak 140
Total started 322
Memory
Current heap size 203,385 kbytes
Maximum heap size 466,048 kbytes
Committed heap size 283,072 kbytes
Pending objects 0
Garbage collector Name = 'PS Scavenge', Collections = 73, Time = 0.654 seconds
Garbage collector Name = 'PS MarkSweep', Collections = 2, Time = 0.366 seconds
Classes
Current classes loaded 15,546
Total classes loaded 15,547
Total classes unloaded 1
Operating system
Name Linux version 3.2.0-32-generic
Architecture amd64
Processors 8
Reporter: Hendy Irawan
Assignee: Mark Proctor
We're using Drools 5.5.0 in OSGi with: Karaf 2.3.0, Pax Wicket 1.1.1.
We experience several issues and this is one of them. Even if a fix is not in sight, I'd appreciate if a check with more detailed information can be provided at the exception point, which will be helpful for us to diagnose and for future bug report to Drools team.
The error is intermittent, together with #JBRULES-3687 during a single session it happens:
1. This bug: ~ 40%
2. #JBRULES-3687: ~ 50%
3. Success: ~ 10%
Stack:
{code}
Root cause:
java.lang.NoClassDefFoundError: Could not initialize class org.drools.rule.constraint.MvelConstraint$ExecutorHolder
at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:232)
at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:197)
at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:372)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at id.co.bippo.booking.BookingCheckRulesImpl.processBookings(BookingCheckRulesImpl.java:177)
at id.co.bippo.booking.BookingCheckRulesImpl.processFacts(BookingCheckRulesImpl.java:195)
at id.co.bippo.booking.BookingCheckRulesImpl.check(BookingCheckRulesImpl.java:147)
at id.co.bippo.booking.web.ProductBookingPanel.<init>(ProductBookingPanel.java:47)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:79)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:77)
at org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:61)
at org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)
at $Proxy80.service(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)
at org.ops4j.pax.web.service.internal.$Proxy0.service(Unknown Source)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Complete stack:
java.lang.RuntimeException: Cannot create component id.co.bippo.booking.web.ProductBookingPanel for contributor id.co.bippo.product.web.pub.ProductView/addToCartRegion from id.co.bippo.booking.web [3478]
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:189)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
{code}
Another stack trace, same root cause, different execution path:
{code}
Root cause:
java.lang.NoClassDefFoundError: Could not initialize class org.drools.rule.constraint.MvelConstraint$ExecutorHolder
at org.drools.rule.constraint.MvelConstraint.jitEvaluator(MvelConstraint.java:232)
at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:197)
at org.drools.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:169)
at org.drools.common.TripleBetaConstraints.isAllowedCachedLeft(TripleBetaConstraints.java:91)
at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:105)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
at org.drools.reteoo.FromNode.checkConstraintsAndPropagate(FromNode.java:333)
at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:164)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:232)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:116)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:372)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at id.co.bippo.booking.BookingCheckRulesImpl.processBookings(BookingCheckRulesImpl.java:177)
at id.co.bippo.booking.BookingCheckRulesImpl.processFacts(BookingCheckRulesImpl.java:195)
at id.co.bippo.booking.BookingCheckRulesImpl.check(BookingCheckRulesImpl.java:147)
at id.co.bippo.booking.web.ProductBookingPanel.<init>(ProductBookingPanel.java:47)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:79)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:77)
at org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:61)
at org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)
at $Proxy80.service(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)
at org.ops4j.pax.web.service.internal.$Proxy0.service(Unknown Source)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Complete stack:
java.lang.RuntimeException: Cannot create component id.co.bippo.booking.web.ProductBookingPanel for contributor id.co.bippo.product.web.pub.ProductView/addToCartRegion from id.co.bippo.booking.web [3478]
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:189)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedConstructorAccessor111.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
{code}
Bundles:
{code}
[3016] [Active ] [ ] [ ] [ 80] id.co.bippo.booking.rs (5.0.0.SNAPSHOT)
[3017] [Active ] [ ] [ ] [ 80] id.co.bippo.booking (5.0.0.SNAPSHOT)
[3173] [Active ] [ ] [Started] [ 80] berbatik_booking.xml (0.0.0)
[3192] [Active ] [ ] [Started] [ 80] berbatik_booking.rs.xml (0.0.0)
[3295] [Active ] [ ] [ ] [ 50] org.drools.api (5.5.0.Final)
[3296] [Active ] [ ] [ ] [ 50] org.drools.internalapi (5.5.0.Final)
[3297] [Active ] [ ] [ ] [ 50] org.drools.core (5.5.0.Final)
[3298] [Active ] [ ] [ ] [ 50] org.drools.compiler (5.5.0.Final)
[3299] [Active ] [ ] [ ] [ 50] org.drools.templates (5.5.0.Final)
[3478] [Active ] [Created ] [ ] [ 80] id.co.bippo.booking.web (5.0.0.SNAPSHOT)
{code}
DRL:
{code}
package id.co.bippo.booking
dialect "mvel"
import org.slf4j.Logger;
import org.joda.time.*;
import id.co.bippo.booking.*;
import id.co.bippo.booking.CheckProduct.Bookability;
import id.co.bippo.booking.CheckProduct.Confirmability;
import id.co.bippo.person.*;
import id.co.bippo.product.util.ProductUtils;
global Logger log;
global BookingDao bookingDao;
global ProductUtils productUtils;
global PersonUtils personUtils;
rule "Cek booking produk dengan qty 1, stock ada"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double() from bookingDao.findBookedQty($productId)
$availableQty : Double(this - $bookedQty >= $qty) from productUtils.getQtyByProductId($productId)
$countBook : Long(this < 100) from bookingDao.getBookCountByPersonIdToday($personId)
then
log.info("{} boleh booking {} sebanyak {} (stok tersedia: {}, sudah dibooking: {})",
{$personId, $productId, $qty, $availableQty, $bookedQty});
modify($action) {
setBookability(CheckProduct$Bookability.AVAILABLE),
setConfirmability(CheckProduct$Confirmability.AVAILABLE),
setMessage("Anda boleh melakukan booking untuk produk "+ $productId +", Terima Kasih")
}
end
rule "Check booking yang melebihi batas yang telah ditentukan, batas booking 3 per 24 jam"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$countBook : Long(this >= 100) from bookingDao.getBookCountByPersonIdToday($personId)
then
log.info("Person ID {} telah melakukan booking product sebanyak {}", {$personId, $countBook});
modify($action) {
setBookability(CheckProduct$Bookability.QUOTA_EXCEEDED),
setConfirmability(CheckProduct$Confirmability.QUOTA_EXCEEDED),
setMessage("Sorry, Cannot book product currently, you have too many bookings today");
}
end
rule "Check if product is already booked by himself (BookingDetail status: open/pending/waiting)."
activation-group "Check"
salience 15
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookingDetail : BookingDetail(booking.personId == $personId, productId == $productId, qty == $qty,
/*status in (BookingDetail$Status.OPEN, BookingDetail$Status.PENDING_WAITING) )*/
status == BookingDetail$Status.OPEN)
then
log.info("{} sudah booking {} sebanyak {}, tinggal diorder",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.ALREADY_SELF),
setConfirmability(CheckProduct$Confirmability.PLEASE_PAY_TO_ORDER),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($personId + " sudah booking " + $productId " sebanyak " + $qty + ", tinggal diorder")
}
end
rule "Check if product is already confimed by himself (BookingDetail status: pending_waiting)."
activation-group "Check"
salience 15
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookingDetail : BookingDetail(booking.personId == $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.PENDING_WAITING)
then
log.info("{} sudah booking {} sebanyak {}, tinggal diorder",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.ALREADY_SELF),
setConfirmability(CheckProduct$Confirmability.PLEASE_PAY_TO_WAIT),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($personId + " sudah booking " + $productId " sebanyak " + $qty + ", tinggal diorder")
}
end
rule "Check: Product already booked by other, AND already confirmed by yet another."
activation-group "Check"
salience 20
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double(this >= 1.0) from bookingDao.findBookedQty($productId)
$bookingDetail : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.OPEN)
$bookingDetail2 : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.PENDING_WAITING)
then
log.info("{} ingin booking {} sebanyak {} tapi sudah dibooking dan diconfirm 2 orang",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.BOOKED_BY_OTHER),
setConfirmability(CheckProduct$Confirmability.CONFIRMED_BY_OTHER),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($productId + " sudah dibooking dan diconfirm 2 orang customer lain.")
}
end
rule "Check the product, but the product was booked by other."
activation-group "Check"
salience 10
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double(this >= 1.0) from bookingDao.findBookedQty($productId)
$bookingDetail : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.OPEN)
then
log.info("{} ingin booking {} sebanyak {} tapi sudah dibooking orang, mau confirm dan nunggu ngga?",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.BOOKED_BY_OTHER),
setConfirmability(CheckProduct$Confirmability.MUST_CONFIRM_WAITING),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($productId + " sudah dibooking customer lain, silahkan untuk confirm waiting list.")
}
end
rule "Cek booking produk dengan qty 1, stock habis"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double() from bookingDao.findBookedQty($productId)
$availableQty : Double(this - $bookedQty < $qty) from productUtils.getQtyByProductId($productId)
then
log.info("{} tidak bisa booking {} sebanyak {} karena stok tidak cukup. Stok sekarang: {}, sudah dibooking orang: {}",
{$personId, $productId, $qty, $availableQty, $bookedQty});
modify($action) {
setBookability(CheckProduct$Bookability.OUT_OF_STOCK),
setConfirmability(CheckProduct$Confirmability.OUT_OF_STOCK),
setMessage("Maaf, produk "+ $productId + " tidak tersedia saat ini")
}
end
rule "Check booking produk dengan qty bukan 1"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty != 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
then
log.info("{} booking {} sebanyak {}. Tidak boleh! Qty harus 1",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.INVALID),
setConfirmability(CheckProduct$Confirmability.INVALID),
setMessage("Booking qty harus 1")
}
end
/*
rule "Minta booking produk, tapi tidak ada ada stock"
activation-group "Check"
salience -10
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
Double(this == null) from stockSvc.getAvailableQtyByProductId($productId)
then
log.info("{} booking {} sebanyak {}. Maaf stock tidak terdaftar!",
{$personId, $productId, $qty});
modify($action) {
setMessage("Stock produk " + $productId + " tidak terdaftar"),
setBookability(Bookability.NO_STOCK_DATA),
setConfirmability(Confirmability.NO_STOCK_DATA)
}
end
*/
rule "Minta booking produk... tak ada kriteria lain yang matching (unhandled case)"
activation-group "Check"
salience -100
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
then
log.warn("{} minta booking {} sebanyak {}, tapi tidak ada rule yang matching",
{$personId, $productId, $qty});
modify($action) {
setMessage("Internal error: " + $personId + " check booking " + $productId +
" sebanyak " + $qty + " namun tidak ada rule yang match. " +
" Mohon laporkan ke customer support."),
setBookability(CheckProduct$Bookability.ERROR),
setConfirmability(CheckProduct$Confirmability.ERROR)
}
end
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JBRULES-3687) Provide detailed context information for java.lang.NullPointerException at org.drools.reteoo.RightTuple.unlinkFromRightParent(RightTuple.java:70)
by Hendy Irawan (JIRA)
Hendy Irawan created JBRULES-3687:
-------------------------------------
Summary: Provide detailed context information for java.lang.NullPointerException at org.drools.reteoo.RightTuple.unlinkFromRightParent(RightTuple.java:70)
Key: JBRULES-3687
URL: https://issues.jboss.org/browse/JBRULES-3687
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.5.0.Final
Environment: Karaf
Karaf version 2.3.0
Karaf home /home/ceefour/git/bippo-commerce5/karaf
Karaf base /home/ceefour/git/bippo-commerce5/karaf
OSGi Framework org.apache.felix.framework - 4.0.3
JVM
Java Virtual Machine OpenJDK 64-Bit Server VM version 23.2-b09
Version 1.7.0_07
Vendor Oracle Corporation
Uptime 8 minutes
Total compile time 44.295 seconds
Threads
Live threads 107
Daemon threads 92
Peak 140
Total started 322
Memory
Current heap size 203,385 kbytes
Maximum heap size 466,048 kbytes
Committed heap size 283,072 kbytes
Pending objects 0
Garbage collector Name = 'PS Scavenge', Collections = 73, Time = 0.654 seconds
Garbage collector Name = 'PS MarkSweep', Collections = 2, Time = 0.366 seconds
Classes
Current classes loaded 15,546
Total classes loaded 15,547
Total classes unloaded 1
Operating system
Name Linux version 3.2.0-32-generic
Architecture amd64
Processors 8
Reporter: Hendy Irawan
Assignee: Mark Proctor
We're using Drools 5.5.0 in OSGi with: Karaf 2.3.0, Pax Wicket 1.1.1.
We experience several issues and this is one of them. Even if a fix is not in sight, I'd appreciate if a null check with more detailed information can be provided at the exception point, which will be helpful for us to diagnose and for future bug report to Drools team.
Stack:
{code}
java.lang.NullPointerException
at org.drools.reteoo.RightTuple.unlinkFromRightParent(RightTuple.java:70)
at org.drools.reteoo.FromNode.unlinkCreatedHandles(FromNode.java:393)
at org.drools.reteoo.FromNode.retractLeftTuple(FromNode.java:379)
at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:290)
at org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:354)
at org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:568)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:936)
at org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:924)
at org.drools.impl.StatefulKnowledgeSessionImpl.retract(StatefulKnowledgeSessionImpl.java:273)
at id.co.bippo.booking.BookingCheckRulesImpl.processBookings(BookingCheckRulesImpl.java:185)
at id.co.bippo.booking.BookingCheckRulesImpl.processFacts(BookingCheckRulesImpl.java:195)
at id.co.bippo.booking.BookingCheckRulesImpl.check(BookingCheckRulesImpl.java:147)
at id.co.bippo.booking.web.ProductBookingPanel.<init>(ProductBookingPanel.java:47)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:79)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.ops4j.pax.wicket.internal.FilterDelegator$Chain.doFilter(FilterDelegator.java:77)
at org.ops4j.pax.wicket.internal.FilterDelegator.doFilter(FilterDelegator.java:61)
at org.ops4j.pax.wicket.internal.ServletProxy$ServletInvocationHandler.invoke(ServletProxy.java:72)
at $Proxy80.service(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)
at org.ops4j.pax.web.service.internal.$Proxy0.service(Unknown Source)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Complete stack:
java.lang.RuntimeException: Cannot create component id.co.bippo.booking.web.ProductBookingPanel for contributor id.co.bippo.product.web.pub.ProductView/addToCartRegion from id.co.bippo.booking.web [3478]
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:189)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.RuntimeException: Error during booking check CheckProduct [bookability=OUT_OF_STOCK, confirmability=OUT_OF_STOCK, message=Maaf, produk zibalabel_t05 tidak tersedia saat ini, getPersonId()=arum_puspita, getProductId()=zibalabel_t05, getQty()=1.0]
at id.co.bippo.booking.BookingCheckRulesImpl.check(BookingCheckRulesImpl.java:151)
at id.co.bippo.booking.web.ProductBookingPanel.<init>(ProductBookingPanel.java:47)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.soluvas.web.site.compose.impl.LiveChildContributorImpl$1.create(LiveChildContributorImpl.java:187)
at org.soluvas.web.site.compose.ComposeUtils.compose(ComposeUtils.java:68)
at org.soluvas.web.bootstrap.BootstrapPage.onInitialize(BootstrapPage.java:302)
at org.apache.wicket.Component.fireInitialize(Component.java:933)
at org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:960)
at org.apache.wicket.Page.internalPrepareForRender(Page.java:277)
at org.apache.wicket.Component.render(Component.java:2313)
at org.apache.wicket.Page.renderPage(Page.java:1035)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:115)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:237)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
{code}
DRL:
{code}
package id.co.bippo.booking
dialect "mvel"
import org.slf4j.Logger;
import org.joda.time.*;
import id.co.bippo.booking.*;
import id.co.bippo.booking.CheckProduct.Bookability;
import id.co.bippo.booking.CheckProduct.Confirmability;
import id.co.bippo.person.*;
import id.co.bippo.product.util.ProductUtils;
global Logger log;
global BookingDao bookingDao;
global ProductUtils productUtils;
global PersonUtils personUtils;
rule "Cek booking produk dengan qty 1, stock ada"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double() from bookingDao.findBookedQty($productId)
$availableQty : Double(this - $bookedQty >= $qty) from productUtils.getQtyByProductId($productId)
$countBook : Long(this < 100) from bookingDao.getBookCountByPersonIdToday($personId)
then
log.info("{} boleh booking {} sebanyak {} (stok tersedia: {}, sudah dibooking: {})",
{$personId, $productId, $qty, $availableQty, $bookedQty});
modify($action) {
setBookability(CheckProduct$Bookability.AVAILABLE),
setConfirmability(CheckProduct$Confirmability.AVAILABLE),
setMessage("Anda boleh melakukan booking untuk produk "+ $productId +", Terima Kasih")
}
end
rule "Check booking yang melebihi batas yang telah ditentukan, batas booking 3 per 24 jam"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$countBook : Long(this >= 100) from bookingDao.getBookCountByPersonIdToday($personId)
then
log.info("Person ID {} telah melakukan booking product sebanyak {}", {$personId, $countBook});
modify($action) {
setBookability(CheckProduct$Bookability.QUOTA_EXCEEDED),
setConfirmability(CheckProduct$Confirmability.QUOTA_EXCEEDED),
setMessage("Sorry, Cannot book product currently, you have too many bookings today");
}
end
rule "Check if product is already booked by himself (BookingDetail status: open/pending/waiting)."
activation-group "Check"
salience 15
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookingDetail : BookingDetail(booking.personId == $personId, productId == $productId, qty == $qty,
/*status in (BookingDetail$Status.OPEN, BookingDetail$Status.PENDING_WAITING) )*/
status == BookingDetail$Status.OPEN)
then
log.info("{} sudah booking {} sebanyak {}, tinggal diorder",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.ALREADY_SELF),
setConfirmability(CheckProduct$Confirmability.PLEASE_PAY_TO_ORDER),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($personId + " sudah booking " + $productId " sebanyak " + $qty + ", tinggal diorder")
}
end
rule "Check if product is already confimed by himself (BookingDetail status: pending_waiting)."
activation-group "Check"
salience 15
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookingDetail : BookingDetail(booking.personId == $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.PENDING_WAITING)
then
log.info("{} sudah booking {} sebanyak {}, tinggal diorder",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.ALREADY_SELF),
setConfirmability(CheckProduct$Confirmability.PLEASE_PAY_TO_WAIT),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($personId + " sudah booking " + $productId " sebanyak " + $qty + ", tinggal diorder")
}
end
rule "Check: Product already booked by other, AND already confirmed by yet another."
activation-group "Check"
salience 20
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double(this >= 1.0) from bookingDao.findBookedQty($productId)
$bookingDetail : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.OPEN)
$bookingDetail2 : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.PENDING_WAITING)
then
log.info("{} ingin booking {} sebanyak {} tapi sudah dibooking dan diconfirm 2 orang",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.BOOKED_BY_OTHER),
setConfirmability(CheckProduct$Confirmability.CONFIRMED_BY_OTHER),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($productId + " sudah dibooking dan diconfirm 2 orang customer lain.")
}
end
rule "Check the product, but the product was booked by other."
activation-group "Check"
salience 10
when
$action : CheckProduct( $personId : personId, $productId: productId, $qty: qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double(this >= 1.0) from bookingDao.findBookedQty($productId)
$bookingDetail : BookingDetail(booking.personId != $personId, productId == $productId, qty == $qty,
status == BookingDetail$Status.OPEN)
then
log.info("{} ingin booking {} sebanyak {} tapi sudah dibooking orang, mau confirm dan nunggu ngga?",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.BOOKED_BY_OTHER),
setConfirmability(CheckProduct$Confirmability.MUST_CONFIRM_WAITING),
setBooker(personUtils.getPersonRefById($bookingDetail.booking.personId)),
setMessage($productId + " sudah dibooking customer lain, silahkan untuk confirm waiting list.")
}
end
rule "Cek booking produk dengan qty 1, stock habis"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty == 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
$bookedQty : Double() from bookingDao.findBookedQty($productId)
$availableQty : Double(this - $bookedQty < $qty) from productUtils.getQtyByProductId($productId)
then
log.info("{} tidak bisa booking {} sebanyak {} karena stok tidak cukup. Stok sekarang: {}, sudah dibooking orang: {}",
{$personId, $productId, $qty, $availableQty, $bookedQty});
modify($action) {
setBookability(CheckProduct$Bookability.OUT_OF_STOCK),
setConfirmability(CheckProduct$Confirmability.OUT_OF_STOCK),
setMessage("Maaf, produk "+ $productId + " tidak tersedia saat ini")
}
end
rule "Check booking produk dengan qty bukan 1"
activation-group "Check"
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty != 1.0,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
then
log.info("{} booking {} sebanyak {}. Tidak boleh! Qty harus 1",
{$personId, $productId, $qty});
modify($action) {
setBookability(CheckProduct$Bookability.INVALID),
setConfirmability(CheckProduct$Confirmability.INVALID),
setMessage("Booking qty harus 1")
}
end
/*
rule "Minta booking produk, tapi tidak ada ada stock"
activation-group "Check"
salience -10
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
Double(this == null) from stockSvc.getAvailableQtyByProductId($productId)
then
log.info("{} booking {} sebanyak {}. Maaf stock tidak terdaftar!",
{$personId, $productId, $qty});
modify($action) {
setMessage("Stock produk " + $productId + " tidak terdaftar"),
setBookability(Bookability.NO_STOCK_DATA),
setConfirmability(Confirmability.NO_STOCK_DATA)
}
end
*/
rule "Minta booking produk... tak ada kriteria lain yang matching (unhandled case)"
activation-group "Check"
salience -100
when
$action : CheckProduct( $personId : personId, $productId : productId, $qty : qty,
bookability == Bookability.NEW,
confirmability == Confirmability.NEW)
then
log.warn("{} minta booking {} sebanyak {}, tapi tidak ada rule yang matching",
{$personId, $productId, $qty});
modify($action) {
setMessage("Internal error: " + $personId + " check booking " + $productId +
" sebanyak " + $qty + " namun tidak ada rule yang match. " +
" Mohon laporkan ke customer support."),
setBookability(CheckProduct$Bookability.ERROR),
setConfirmability(CheckProduct$Confirmability.ERROR)
}
end
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (AS7-5062) PersistenceUnitRootURL for JPA providers may not be spec compliant
by Craig Ringer (JIRA)
Craig Ringer created AS7-5062:
---------------------------------
Summary: PersistenceUnitRootURL for JPA providers may not be spec compliant
Key: AS7-5062
URL: https://issues.jboss.org/browse/AS7-5062
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.1.1.Final
Environment: $ java -version
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (fedora-2.2.1.fc17.8-x86_64)
OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)
$ uname -a
Linux ayaki.localdomain 3.4.2-4.fc17.x86_64 #1 SMP Thu Jun 14 22:22:05 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Reporter: Craig Ringer
Assignee: Scott Marlow
Discussion on the EclipseLink bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=383200 ("On JBoss AS 7, EclipseLink doesn't find entity classes unless they're explicitly listed in persistence.xml") suggests that JBoss AS 7 may not be providing a spec-compliant PersistenceUnitRootURL or contents.
EclipseLink can't scan the contents of a deployment for @Entity annotated classes, so it doesn't find any entities unless they're explicitly named in persistence.xml .
http://docs.oracle.com/javaee/6/api/javax/persistence/spi/PersistenceUnit... states:
{quote}
java.net.URL getPersistenceUnitRootUrl()
Returns the URL for the jar file or directory that is the root of the persistence unit. (If the persistence unit is rooted in the WEB-INF/classes directory, this will be the URL of that directory.) The URL will either be a file: URL referring to a jar file or referring to a directory that contains an exploded jar file, or some other URL from which an InputStream in jar format can be obtained.
*Returns*: a URL referring to a jar file or directory
{quote}
... and that's what EclipseLink expects. However, for EclipseLink class scanning to function correctly an adapter class must be provided, such as the classes provided here:
https://community.jboss.org/wiki/HowToUseEclipseLinkWithAS7
to integrate EclipseLink with JBoss's VFS.
It may be worth investigating why this is necessary and whether the current behavior is standards compliant.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (AS7-5474) Url returned by PersistenceUnitInfo#getPersistenceUnitRootUrl() point to an empty folder
by Adriano Verona (JIRA)
Adriano Verona created AS7-5474:
-----------------------------------
Summary: Url returned by PersistenceUnitInfo#getPersistenceUnitRootUrl() point to an empty folder
Key: AS7-5474
URL: https://issues.jboss.org/browse/AS7-5474
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.2.0.Alpha1
Environment: $ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
Windows 7 x64
Reporter: Adriano Verona
Assignee: Scott Marlow
When setting "jboss.as.jpa.vfs" property to false in persistence.xml PersistenceUnitInfo#getPersistenceUnitRootUrl() returns an Url that points to an empty folder (named "Contents"). The parent of this folder does holds the application jar.
file:/D:/Java/jboss-as-7.2.0.Alpha1/standalone/tmp/vfs/temp9c270668d311f0c4/vjpa_jboss_example.jar-7ef91a4c66eeff18/contents/
Observed this at PersistenceProvider#createContainerEntityManagerFactory() method call.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months