You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Josef Eisele (JIRA)" <ji...@apache.org> on 2008/06/23 15:26:45 UTC

[jira] Resolved: (OPENJPA-627) Write-error with large VARCHAR-Fields and PostgreSQL

     [ https://issues.apache.org/jira/browse/OPENJPA-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josef Eisele resolved OPENJPA-627.
----------------------------------

    Resolution: Invalid

> Write-error with large VARCHAR-Fields and PostgreSQL
> ----------------------------------------------------
>
>                 Key: OPENJPA-627
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-627
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.2
>         Environment: Geronimo 2.1.1 with Postgres (Driver postgresql-8.2-508.jdbc3.jar) on Ubuntu-Linux
>            Reporter: Josef Eisele
>
> I receive Errors when I try to persist Data:
> public class PasswortregelPAO implements Serializable {
> 	....
> 	@Column(name="passwort_aufbau")
> 	private String passwortAufbau;
>         ....
> ...
> 		entityManager.persist(pao);
> ...
> on DB-Fields with Definitions >= VARCHAR(170)
> ALTER TABLE vesuv.passwortregel DROP COLUMN passwort_aufbau;
> ALTER TABLE vesuv.passwortregel ADD COLUMN paswort_aufbau varchar(170);
> ALTER TABLE vesuv.passwortregel ALTER COLUMN passwort_aufbau SET STORAGE EXTEND;
> LOG:
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: FEHLER: Wert zu lang fr Typ character varying(120) {prepstmnt 32613590 INSERT INTO vesuv.protokoll_info (id, attribut, entitaet_id, entitaetstyp, wert_alt, wert_neu, protokoll_eintrag_fk) VALUES (?, ?, ?, ?, ?, ?, ?) [params=(long) 239, (String) passwort_aufbau, (long) 24, (String) PASSWORTREGEL, (String) , (String) dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd..., (long) 128]} [code=0, state=22001]
> With any size bigger than 170, I got the same error "FEHLER: Wert zu lang fr Typ character varying(120) ". 
> VARCHAR-Values up to 160 work without any problem.
> In addition I have to say, reading of VARCHAR-Data > 170 Char. works without problem.
> => I tried to change the database-Definition from VARCHAR(170) to TEXT and to define the PAO @Column(length=200 ...) , but nothing helped.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.