Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2441

No puedo insertar un texto AES-256 en Columna MySQL BLOB desde Cayenne

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 4.0.RC1
    • None
    • Database integration
    • None
    • JSF2.0, Payara Server 4.1.2.174, JDK 7, MySQL5.6.38

    Description

      Hola, al tratar de guardar una contraseña AES-256 en MySQL me manda el siguiente error:

      INFORMACIÓN: *** error.
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, password, target, type_idtype, user) VALUES ('', x'4F38726A5574395A6C4C384' at line 1

      Insersión:

      INFORMACIÓN: INSERT INTO passwords.password (desc, password, target, type_idtype, user) VALUES (?, ?, ?, ?, ?)
      INFORMACIÓN: [bind: 1->desc:'', 2->*password:'O8rjUt9ZlL8Mybz7B8O/5w=='*, 3->target:'192.168.15.15', 4->type_idtype:1, 5->user:'nando']

      Tabla en Base de Datos:

      CREATE TABLE `password` (
      `idpassword` int(11) NOT NULL AUTO_INCREMENT,
      `user` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
      `password` blob NOT NULL,
      `target` mediumtext COLLATE utf8_spanish_ci NOT NULL,
      `desc` mediumtext COLLATE utf8_spanish_ci,
      `type_idtype` int(11) NOT NULL,
      PRIMARY KEY (`idpassword`),
      KEY `fk_password_type1_idx` (`type_idtype`),
      CONSTRAINT `fk_password_type1` FOREIGN KEY (`type_idtype`) REFERENCES `type` (`idtype`) ON DELETE NO ACTION ON UPDATE NO ACTION
      ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

      Usando SQLTemplate y Consola SQL guarda bien, pero no puedo obtener el ID del registro insertado para usarlo con el elemento padre.

      Attachments

        1. screenshot_06.png
          14 kB
          Michael Gentry

        Activity

          People

            Unassigned Unassigned
            nando23 Fernando Perez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: