- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
![out put from cf logs app-name --recent] 1我在基于后端的应用程序中开发了 spring/hibernate-MySQL。我已经在本地机器上成功测试了该应用程序。但是当我将应用程序上传到IBM bluemix时,当我访问service-->Dao方法时,到处都出现异常。它说 org.hibernate.exception.SQLGrammarException 声明类似于“SELECT 命令被拒绝给用户'username@75.126.83.16'。有趣的是,当我放置一个没有 Hibernate/spring Dao 的普通 JSP 但使用相同的连接字符串时,它可以工作.
Here is the spring-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="pojos" />
<bean id="adminService" class="pojos.AdminService">
<property name="adminDao" ref="adminDao" />
</bean>
.. Other Service class bean's info....
<bean id="adminDao" class="pojos.AdminDao">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="fieldOfficerDao" class="pojos.FieldOfficerDao">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="questionMasterDao" class="pojos.QuestionMasterDao">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
.. Other Dao class bean's info....
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>pojos/Admin.hbm.xml </value>
... And other hbm files...
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.current_session_context_class">thread</prop>
</props>
</property>
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://192.155.247.251:3307/<DB-Name>" />
<property name="username" value="<DB-User-Name>" />
<property name="password" value="<DB-Password>" />
</bean>
<bean id="dbUtil"
class="pojos.DbUtil"
init-method="initialize">
<property name="dataSource" ref="dataSource" />
</bean>
最佳答案
我刚刚从每个 .hbm.xml 文件的类标记中删除了目录属性。该属性是可选的,它包含 MySQL 的架构名称。以前是这样的
<class name="pojos.Admin" table="admin" catalog="merca">
但现在是
<class name="pojos.Admin" table="admin">
关于mysql - bluemix 服务器在 MySQL 中给出 SQLGrammarException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32308594/
我是 IBM Bluemix 的新手,到目前为止,应用程序(Spring-Hibernate-Rest App)运行在 Oracle 生态系统的 Tomcat Apache 服务器上,但由于一些需求变
我正在尝试使用Kubenetes插件安装最新的Bluemix容器服务。但是,我得到以下消息。跟着DOC - container service ocmbpro:~ ochen$ bx plugin i
我有一个连接 Bluemix Message Hub 的 liberty 应用程序。它在本地运行良好,但是当我从 Bluemix Liberty 运行 liberty 应用程序时,它永远不会运行。我正
我正在尝试连接 Bluemix Liberty 容器并使用 Bluemix session 缓存服务。 到目前为止我做了什么: 创建桥接应用程序并添加 session 缓存服务 创建 Liberty
我有一个部署到 IBM Bluemix (IBM Cloud) 的 Node JS Cloud Foundry 应用程序,我正在为它使用我自己的个人域。使用 letsencrypt 创建证书,我为 B
这是一个我要自己回答的问题,因为我已经看过无数次了,它确实应该算作一个FAQ。 假设您已经创建了一个 Flask 或 Django 应用程序,并且它在您的测试环境中工作 - 在 bluemix 之外和
我已经在 IBM Bluemix 上创建了一个 ClearDB MySQL 实例。我可以在不将实例绑定(bind)到 Bluemix 上运行的应用程序的情况下查看凭据(主机名、用户名、密码等)吗? 谢
我正在尝试使用 Bluemix 作为服务器开发一个 Android 应用程序。请向我展示示例代码以及从 android 客户端注册以将数据存储在 cloudant 数据库中的简单用例。我对安卓客户端很
我正在 Bluemix 中部署 node.js,基本上是从 parse.com 迁移到 Bluemix。 下面的错误是什么意思?我该如何解决?我正在使用 CF 命令行工具。下面附上日志。///////
我有一个 bluemix 应用程序,当前通过 PHP 使用 ClearDB MySQL 3rd party bluemix 服务进行设置。该服务运行良好,但我注意到免费版本的空间限制为 5mb(您可以
我们尝试通过运行来测试 IBM Bluemix Cloud 和 Watson Cloud 我们帐户中的几个 Watson Cloud 演示 node.js 应用程序,我们 注意到以下情况: 在我们的帐
我有一个在 IBM Bluemix 上运行的简单 JSF 应用程序,与以下 J2EE 依赖项配合良好。 javax javaee-web-api 6.
我正在使用公共(public) Bluemix。我在 Bluemix 中使用我的 IBM ID 供应了一个 dashDB 服务实例。我还提供了对象存储服务。我想将文件从对象存储加载到 dashDB。
每个组织是否允许多个空间? 空间是用来分隔项目的吗? 在 Bluemix 上使用组织和空间的最佳实践是什么? 通过 eclipse : 通过浏览器: 最佳答案 居然还有Bluemix document
我在登录 IBM Bluemix 时遇到注册失败即使我创建了一个 IBM 有效帐户。我已经提供了我的电话号码和有效的电子邮件地址。我通过 Bluemix 中的有效 IBM ID 登录。 最佳答案 st
当我尝试将公共(public) IP 地址分配给我的容器时(这是一个 Nginx 代理容器,因此我公开了端口 80 和 443),我在让公共(public) IP 地址实际工作方面遇到了相当大的问题。
有谁知道为什么 NodeJS 实例会在 Next tick 或 Mongoose pre 错误时崩溃?当我们努力识别所有错误时,有哪些想法可以创建更稳定的应用程序? IBM 是否计划提高弹性? 我想我
我正在尝试创建一个移动应用程序并使用一些 Bluemix 服务。 我在我的 bluemix 帐户中看到“移动”部分,其中包括: 移动应用内容管理器 移动客户端访问 移动基础 移动质量保证 推送通知 动
我有一个纯 Java 应用程序,目前使用基于 .jks 的 key 和信任库。据我了解,Bluemix 下的 SSL 协议(protocol)处理是在网络端使用单个端口和用于主机和域标识的通配符证书完
我正在使用 IBM Bluemix 开发一个 CF 应用程序。提供服务并将其绑定(bind)到应用后,是否需要它提供的凭据引用可公开访问的 URL 或 IP 地址? 我问是因为我一直在试验 Cloud
我是一名优秀的程序员,十分优秀!