In Hibernate when mapping a byte[] to an Oracle long raw column I receive the exception 'Found: long, expected: raw(255)'
Issue
-
I am attempting to map a long raw column in Oracle to a Hibernate entity. When I deploy to JBoss I receive the following error:
Caused by: org.hibernate.HibernateException: Wrong column type in ABC.ABC_JOBINFO for column data. Found: long, expected: raw(255) at org.hibernate.mapping.Table.validateColumns(Table.java:284) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1130) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:358) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:670) ... 62 more
Environment
- JBoss Enterprise Application Platform (EAP) 5
- Hibernate
CREATE TABLE ABC.ABC_JOBINFO ( JOBID VARCHAR2(255) NOT NULL, COMPLETED NUMBER(1) NULL, DATA LONG RAW NULL, MACHINEID VARCHAR2(255) NULL, LASTUPDATED TIMESTAMP(3) NULL )
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.