OpenGTS Integration in Eclipse - java

OpenGTS Integration in Eclipse
*Imported whole opengts code in to the eclispse workspace.
*Created the four environment variables like GTS_HOME,CATALINA_HOME,ANT_HOME,JAVA_HOME as system variables.
*In the next step am trying to configure the database for the opengts as they mentioned in the document.
*Refer the link below
"http://opengts.sourceforge.net/OpenGTS_Config.pdf".
Taking reference of above link Am trying to run the commands given in the pdf file
*The first command we need to run is initdb.bat command in windows command prompt.
*When ever i run the above command the system dynasmically create the gts database and tables related to that db.
*At this moment am strucked with the error
"C:\OpenGTS_2.6.4\bin>initdb.bat
"C:\Program Files\Java\jdk1.8.0_45\bin\java" "-Dfile.encoding=UTF-8" -classpath "C:\OpenGTS_2.6.4\build\lib"\gtsdb.jar;"C:\OpenGTS_2.6.4\build\lib"\gtsutils.jar;"C:\OpenGTS_2.6.4\build\lib"\optdb.jar;"C:\OpenGTS_2.6.4\build\lib"\ruledb.jar;"C:\OpenGTS_2.6.4\build\lib"\bcrossdb.jar;"C:\OpenGTS_2.6.4\build\lib"\custom.jar;"C:\OpenGTS_2.6.4\build\lib"\dmtpserv.jar;"C:\OpenGTS_2.6.4\build\lib"\gtsdmtp.jar; org.opengts.db.DBConfig -conf:"C:\OpenGTS_2.6.4\default.conf" -log.file.enable:false -initTables
Version: 2.6.4
[ERROR|DBAdmin.execCommands:1006] SQLException message: Access denied for user 'root'#'localhost' (using password: NO)
[ERROR|DBAdmin.execCommands:1007] ==> SQLException: DB create error [jdbc:mysql://localhost:3306/]
[ERROR|DBAdmin.execCommands:1007] Message: Access denied for user 'root'#'localhost' (using password: NO)
[ERROR|DBAdmin.execCommands:1007] SQLState: 28000
[ERROR|DBAdmin.execCommands:1007] ErrorCode: 1045
[DBAdmin.execCommands:1007] java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: NO)
java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2239)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2270)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2069)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.opengts.dbtools.DBConnection.getConnection(DBConnection.java:809)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:945)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:933)
at org.opengts.dbtools.DBConnection._executeUpdate(DBConnection.java:1188)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1143)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1124)
at org.opengts.dbtools.DBProvider.createDatabase(DBProvider.java:1699)
at org.opengts.dbtools.DBAdmin.execCommands(DBAdmin.java:995)
at org.opengts.db.DBConfig._main(DBConfig.java:2036)
at org.opengts.db.DBConfig.main(DBConfig.java:2180)"
*Am getting error in DBAdmin.Java class with two methods given in the opengts code.
The methods are
.............................(1)................................
public static DBFactory<? extends DBRecord<?>>[] getClassTableFactories(Class<?> tableClass)
{
java.util.List<DBFactory<? extends DBRecord<?>>> list = new Vector<DBFactory<? extends DBRecord<?>>>();
if (tableClass != null) {
for (DBFactory<? extends DBRecord<?>> tableFact : DBAdmin.getTableFactoryMap().values()) {
if (DBFactory.isTableClass(tableFact,tableClass)) {
list.add(tableFact);
}
}
}
#SuppressWarnings("unchecked")
DBFactory<? extends DBRecord<?>> dbf[] = list.toArray(new DBFactory<?>[list.size()]);
return dbf;
}
...........................(2).............................
if (RTConfig.hasProperty(ARG_LAST)) {
execCmd++;
//String last = RTConfig.getString(ARG_LAST, null);
Print.logInfo("Table last update time:");
OrderedMap<String,DBFactory<? extends DBRecord<?>>> factMap = DBAdmin.getTableFactoryMap();
for (Iterator<String> i = factMap.keyIterator(); i.hasNext();) {
String tn = i.next();
DBFactory<? extends DBRecord<?>> f = (DBFactory<? extends DBRecord<?>>)factMap.get(tn);
try {
long lut = DBRecord.getLastUpdateTime(f);
if (lut < 0L) {
Print.logInfo(" Last Table Update: " +tn + " - Not Available");
} else
if (lut == 0L) {
Print.logInfo(" Last Table Update: " + tn + " - No Data");
} else {
Print.logInfo(" Last Table Update: " + tn + " - " + (new DateTime(lut)));
//Print.logInfo(" => " + DBRecord.getRecordsSince(f, lut)[0]);
}
} catch (DBException dbe) {
Print.logError(" Last Table Update: " +tn + " - DB Error [" + dbe + "]");
}
}
}

