(Re-posting form SAP Blog) Was trying to integrate an HANA schema and HDI container service in cloud foundry trial version with a JAVA application on cloud foundry, and encountered an error as below:
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: DUMMY
Could anyone help me in understanding, what wrong here? Am I supposed to assign an authorization?
I am just running on Cloud Foundry trial version.
This is our simple connection test program:
@Override
protected void doGet( final HttpServletRequest request, final HttpServletResponse response )
throws IOException
{
logger.info("I am running!");
Context ctx = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/DefaultDB");
con = ds.getConnection( );
stmt = con.createStatement();
rs = stmt.executeQuery("select current_user as myuser from DUMMY");
rs.next();
response.getWriter().append("Served at:").append(rs.getString(1)).append(request.getContextPath());
}catch(NamingException e){
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
and I even created a context.xml
under META-INF
under webapp
.
Am I missing anything over here? Could someone help me in understanding the limitation of HANA on a trial version of Cloud Foundry?
Tried giving SYS.DUMMY
, but still throws an error:
Caused by: org.hsqldb.HsqlException: invalid schema name: SYS
Thanks, Regards, Girish