{"action":"created","issue":{"url":"https://api.github.com/repos/akhikhl/gretty/issues/234","repository_url":"https://api.github.com/repos/akhikhl/gretty","labels_url":"https://api.github.com/repos/akhikhl/gretty/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/akhikhl/gretty/issues/234/comments","events_url":"https://api.github.com/repos/akhikhl/gretty/issues/234/events","html_url":"https://github.com/akhikhl/gretty/issues/234","id":125650417,"number":234,"title":"Missing DBCP 2 libraries using Tomcat 8 container","user":{"login":"sargue","id":333808,"avatar_url":"https://avatars.githubusercontent.com/u/333808?v=3","gravatar_id":"","url":"https://api.github.com/users/sargue","html_url":"https://github.com/sargue","followers_url":"https://api.github.com/users/sargue/followers","following_url":"https://api.github.com/users/sargue/following{/other_user}","gists_url":"https://api.github.com/users/sargue/gists{/gist_id}","starred_url":"https://api.github.com/users/sargue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sargue/subscriptions","organizations_url":"https://api.github.com/users/sargue/orgs","repos_url":"https://api.github.com/users/sargue/repos","events_url":"https://api.github.com/users/sargue/events{/privacy}","received_events_url":"https://api.github.com/users/sargue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-08T17:04:20Z","updated_at":"2016-02-26T14:54:27Z","closed_at":null,"body":"I am trying to run tomcat through gretty (Tomcat 8). The application uses a JDBC pool using standard Tomcat 8 configuration. Unfortunately an error prevents Tomcat from starting.\r\n\r\n17:45:47 WARN  Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory]\r\n\r\n17:45:47 ERROR Exception processing Global JNDI Resources\r\n\r\nBetween Tomcat 7 and Tomcat 8 there are changes on the DBCP classes used. See the [upgrading guide](http://tomcat.apache.org/migration-8.html). Apache Commons DBCP 2.x is used instead of 1.x. Perhaps that is the problem.\r\n\r\nTo trigger the problem you just need an app who tries to use a pool.\r\n\r\nTomcat's server.xml:\r\n```\r\n<?xml version='1.0' encoding='utf-8'?>\r\n<Server port=\"8005\" shutdown=\"SHUTDOWN\">\r\n    <Listener className=\"org.apache.catalina.startup.VersionLoggerListener\" />\r\n    <Listener className=\"org.apache.catalina.core.JreMemoryLeakPreventionListener\" />\r\n    <Listener className=\"org.apache.catalina.mbeans.GlobalResourcesLifecycleListener\" />\r\n    <Listener className=\"org.apache.catalina.core.ThreadLocalLeakPreventionListener\" />\r\n\r\n    <GlobalNamingResources>\r\n        <Resource name=\"jdbc/resourcename\" auth=\"Container\" type=\"javax.sql.DataSource\" username=\"someuser\"\r\n                  password=\"somepassword\" driverClassName=\"org.gjt.mm.mysql.Driver\"\r\n                  url=\"jdbc:mysql://localhost/somedatabase\" />\r\n    </GlobalNamingResources>\r\n    <Service name=\"Catalina\">\r\n        <Connector port=\"8080\" protocol=\"HTTP/1.1\" connectionTimeout=\"20000\" />\r\n        <Engine name=\"Catalina\" defaultHost=\"localhost\">\r\n            <Host name=\"localhost\"  appBase=\"webapps\"\r\n                  unpackWARs=\"true\" autoDeploy=\"true\">\r\n            </Host>\r\n        </Engine>\r\n    </Service>\r\n</Server>\r\n```\r\n\r\nApp context.xml:\r\n```\r\n<?xml version='1.0' encoding='utf-8'?>\r\n<Context>\r\n    <ResourceLink global=\"jdbc/resourcename\" name=\"jdbc/resourcename\" type=\"javax.sql.DataSource\"/>\r\n</Context>\r\n```"},"comment":{"url":"https://api.github.com/repos/akhikhl/gretty/issues/comments/189312233","html_url":"https://github.com/akhikhl/gretty/issues/234#issuecomment-189312233","issue_url":"https://api.github.com/repos/akhikhl/gretty/issues/234","id":189312233,"user":{"login":"sargue","id":333808,"avatar_url":"https://avatars.githubusercontent.com/u/333808?v=3","gravatar_id":"","url":"https://api.github.com/users/sargue","html_url":"https://github.com/sargue","followers_url":"https://api.github.com/users/sargue/followers","following_url":"https://api.github.com/users/sargue/following{/other_user}","gists_url":"https://api.github.com/users/sargue/gists{/gist_id}","starred_url":"https://api.github.com/users/sargue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sargue/subscriptions","organizations_url":"https://api.github.com/users/sargue/orgs","repos_url":"https://api.github.com/users/sargue/repos","events_url":"https://api.github.com/users/sargue/events{/privacy}","received_events_url":"https://api.github.com/users/sargue/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T14:54:27Z","updated_at":"2016-02-26T14:54:27Z","body":"Added `'org.apache.tomcat:tomcat-dbcp:8.0.23'` which contains de class but I'm seeing the same error.\r\n\r\nAnyway I don't understand why a `providedCompile` should work, but of course I don't really know how the plugin works."}}