In System.conf file You have to set Mysql database password same as localhost DB.Than try to Build the project.It will work.
You have to run initdb command like given below.
C:\OpenGTS_2.5.9\bin>initdb.bat "-rootUser:db root username" "-rootPass:db rootpassword"
Result should be like this:
Validating table columns ...
Table 'Account' 1 Validating columns ...
continue..

I have checked the username and password ..Even though it is giving the same error when am trying to run the initdb.bat in the command prompt as follows
C:\OpenGTS_2.6.4\bin>initdb.bat
"C:\Program Files\Java\jdk1.8.0_45\bin\java" "-Dfile.encoding=UTF-8" -classpath
"C:\OpenGTS_2.6.4\build\lib"\gtsdb.jar;"C:\OpenGTS_2.6.4\build\lib"\gtsutils.jar;"C:\OpenGTS_2.6.4\build\lib"\optdb.jar;"C:\OpenGTS_2.6.4\build\lib"\ruledb.jar;"C:\OpenGTS_2.6.4\build\lib"\bcrossdb.jar;"C:\OpenGTS_2.6.4\build\lib"\custom.jar;"C:\OpenGTS_2.6.4\build\lib"\dmtpserv.jar;"C:\OpenGTS_2.6.4\build\lib"\gtsdmtp.jar; org.opengts.db.DBConfig -conf:"C:\OpenGTS_2.6.4\default.conf"
-log.file.enable:false -initTables
Version: 2.6.4
[ERROR|DBAdmin.execCommands:1006] SQLException message: Access denied for user 'root'#'localhost' (using password: NO)
[ERROR|DBAdmin.execCommands:1007] ==> SQLException: DB create error [jdbc:mysql://localhost:3306/]
[ERROR|DBAdmin.execCommands:1007] Message: Access denied for user 'root'#'localhost' (using password: NO)
[ERROR|DBAdmin.execCommands:1007] SQLState: 28000
[ERROR|DBAdmin.execCommands:1007] ErrorCode: 1045
[DBAdmin.execCommands:1007] java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: NO)
java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2239)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2270)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2069)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.opengts.dbtools.DBConnection.getConnection(DBConnection.java:809)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:945)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:933)
at org.opengts.dbtools.DBConnection._executeUpdate(DBConnection.java:1188)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1143)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1124)
at org.opengts.dbtools.DBProvider.createDatabase(DBProvider.java:1699)
at org.opengts.dbtools.DBAdmin.execCommands(DBAdmin.java:995)
at org.opengts.db.DBConfig._main(DBConfig.java:2036)
at org.opengts.db.DBConfig.main(DBConfig.java:2180)

"C:\OpenGTS_2.6.4\bin>initdb.bat -rootUser=<logindb> -rootPass=<dbpassword>

Related

ASE is terminating this process when trying to install the jar file (Msg 5702, Level 10, State 1)

