[ 
https://issues.apache.org/jira/browse/OFBIZ-865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491144
 ] 

David E. Jones commented on OFBIZ-865:
--------------------------------------

I just reviewed this patch.

The OFBIZ-865.patch should NOT be committed. The fix should be in the Service 
Engine code that parses the XML file rather than in the low level XML reading 
utility code which would have side effects across the project if it was applied.

This issue is still open, but please no one apply this patch.

Victor: if you have time to look at the service engine code that parses this 
element, please feel free to submit another patch. If not, no problem, this 
will be reviewed and fixed later.

> Deploy exception when "serviceengine.xml" contains resource-loader
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-865
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-865
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>    Affects Versions: SVN trunk
>            Reporter: Victor Polischuk
>            Priority: Minor
>         Attachments: OFBIZ-865.patch
>
>
> If in "serviceengine.xml" uses internal <resource-loader>, 
> org.ofbiz.base.config.ResourceLoader could not found it, because 
> <resource-loader> does not exists in root element <service-config> (now it 
> has been moved into <service-engine>).
> For example: 
> <service-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>         
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/service-config.xsd";>
>     <service-engine name="default">
>            ...
>            <resource-loader name="service-classloader" class="..."/>
>            <global-services loader = "service-classloader" location = 
> "..../services.xml" /> 
>            ...
>     </service-engine>
> </service-config>
> java.lang.IllegalArgumentException: ResourceLoader not found with name 
> [service-classloader] in serviceengine.xml
>         at 
> org.ofbiz.base.config.ResourceLoader.loadResource(ResourceLoader.java:47)
>         at 
> org.ofbiz.base.config.MainResourceHandler.getStream(MainResourceHandler.java:75)
>         at 
> org.ofbiz.base.config.MainResourceHandler.getDocument(MainResourceHandler.java:64)
>         at 
> org.ofbiz.service.ModelServiceReader.getModelServices(ModelServiceReader.java:125)
>         at 
> org.ofbiz.service.ModelServiceReader.<init>(ModelServiceReader.java:100)
>         at 
> org.ofbiz.service.ModelServiceReader.getModelServiceMap(ModelServiceReader.java:81)
>         at 
> org.ofbiz.service.DispatchContext.getGlobalServiceMap(DispatchContext.java:309)
>         at 
> org.ofbiz.service.DispatchContext.loadReaders(DispatchContext.java:79)
>         at 
> org.ofbiz.service.GenericDispatcher.init(GenericDispatcher.java:127)
>         at 
> org.ofbiz.service.GenericDispatcher.<init>(GenericDispatcher.java:115)
>         at 
> org.ofbiz.service.GenericDispatcher.getLocalDispatcher(GenericDispatcher.java:75)
>         at 
> org.ofbiz.service.GenericDispatcher.getLocalDispatcher(GenericDispatcher.java:39)
>         at 
> org.ofbiz.entityext.EntityServiceFactory.getLocalDispatcher(EntityServiceFactory.java:34)
>         at 
> org.ofbiz.entityext.EntityServiceFactory.getDispatchContext(EntityServiceFactory.java:39)
>         at 
> org.ofbiz.entityext.eca.DelegatorEcaHandler.setDelegator(DelegatorEcaHandler.java:53)
>         at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:234)
>         at 
> org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:116)
>         at 
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:163)
>         at 
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:141)
>         at 
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:65)
>         at org.ofbiz.base.start.Start.initStartLoaders(Start.java:248)
>         at org.ofbiz.base.start.Start.init(Start.java:87)
>         at org.ofbiz.base.start.Start.main(Start.java:403)
> Solution: change the org.ofbiz.base.util.UtilXml.firstChildElement(Element, 
> String, String, String).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to