|
数据库版本5.5 与 5.6 版本都试过。不行。。求解!!!!!!!!!!!!!!本地测试正常,说明baas是无问题的。
http://localhost:8080/baas/joeshop/joeshop/queryImgdata
HTTP Status 500 - 执行Action:joeshop/joeshop/queryImgdata失败,Action[joeshop/joeshop/queryImgdata]执行失败,获取数据库[java:comp/env/joeshop]连接失败,可能原因:数据库已经关闭或者数据源配置错误
配置图:
1: 将baassever 拷到 服务器 tomcat 7 ,webpage 改名 baas (baas本地测试没问题)
2: 修改apache-tomcat-7.0.86\conf\context.xm\
<Resource name="joeshop" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/joeshop" username="root" password="joe2017" maxActive="10" maxIdle="5"/>
3: mysql 驱动mysql-connector-java-5.1.36-bin.jar 拷到tomcat 7\lib 下
4: 启动tomcat 无报错
《日志》
五月 10, 2018 5:47:41 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\Web\apache-tomcat-7.0.86\webapps\baas
五月 10, 2018 5:47:46 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 10, 2018 5:47:46 下午 org.apache.catalina.core.NamingContextListener addResource
警告: 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]
五月 10, 2018 5:47:46 下午 org.apache.catalina.core.NamingContextListener addResource
警告: 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]
五月 10, 2018 5:47:46 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Web\apache-tomcat-7.0.86\webapps\baas has finished in 4,998 ms
baas 本地测试
http://127.0.0.1:8080/baas/joeshop/joeshop/queryImgdata
{"@type":"table","rows":[{"fImgUrl":{"value":"./detail.w"},"fUrl":{"value":"./images/main/img/carouselBox62.jpg"},"id":{"value":1},"userdata":{"recordState":"none"}}
|
|