I have an SAP ASE 16 server on a Windows OS.
I have enabled the java service:
sp_configure 'enable java'
Parameter Name Default Memory Used Config Value Run Value Unit Type
-------------- ----------- ----------- ------------ ------------ ------ ------
enable java 0 0 1 1 switch static
Rows affected (1) Time (0.094 s)
I have created a basic class to test the service (JDBCExamples.java):
import java.sql.*; // JDBC
public class JDBCExamples {
public static void main(String args[]){
if (args.length != 2) {
System.out.println("\n Usage: " + "name secondName \n");
return;
}
try {
String name = args[0];
String secondName = args[1].toLowerCase();
System.out.println("\n HOLA " + name + " " + secondName +" FUNCIONO!!!\n");
} catch (Exception e) {
System.out.println("\n Exception: ");
e.printStackTrace();
}
}
}
I have the class file JDBCExamples.class and I make a file JDBCExamples.jar.
When I try to install the jar file it shows the error message:
instjava -f JDBCExamples.jar -SDEFAULT -Uuser -Ppassword -Ddatabase -new
Server Message: - Msg 5702, Level 10, State 1:
ASE is terminating this process.
I don't see any in log database.
Any idea what the problem is?
Update:
I posted the same problem in https://answers.sap.com/questions/13241081/ase-is-terminating-this-process-when-trying-to-ins.html
In this post suspect the issue is caused by an ASE bug fixed in PL06:
2687973 - NTPCI__exit(1); Native Thread failed to unwind - SAP ASE http://service.sap.com/sap/support/notes/2687973
I have a trial version and I can not download a newer patch (PL06 at least but recommend PL09 as most recent)
Does anyone have this patch?

ChangeFileModeByMask error (5): Access is denied

I accessed MySQL database and fetched the table.
Everything is working fine till that.
when i am trying to save the records in text or other formats i am getting the error
Exit Code Exception exit Code=1: 'Change File Mode By Mask error' (5): Access is denied.
Any help will be appreciated.
object jdbcConnect {
def main(args: Array[String]) {
val url="jdbc:mysql://127.0.0.1:3306/mydb"
val username = "root"
val password = "token_password"
Class.forName("com.mysql.jdbc.Driver").newInstance
//DriverManager.registerDriver(new com.mysql.jdbc.Driver());
val conf = new SparkConf().setAppName("JDB CRDD").setMaster("local[2]").set("spark.executor.memory", "1g")
val sc = new SparkContext(conf)
val myRDD = new JdbcRDD( sc, () =>
DriverManager.getConnection(url,username,password) ,
"select s_Id,issue_date from store_details limit ?, ?",
0, 10, 1, r => r.getString("s_Id") + ", " + r.getString("issue_date"))
myRDD.foreach(println)
myRDD.saveAsTextFile("C:/jdbcrddexamplee")
}
}
Error
17/07/18 11:10:19 ERROR Executor: Exception in task 0.0 in stage 2.0
(TID 2) ExitCodeException exitCode=1: ChangeFileModeByMask error (5):
Access is denied.
at org.apache.hadoop.util.Shell.runCommand(Shell.java:582) at
org.apache.hadoop.util.Shell.run(Shell.java:479) at
org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:773)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:866) at
org.apache.hadoop.util.Shell.execCommand(Shell.java:849) at
org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:733)
at
org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.(RawLocalFileSystem.java:225)
at
org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileOutputStream.(RawLocalFileSystem.java:209)
at
org.apache.hadoop.fs.RawLocalFileSystem.createOutputStreamWithMode(RawLocalFileSystem.java:307)
at
org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:296)
at
org.apache.hadoop.fs.RawLocalFileSystem.create(RawLocalFileSystem.java:328)
It seemed to be a permission error. My foolishness...
Make sure to run anything as an admin. Though i will suggest to use dataframe instead of RDD :D

Error in creating remedy ticket using java

