testdriven / psi-probe

Advanced manager and monitor for Apache Tomcat, forked from Lambda Probe
8 stars 1 forks source link

Tomcat 7.0.54 Psi probe not listing global datasource configured on server.xml #411

Open padcom opened 9 years ago

padcom commented 9 years ago

From gkatzio...@gmail.com on June 02, 2014 21:38:39

What steps will reproduce the problem? 1. Download apache-tomcat-7.0.54.tar.gz

  1. tar xvf apache-tomcat-7.0.54.tar.gz
  2. Change tomcat-users.xml and set manager-gui role on tomcat
  3. Place latest mysql connector (mysql-connector-java-5.1.30.jar) inside lib
  4. Install psi-probe
  5. configure datasource on server.xml by adding inside the tag the configuration

<Resource name="jdbc/test" auth="Container"
type="javax.sql.DataSource"
maxActive="4" minActive="1" maxIdle="2" maxWait="10000" username="username" password="password" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test"
validationQuery="SELECT 1" testOnBorrow="true" /> What is the expected result? When I login to probe and go to http://localhost:8080/probe/datasources.htm I should see the jdbc/test as a global configured datasource What happens instead? However the response is "There are no data sources configured for this Tomcat instance " What version of Probe are you using? 2.3.3. What environment (browser version, Tomcat version, JVM version, server OS)? Java version Java 1.7.0_51, Tomcat 7.0.54 Please provide any additional information below. Considering Tomcat 7.0.54

If add a resource link on the conf/context.xml file

<ResourceLink type="javax.sql.DataSource" name="jdbc/test" global="jdbc/test"/>

Then on the datasources page I see a listing with each application linking to the jdbc/test datasource defined on the server.xml (Auth Linking).

Also defining the datasource on the conf/context.xml file is successful too. I add the same configuration on the conf/context.xml and on the datasources page I see a listing with each application having it's own jdbc/test datasource.

The exceptions that i get

02 Jun 2014 22:29:04 [http-bio-8000-exec-5] ERROR com.googlecode.psiprobe.beans.ResourceResolverBean - Failed to lookup: UserDatabase javax.naming.NameNotFoundException: Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase]. at org.apache.naming.NamingContext.lookup(NamingContext.java:819) at org.apache.naming.NamingContext.lookup(NamingContext.java:167) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156) at javax.naming.InitialContext.lookup(InitialContext.java:417) at com.googlecode.psiprobe.beans.ResourceResolverBean.lookupResource(ResourceResolverBean.java:148) at com.googlecode.psiprobe.beans.ResourceResolverBean.getApplicationResources(ResourceResolverBean.java:69) at com.googlecode.psiprobe.beans.ContainerWrapperBean.getGlobalDataSources(ContainerWrapperBean.java:183) at com.googlecode.psiprobe.controllers.datasources.ListAllJdbcResourcesController.handleRequestInternal(ListAllJdbcResourcesController.java:32) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at com.googlecode.psiprobe.ProbeServlet.doDispatch(ProbeServlet.java:54) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:744)

02 Jun 2014 22:29:04 [http-bio-8000-exec-5] INFO com.googlecode.psiprobe.beans.ResourceResolverBean - reading resource: Catalina:type=Resource,resourcetype=Global,class=javax.sql.DataSource,name="jdbc/test" 02 Jun 2014 22:29:04 [http-bio-8000-exec-5] ERROR com.googlecode.psiprobe.beans.ResourceResolverBean - Failed to lookup: jdbc/protoporia javax.naming.NameNotFoundException: Name [jdbc/test] is not bound in this Context. Unable to find [jdbc]. at org.apache.naming.NamingContext.lookup(NamingContext.java:819) at org.apache.naming.NamingContext.lookup(NamingContext.java:167) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156) at javax.naming.InitialContext.lookup(InitialContext.java:417) at com.googlecode.psiprobe.beans.ResourceResolverBean.lookupResource(ResourceResolverBean.java:148) at com.googlecode.psiprobe.beans.ResourceResolverBean.getApplicationResources(ResourceResolverBean.java:69) at com.googlecode.psiprobe.beans.ContainerWrapperBean.getGlobalDataSources(ContainerWrapperBean.java:183) at com.googlecode.psiprobe.controllers.datasources.ListAllJdbcResourcesController.handleRequestInternal(ListAllJdb...

Original issue: http://code.google.com/p/psi-probe/issues/detail?id=411

padcom commented 9 years ago

From gkatzio...@gmail.com on June 02, 2014 15:05:38

Please ignore the line: Failed to lookup: jdbc/protoporia, It should be jdbc/test. Error on copy paste

padcom commented 9 years ago

From bit.b...@gmail.com on July 10, 2014 01:08:44

I have exactly the same Problem. tomcat 7.0.54 / jdk 1.7.0_51 on linux Any idea ?

padcom commented 9 years ago

From nizar.sa...@gmail.com on July 10, 2014 04:49:33

Hi,

I have exactly the same Problem. Tomcat 7.0.54 / 1.6.0_29-b11 on Windows Server 2008 R2 Please help.

Nizar.

padcom commented 9 years ago

From MALfunct...@gmail.com on July 10, 2014 11:52:35

Issue 413 has been merged into this issue.

padcom commented 9 years ago

From MALfunct...@gmail.com on July 28, 2014 06:05:35

Issue 413 has been merged into this issue.

padcom commented 9 years ago

From nizar.sa...@gmail.com on August 05, 2014 02:22:21

Hi,

Any news about this issue ?

Thanks.

Nizar.

padcom commented 9 years ago

From daniel.t...@port.ac.uk on August 08, 2014 04:24:17

Getting the same error on Tomcat 7.0.54 and Tomcat 7.0.55 Found this in the change log "fix 56451: Make resources accessed via a context alias accessible via JNDI in the same way standard resources are available. (markt)" for the 7.0.54 release.

Looks like something changed in regards to the way you call org.apache.naming.SelectorContext.lookup but could be wrong. Hope this gets sorted soon as I want to upgrade from Tomcat 7.0.53 to Tomcat 7.0.55 but I need Probe for easier database monitoring.