{"action":"created","issue":{"url":"https://api.github.com/repos/kensiprell/grails-drools/issues/3","labels_url":"https://api.github.com/repos/kensiprell/grails-drools/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kensiprell/grails-drools/issues/3/comments","events_url":"https://api.github.com/repos/kensiprell/grails-drools/issues/3/events","html_url":"https://github.com/kensiprell/grails-drools/issues/3","id":68853065,"number":3,"title":"WildFly: KModuleBeanFactoryPostProcessor fails to create beans","user":{"login":"B5A7","id":8788328,"avatar_url":"https://avatars.githubusercontent.com/u/8788328?v=3","gravatar_id":"","url":"https://api.github.com/users/B5A7","html_url":"https://github.com/B5A7","followers_url":"https://api.github.com/users/B5A7/followers","following_url":"https://api.github.com/users/B5A7/following{/other_user}","gists_url":"https://api.github.com/users/B5A7/gists{/gist_id}","starred_url":"https://api.github.com/users/B5A7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B5A7/subscriptions","organizations_url":"https://api.github.com/users/B5A7/orgs","repos_url":"https://api.github.com/users/B5A7/repos","events_url":"https://api.github.com/users/B5A7/events{/privacy}","received_events_url":"https://api.github.com/users/B5A7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-04-16T06:09:29Z","updated_at":"2015-04-23T13:01:42Z","closed_at":null,"body":"Hi \r\n\r\nJust trying to deploy grails-drools-sample-master to wildfly (or tomcat).  \r\n[2015-04-16 02:47:32,061] Artifact grails-drools-sample-1.0.0.war: Error during artifact deployment. See server log for details.\r\n[2015-04-16 02:47:32,062] Artifact grails-drools-sample-1.0.0.war: java.lang.Exception: {\"JBAS014671: Failed services\" => {\"jboss.undertow.deployment.default-server.default-host.\\\"/grails-drools-sample-1.0.0\\\"\" => \"org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\\\"/grails-drools-sample-1.0.0\\\": Failed to start service\r\n    Caused by: java.lang.RuntimeException: org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.RuntimeException: Unable to get all ZipFile entries: \\\\Dev\\\\wildfly-8.2.0.Final\\\\bin\\\\src\\\\resources\r\n    Caused by: org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.RuntimeException: Unable to get all ZipFile entries: \\\\Dev\\\\wildfly-8.2.0.Final\\\\bin\\\\src\\\\resources\r\n    Caused by: java.lang.RuntimeException: Unable to get all ZipFile entries: \\\\Dev\\\\wildfly-8.2.0.Final\\\\bin\\\\src\\\\resources\r\n    Caused by: java.io.FileNotFoundException: \\\\Dev\\\\wildfly-8.2.0.Final\\\\bin\\\\src\\\\resources (The system cannot find the path specified)\"}}\r\n\r\nGrailsRuntimeConfigurator is used to create the initial context that is eventually used for the instantiation of the bean so I suspect that I am missing some (container?) configuration.  \"\\\\Dev\\\\wildfly-8.2.0.Final\\\\bin\" is an example of what is usually returned as the current directory, by the File class in Java.  Something like grailsApplication.parentContext.getResource('WEB-INF').file.absolutePath should be inserted before \"\\\\src\\\\resources\"?\r\n\r\nAlmost exactly the same error has been reported here - http://stackoverflow.com/questions/25561342/drools-spring-integration-error-is-it-a-bug-for-the-class-kmodulebeanfactorypo, except this doesn't use grails!  So, I could probably report this somewhere else but, I just cannot figure out where.  Maybe Spring.  Probably not https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-spring because that code is just using what is passed to it?  Which brings me back to container configuration - I can't recall pre-spring when we had to set this.\r\n\r\nFinal thought.  KModuleBeanFactoryPostProcessor(URL configFileURL, String configFilePath) is being called, rather than KModuleBeanFactoryPostProcessor(), which would normally go on to call initConfigFilePath() but in this case, is not being called.  I thought perhaps I would play around with the configuration of the bean but I couldn't stop the _Events script from overwriting my changes, despite setting grails.plugin.drools.configurationType = \"droolsContextXml\".\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/kensiprell/grails-drools/issues/comments/95577149","html_url":"https://github.com/kensiprell/grails-drools/issues/3#issuecomment-95577149","issue_url":"https://api.github.com/repos/kensiprell/grails-drools/issues/3","id":95577149,"user":{"login":"B5A7","id":8788328,"avatar_url":"https://avatars.githubusercontent.com/u/8788328?v=3","gravatar_id":"","url":"https://api.github.com/users/B5A7","html_url":"https://github.com/B5A7","followers_url":"https://api.github.com/users/B5A7/followers","following_url":"https://api.github.com/users/B5A7/following{/other_user}","gists_url":"https://api.github.com/users/B5A7/gists{/gist_id}","starred_url":"https://api.github.com/users/B5A7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B5A7/subscriptions","organizations_url":"https://api.github.com/users/B5A7/orgs","repos_url":"https://api.github.com/users/B5A7/repos","events_url":"https://api.github.com/users/B5A7/events{/privacy}","received_events_url":"https://api.github.com/users/B5A7/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T13:01:42Z","updated_at":"2015-04-23T13:01:42Z","body":"Couple of other items:\r\n1. Regarding \"The intent behind the buildKieBase method is to \"reuse\" the rule file, overwriting it each time. The KieFileSystem API doc refers to it as an in-memory file system, so I assumed it's not writing to a physical device. However, it appears the path must reflect a real path because it failed when I deployed it to Tomcat. I'll have to add this to my to-investigate list\". I made the mistake of thinking that the first parameter is important but i think it can be pretty much anything. /src/... was just a convention that had its roots in the maven project structure. I think it can pretty much be anything. It is just stored in memory. The issue was with the second parameter, the resource object, which wasn't being instatiated correctly, as identified above.\r\n2. I am pretty new to github but in terms of source control it is probably worthwhile tagging each release. It took me a while to track down the previous issue as i couldn't easily see what was contained in each release. I had to work back using dates for releases."}}