현재 glassfish 2.1에서 실행중인 응용 프로그램을 jboss 6.1에서 작동 시키려고합니다. 그리고 다음과 같은 문제가 있습니다. 응용 프로그램 서버와 관련이 없지만 포스트 그레스 및/또는 최대 절전 모드와 관련이 있다고 생각합니다. 다음 소프트웨어 PostgreSQL을 9.0을 사용하여운영자가 존재하지 않습니다 : text = bigint
, 어쨌든
글래스 피쉬
에 문제를 JBoss에서의 3.6.6 및 3.2을 최대 절전 모드.이 명명 된 질의 :
@NamedQuery(name="entry.updateDuplicate",
query="UPDATE entry SET timestamp = :timestamp WHERE username = :username AND searchDocument = :searchDocument")
이 코드 :
TABLE fu
(
id bigint NOT NULL, document text, timestamp timestamp without time zone, username character varying(255), CONSTRAINT fu_pkey PRIMARY KEY (c_id)
)
,536,913 :
10:28:16,149 INFO [STDOUT] Hibernate: update fu set c_timestamp=? where c_username=? and c_document=?
10:28:16,165 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42883
10:28:16,165 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: operator does not exist: text = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 77
테이블이 있습니다 :
Query query = em.createNamedQuery("Entry.updateDuplicate");
query.setParameter("timestamp", new Date(System.currentTimeMillis()));
query.setParameter("username", username);
query.setParameter("sDocument", sString);
int affected = query.executeUpdate();
로그에서이 오류를 발생
누구나 '이드'(유일한 bigInt 필드)와 관련이있는 것처럼 솔기가 어떤 생각인지 알 수 있습니다. 그러나 문제를 해결하기 시작하는 이유와 방법을 알 수 없습니다.
모든 의견을 환영합니다!
그 트릭을 했어, 고마워. – linusno
요약 :'@Lob' 아래에'@Type (type = "org.hibernate.type.TextType")'을 추가하십시오. – loopasam