Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.

OS
Red Hat Enterprise Linux release 9.1
CUBRID Ver.
CUBRID 11.2 (11.2.2.0705-4ea991d) (64bit release build for Linux) (Oct 28 2022 16:13:18)
CUBRID TOOL Ver.
[도움말]-[버전정보] 확인
응용 환경(API)
openjdk version "1.8.0_352"


* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.

 

에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------
 

다음 순서로 작업 진행했습니다. 

 

1.

$CUBRID/conf/cubrid.conf 에 java_stored_procedure=yes 추가


2. 

vi HelloWorldJar.java

 

public class HelloWorldJar {
    public static String helloWorld() {
        return "Hello, World!";
    }
}

 

3. 

javac HelloWorldJar.java

jar -cvf0 HelloWorldJar.jar HelloWorldJar.class

loadjava demodb HelloWorldJar.jar

 

4. 

export CLASSPATH=$CUBRID/databases/demodb/java/HelloWorldJar.jar:.

 

env | grep CLASSPATH

CLASSPATH=/home/cubrid/CUBRID/databases/demodb/java/HelloWorldJar.jar:.

 

5. 

cubrid javasp start demodb

cubrid server start demodb

 

6. 

csql -u dba demodb

csql> create FUNCTION jar_Test()
RETURN string as language java name 'HelloWorldJar.helloWorld() return java.lang.String';

 

csql> select jar_Test() from db_root;

In line 1, column 19,

ERROR: Stored procedure execute error: java.lang.ClassNotFoundException: HelloWorldJar


0 command(s) successfully processed.
csql>

 

 

jar 파일의 경로를 $CUBRID/lib, $CUBRID/java 로 옮겨 보아도 현상은 마찬가지입니다. 

cubrid 11.2에서 CLASSPATH로 jar를 지정할 수 있는 방법이 뭔가요? 

매뉴얼을 모두 확인해봐도 해당 부분에 대한 내용이 없습니다. 

(jar가 아닌 class 파일로 loadjava 사용했을때는 정상적으로 동작합니다. jar 파일을 cubrid에 인식시킬 수 있는 방법이 궁금합니다. )

 

 

 

  • ?
    오명환 2023.04.18 10:31
    큐브리드를 사용해주셔서 감사합니다.

    11.2.2에 jar를 인식하지 못하는 오류가 발견되어 11.2.3에서 수정되었습니다.
    11.2.3를 사용해보세요.
  • ?
    개미가불쌍해 2023.04.18 10:33

    11.2.3 에서는 계정 환경변수에 CLASSPATH 환경변수로 추가시키면 되나요? 아니면 loadjava만 하면 $CUBRID/database/demodb/java 아래 있는 jar를 알아서 로드하나요?

    11.2.3 다운로드는 어디서 하면 되는지도 부탁합니다. 

  • ?
    오명환 2023.04.18 11:17
    classpath 설정없이 loadjava만 하시면 됩니다.
    https://cubrid.com/downloads 에서 다운받으시거나 https://ftp.cubrid.org/CUBRID_Engine/11.2.3/ 에서 받으시면 됩니다. (현재 11.2의 latest 버전이 11.2.3 입니다.)

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views136
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4477
    read more
  3. 큐브리드 매니저 접속 이 안됩니다. 확인 요청 드립니다.

    Date2023.04.28 By뿡이 Views128
    Read More
  4. Fk값 가져오기

    Date2023.04.24 By네오랜덤 Views166
    Read More
  5. 서버 메모리 교체 및 ha 상 데이터 삭제 절차

    Date2023.04.20 By레피엘 Views114
    Read More
  6. java stored procedure 에 loadjava 로 jar 파일 로드 시 java.lang.ClassNotFoundException 에러 문의

    Date2023.04.18 By개미가불쌍해 Views147
    Read More
  7. Cubrid stored procedure 스케쥴 등록 형식

    Date2023.04.17 ByRoy Views113
    Read More
  8. 암호화 함수 MDB_ENC 질문입니다

    Date2023.04.17 ByBE-DEV Views82
    Read More
  9. auto_increment 추가 방법 문의

    Date2023.04.14 By부패방지운영팀 Views267
    Read More
  10. CUBRID 사용자 계정 생성 관련 문의

    Date2023.04.14 By몽키스패너 Views134
    Read More
  11. order by 이후 rownum이 의도와 다르게 찍힙니다.

    Date2023.04.14 By바보똥개 Views145
    Read More
  12. 백업 및 복구 시 cubrid 버전 간 호환 문의

    Date2023.04.13 By플레이어블 Views71
    Read More
  13. centos8에서 쉘스크립트 실행시 csql: command not found 오류 발생

    Date2023.04.13 Bykjn4345 Views186
    Read More
  14. 큐브리드 timestamp 오류 문의

    Date2023.04.12 Byjjun7204 Views154
    Read More
  15. Cubrid DB 서버 swap memory 사용률 관련 질의

    Date2023.04.12 By오라클민 Views243
    Read More
  16. Mac OS 큐브리드 매니저 실행이 안 됩니다.

    Date2023.04.07 By아데산야라이트훅 Views149
    Read More
  17. blob select

    Date2023.04.05 By네오랜덤 Views143
    Read More
  18. dba권한 상속

    Date2023.04.05 By네오랜덤 Views85
    Read More
  19. mac os m1 실행시 무응답 실행안됩니다.

    Date2023.04.04 By시나몬빵 Views154
    Read More
  20. 함수/프로시져 구동시 필요한 java버젼

    Date2023.03.31 By네오랜덤 Views124
    Read More
  21. 큐브리드 설치 도중 취소한 후, 재설치가 불가능합니다.

    Date2023.03.28 By복괴 Views154
    Read More
  22. where in () 서브쿼리 관련 문의입니다

    Date2023.03.27 By제리리 Views114
    Read More
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 ... 201 Next
/ 201

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales