Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Attempting to transfer a bytea file from a Postgresql database field to the file store on the Orchestrator.

$
0
0

Attempting to transfer a bytea file from a Postgresql database field (SQL instance on Orchestrator) to the file store on the Orchestrator.

Code is as follows:

 

var query = "Select * from lots where id = '" + vmID + "'";

var resultRecords = database.readCustomQuery(query);

var icaoData = resultRecords[0].getProperty("icaodatabase_file_data");

var out = new java.io.FileOutputStream("/var/run/vco/" + resultRecords[0].getProperty("icaodatabase_file_name"));

out.write(icaoData)

out.flush()

out.close()

 

Error received: TypeError: [JavaPackage java.io.FileOutputStream] is not a function, it is object.

 

This works fine in Grails.  Any suggestions on how to achieve success in Orchestrator 5.5?


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>