i need a Java class to submit tickets to BMC Remedy's but i was getting error could anyone please help me how to resolve that error.
Find the below code:
public class RemedyCreateTicket {
public static void main(String args[]) {
ARServerUser arsServer = new ARServerUser();
Entry args1 = new Entry();
Entry incidentID;
String arForm = "HPD:IncidentInterface_Create";
String arForm1 = "HPD:IncidentInterface";
String IntEntryID = "";
String inciID = "";
try {
//Create Ticket Part
String strLastName = "radadiya";
String strFirstName ="pragnesh";
args1.put(new Integer("1000000076"),new Value("CREATE")); //ticket_action
args1.put(new Integer("1000000018"),new Value(strLastName)); //contact user first_name
args1.put(new Integer("1000000019"),new Value(strFirstName)); //contact user last_name
args1.put(new Integer("7"), new Value("1")); //ticket status
args1.put(new Integer("1000000099"),new Value("3")); //service type
//args1.put(new Integer("1000000163"),new Value("4000")); //impact
args1.put(new Integer("1000000162"),new Value("4000")); //urgency
args1.put(new Integer("1000000000"),new Value("Remedy 7.5 java api test")); //description
args1.put(new Integer("1000000215"),new Value("10000"));
arsServer.setServer("localhost");
arsServer.setUser("pragnesh");
arsServer.setPassword("password");
arsServer.setPort(3389);
arsServer.login();
//arsServer.setPort(3389);
IntEntryID = arsServer.createEntry(arForm, args1);
System.out.println("intEntryID="+IntEntryID);
int[] entryField = {1000000161};
incidentID = arsServer.getEntry(arForm,IntEntryID,entryField);
if(incidentID!=null){
System.out.println(incidentID);
}
System.out.println("------------");
for (Object o : incidentID.entrySet()) {
Map.Entry e = (Map.Entry) o;
System.out.println(e.getKey() + " => " + e.getValue().getClass() + " " + e.getValue());
if(e.getKey().toString().equalsIgnoreCase("1000000161")){
inciID=e.getValue().toString();
}
}
System.out.println("IncidentID = " + inciID);
arsServer.logout();
} catch (ARException e) {
e.printStackTrace();
arsServer.logout();
}
}
}
Here is the stacktrace:
Jun 20, 2017 4:11:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 2.
Jun 20, 2017 4:11:55 PM java.util.prefs.WindowsPreferences closeKey
WARNING: Could not close windows registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCloseKey(...) returned error code 6.
**ERROR (91): RPC call failed; localhost:3389 Connection reset**
at com.bmc.arsys.apitransport.ApiProxyJRpcBase.convertException(ApiProxyJRpcBase.java:643)
at com.bmc.arsys.api.ProxyJRpc.getRpcClient(ProxyJRpc.java:135)
at com.bmc.arsys.api.ProxyJRpc.<init>(ProxyJRpc.java:67)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.bmc.arsys.apitransport.connection.ApiProxyFactory.createProxyInstance(ApiProxyFactory.java:89)
at com.bmc.arsys.apitransport.connection.ApiProxyFactory.createProxy(ApiProxyFactory.java:160)
at com.bmc.arsys.api.ProxyManager.createProxy(ProxyManager.java:602)
at com.bmc.arsys.api.ProxyPool.createProxy(ProxyPool.java:106)
at com.bmc.arsys.apitransport.connection.ApiProxyPool.get(ApiProxyPool.java:192)
at com.bmc.arsys.apitransport.connection.ApiProxyManager.getProxy(ApiProxyManager.java:210)
at com.bmc.arsys.api.PoolingProxyManager.getProxy(PoolingProxyManager.java:93)
at com.bmc.arsys.apitransport.connection.ApiProxyManager.getProxy(ApiProxyManager.java:164)
at com.bmc.arsys.api.ARServerUser.verifyUser(ARServerUser.java:1085)
at com.bmc.arsys.api.ARServerUser.login(ARServerUser.java:412)
at Remedi.RemedyCreateTicket.main(RemedyCreateTicket.java:46)
Thanks in advance.
This is old but for anyone looking at it after; the code looks fine. ARERROR 91 is typically a networking issue. Port 3389 is the default for Remote Desktop. Therefore, I wonder if you are tunneling to localhost and trying to connect to the Windows machine that you RDP to? Instead of the TCP port the AR Server is actually running on and let in through the Windows firewall?

