Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Se ha producido un error al realizar la operación solicitada:
- ORA-00604: error occurred at recursive SQL level 1
- ORA-12705: Cannot access NLS data files or invalid environment specified
- 00604. 00000 - "error occurred at recursive SQL level %s"
- *Cause: An error occurred while processing a recursive SQL statement
- (a statement applying to internal dictionary tables).
- *Action: If the situation described in the next error on the stack
- can be corrected, do so; otherwise contact Oracle Support.
- Código de proveedor 604
- package py.conexion;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- public class Conexion {
- private static String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
- introducir el código aquí
- protected String host = "127.0.0.1";
- protected String port = "1521";
- protected String dbname = "xe";
- protected String user = "usuario";
- protected String password = "password";
- private static Logger logger = Logger.getLogger("DBAccessOracle");
- private Connection conn;
- public Connection getConnection() throws SQLException {
- try {
- Class.forName(ORACLE_DRIVER);
- } catch (ClassNotFoundException e) {
- logger.log(Level.SEVERE, "ClassNotFoundException: " + e.getMessage());
- }
- String url = "jdbc:oracle:thin:@" + host + ":" + port + "/" + dbname; // SERVICE
- System.out.println(url);
- conn = DriverManager.getConnection(url, user, password);
- return conn;
- }
- public static void main(String[] args) {
- try {
- Conexion c = new Conexion();
- System.out.println(c.getConnection().getMetaData().getDatabaseMajorVersion());
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement