sql2 = "INNER JOIN (SELECT DISTINCT idno FROM safe WHERE certificatename='"+certificatename.toString().trim()+"') b ON a.idno=b.idno";
这是处理那段sql语句的java代码.
...全文
40617打赏收藏
mysql查询,同一语句,程序里查询错误,数据库里查询成功
sql2 = "INNER JOIN (SELECT DISTINCT idno FROM safe WHERE certificatename='"+certificatename.toString().trim()+"') b ON a.idno=b.idno"; 这是处理那段sql语句的java代码.
贴出报错信息吧[/quote]
七月 04, 2016 9:20:45 上午 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Users\Administrator\AppData\Local\MyEclipse 2016 CI\binary\com.sun.java.jdk8.win32.x86_64_1.8.0.u66\bin;E:\Users\Administrator\AppData\Local\MyEclipse 2016 CI\plugins\com.genuitec.eclipse.server.embedded.tomcat.core_13.0.0.me201602031002\tomcat70\bin
七月 04, 2016 9:20:46 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
七月 04, 2016 9:20:46 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
七月 04, 2016 9:20:46 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 829 ms
七月 04, 2016 9:20:46 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
七月 04, 2016 9:20:46 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.56
七月 04, 2016 9:20:46 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\contract89
七月 04, 2016 9:20:46 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\contract89 has finished in 596 ms
七月 04, 2016 9:20:46 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\crm
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\crm has finished in 468 ms
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\docs
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\docs has finished in 40 ms
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\examples
七月 04, 2016 9:20:47 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
七月 04, 2016 9:20:47 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
七月 04, 2016 9:20:47 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@799a618c')
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\examples has finished in 422 ms
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\host-manager
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\host-manager has finished in 44 ms
七月 04, 2016 9:20:47 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\jsp
七月 04, 2016 9:20:47 上午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\jsp\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
七月 04, 2016 9:20:49 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
七月 04, 2016 9:20:49 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\jsp has finished in 5,690 ms
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\manager
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\manager has finished in 57 ms
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\person
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\person has finished in 211 ms
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\ROOT
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\myeclipse\Workspaces\MyEclipse 2016 CI\.metadata\.me_tcat7\webapps\ROOT has finished in 32 ms
七月 04, 2016 9:20:53 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
七月 04, 2016 9:20:53 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
七月 04, 2016 9:20:53 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 7683 ms
Mon Jul 04 09:21:29 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Mon Jul 04 09:21:29 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
```````````````mainpersonlist.jsp``````````````
查询成功`````````
Mon Jul 04 09:23:16 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Mon Jul 04 09:23:23 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
````sql:````:select a.id,a.name,a.idno,a.area,a.worktype,a.classify,a.education,a.rank,a.remark from person a INNER JOIN (SELECT DISTINCT idno FROM safe) b ON a.idno=b.idno
开始查询```````
开始查询```````
开始查询```````
开始查询```````
```````````````mainpersonlist.jsp``````````````
查询成功`````````
Mon Jul 04 09:23:26 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Mon Jul 04 09:23:29 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
startsWith``` DAO````````安全````````````子项
````sql:````:select a.id,a.name,a.idno,a.area,a.worktype,a.classify,a.education,a.rank,a.remark from person a INNER JOIN (select DISTINCT idno FROM safe where certificatename='交安') b ON a.idno=b.idno
startsWith```````````安全````````````子项
```````````````mainpersonlist.jsp``````````````
查询失败`````````
===============================================================
没报错信息.