List all the lotus notes database

I tried to create a lotus notes client using Java. Now, I have a problem to list all the user defined databases. What I tried to do is
// testing purpose
private void printAllDb() throws NotesException
{
DbDirectory dir = session.getDbDirectory(host);
String server = dir.getName();
if(server.equals(""))
{
server = "Local";
}
System.out.println("database direcory list on server (" + server + ")");
Database db = dir.getFirstDatabase(DbDirectory.DATABASE);
do
{
System.out.println("file name: " + db.getFileName().toUpperCase() + " - " + db.getTitle());
} while((db = dir.getNextDatabase()) != null);
}
However, the program will throw the exception:
Exception in thread "main" NotesException: Server access denied
at lotus.domino.NotesExceptionHelper.read(Unknown Source)
at lotus.domino.NotesExceptionHolder._read(Unknown Source)
at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at lotus.domino.corba._IDbDirectoryStub.getFirstDatabase(Unknown Source)
at lotus.domino.cso.DbDirectory.getFirstDatabase(Unknown Source)
at nz.co.sylresearch.sylsearch.agents.lotusnotes.LotusNotesAPIHandler.printAllDb(LotusNotesAPIHandler.java:58)
at nz.co.sylresearch.sylsearch.agents.lotusnotes.LotusNotesAPIHandler.main(LotusNotesAPIHandler.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
The issue is pretty clear. You are getting an access denied error to the server. The tricky part now is figuring out why.
You should start with making sure the username and password used to create the session object is correct. Then make sure that user has access to the server and has access to run Java code on the server. You'll have to check the server document in the Directory for that.

java + app engine + cloudSQL + spring/hibernate

I am using Spring Hibernate with app engine and cloudSQL for my project but i am getting one error frequently. This occurs when application becomes ideal for sometimes.
For every query (fetching or save/update to database), i open session and close session after its use. like this --
My code for database fetching is
try{
Session session = getSessionFactory().openSession();
if(session != null)
{
List<Account> accounts = session.createQuery("from " + this.clazz.getName() + " where subDomainName = '"+subDomain+"'").list();
session.close();
if(accounts != null)
{
if(accounts.size()>0){
return accounts.get(0);
}
else{
return null;
}
}
else
{
return null;
}
}
else {
return null;
}
}
catch(Exception e){
log.info("Error in retriving subdomain details :: in Account Dao");
return null;
}
I am using Autowired structuring. but when application becomes ideal for sometime and after some time when i refresh page its display the error as Stream Closed of CloudSQL on app engine, error is shown below...
Error is :
6 Jan, 2014 6:21:04 AM com.google.appengine.repackaged.org.apache.http.impl.client.DefaultRequestDirector handleResponse
WARNING: Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token}
6 Jan, 2014 6:21:04 AM com.google.appengine.api.rdbms.dev.LocalRdbmsServiceRemoteDriver openConnection
WARNING: openConnection
java.sql.SQLException: Stream closed
at com.google.cloud.sql.jdbc.internal.googleapi.RpcGoogleApi.newOpenConnectionIOException(RpcGoogleApi.java:187)
at com.google.cloud.sql.jdbc.internal.googleapi.RpcGoogleApi.openConnection(RpcGoogleApi.java:105)
at com.google.appengine.api.rdbms.dev.LocalRdbmsServiceRemoteDriver.openConnection(LocalRdbmsServiceRemoteDriver.java:206)
at com.google.appengine.api.rdbms.dev.LocalRdbmsService.openConnection(LocalRdbmsService.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:498)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:452)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:430)
at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:461)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:458)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Stream closed
at java.util.zip.GZIPInputStream.ensureOpen(GZIPInputStream.java:42)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:85)
For this to engage app engine and cloudSQL i have wriiten cron job of certains request but this is not feasible solution, i can not gets why cloudSQL closes its stream for app engine.

Categories

Resources