• Post Reply Bookmark Topic Watch Topic
  • New Topic

help required in java code ?  RSS feed

 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a small java code which uses copy command of postgre. we have a production server running centos. the only privilege we have on the production server is create database and select, delete , update etc .when our code runs and fires copy command it gives exception that it requires superuser priveleges. however when i run copy command by logging into the centos system using ssh and executing the command on the terminal like ./copy , it runs successfully. my question is that if iam able to run the command on the terminal , i should be able to run it through my java code as well. Please help as our application will be going live by today
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your application log in with the same credentials you do when you run the command manually?
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes in the database connection source file , i have specified the same credentials as i do when i run the command in terminal
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!