zoukankan      html  css  js  c++  java
  • About Derby "ERROR 42X51: The class '***' does not exist or is inaccessible. This can hap pen if the class is not public."

    This link [1] contains a straight forward example to create UDF. Link [2] is the official page to explain difference between Functions and Procedures and other examples. Link [3] lists all data type can be used. Link [5] shows how to add/delete/replace the jar file.


    Following is my commands in Derby ij:
    call sqlj.install_jar('ed.jar', 'APP.ed',0);
    call syscs_util.syscs_set_database_property('derby.database.classpath', 'APP.ed');
    create function myED(first_str varchar(50), second_str varchar(50)) returns integer parameter style java no sql language java external name 'EditDistance.LD';


    To solve the error, you should put the .java file inside the jar file, especially when you create the jar file using Eclipse. There is an option to do that. Detail is at link [4]. Use this command to show all installed function: “select s.schemaname, f.filename from sys.sysschemas s, sys.sysfiles f  where s.schemaid=f.schemaid; ” Also you can find a copy of the installed jar file under the sub-directory called “jar” within your the database directory.

    Reference:
    [1] http://www.wisteme.com/question.view?targetAction=viewQuestionTab&id=67
    [2] http://wiki.apache.org/db-derby/DerbySQLroutines
    [3] http://db.apache.org/derby/docs/10.2/ref/crefsqlj31068.html#crefsqlj31068
    [4] http://old.nabble.com/Problems-create-SQL-Function-td23595863.html
    [5] http://db.apache.org/derby/docs/10.0/manuals/develop/develop43.html

  • 相关阅读:
    泛型类,泛型方法的使用
    Mapper注解与MapperScan注解
    Configuration注解
    LA 4254 Processor (二分 + 贪心)
    UVa 10382 Watering Grass (贪心 区间覆盖)
    UVA 10795 A Different Task (递归)
    LA 3401 Colored Cubes (搜索 + 暴力)
    uva11464 Even Parity (枚举+递推)
    icpc2021 昆明 K (dfs爆搜)
    hdu3533 (bfs + 模拟)
  • 原文地址:https://www.cnblogs.com/ainima/p/6331349.html
Copyright © 2011-2022 走看看