SQLJ.REFRESH_CLASSES().... [英] SQLJ.REFRESH_CLASSES() ....

查看:110
本文介绍了SQLJ.REFRESH_CLASSES()....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Win XP上的UDB PE 8.1。


好​​吧,这个功能今天引起了很多悲痛。我的存储过程

是java存储过程,所有FENCED都直接放在

\sqllib \ function目录下(不内置到JAR文件中)。


虽然手册声明SQLJ.REFRESH_CLASSES()只刷新内置于JAR文件中的

例程,但我已经成功刷新了我的

JDBC存储具有此功能的程序。


几天前,我开始开发SQLJ存储过程和

我花了很长时间才弄清楚所有的我试图运行SQLJ存储过程时收到的奇怪错误


(参数不兼容等消息)是因为

SQLJ .REFRESH_CLASSES()没有在

\sqllib \ function中刷新我的SQLJ存储过程。我每次更改并重新编译存储过程时都必须停止并启动数据库管理器

。这解决了

问题。


在dbm config中保持加密状态。文件设置为YES(默认)。


无论如何,所以我的问题是:列表中有人知道

处理SQLJ.REFRESH_CLASSES的内容()是?为什么它适用于JDBC

过程而不是SQLJ过程。实际上,按照手册的说法,对于JAR

文件中内置的存储过程,它只能* *
。由于我的JDBC存储过程没有内置到JAR文件中,因此即使使用JDBC,也不应该使用SQLJ.REFRESH_CLASSES()。


您有什么经验这方面。


TIA

Raquel。

UDB PE 8.1 on Win XP.

ok, this function caused a lot of grief today. My stored procedures
are java stored procedures, all FENCED and directly placed in
\sqllib\function directory (not built into JAR files).

While the manuals state that SQLJ.REFRESH_CLASSES() only refreshes the
routines built into JAR files, I have been successfully refreshing my
JDBC stored procedures with this function.

A couple of days back, I started developing SQLJ stored procedures and
it took me a long while to figure out that all the strange errors I
was receiving while attempting to run the SQLJ stored procedures
(messages like arguments not being compatible etc.) were because
SQLJ.REFRESH_CLASSES() was NOT refreshing my SQLJ stored procedures in
\sqllib\function. I had to stop and start the database manager
everytime I changed and recompiled a stored procedure. This solved the
problem.

KEEPFENCED in dbm config. file is set to YES (default).

Anyway, so my question is: Is someone on the list aware of what the
deal with SQLJ.REFRESH_CLASSES() is? Why does it work with JDBC
procedures and not with SQLJ procedures. Actually, per the manual, it
should work *only* for stored procedures that are built into JAR
files. Since my JDBC stored procedures are not built into JAR files,
SQLJ.REFRESH_CLASSES() should not have worked even with JDBC.

What are your experiences in this regard.

TIA
Raquel.

推荐答案

Raquel写道:
Raquel wrote:
Win XP上的UDB PE 8.1。

好的,这个功能今天引起了很多悲痛。我的存储过程是java存储过程,所有FENCED都直接放在
\sqllib \ function目录下(不内置到JAR文件中)。

虽然手册说明了SQLJ.REFRESH_CLASSES()只刷新内置于JAR文件中的
例程,我已经使用此函数成功刷新了我的
JDBC存储过程。
UDB PE 8.1 on Win XP.

ok, this function caused a lot of grief today. My stored procedures
are java stored procedures, all FENCED and directly placed in
\sqllib\function directory (not built into JAR files).

While the manuals state that SQLJ.REFRESH_CLASSES() only refreshes the
routines built into JAR files, I have been successfully refreshing my
JDBC stored procedures with this function.




我不太清楚DB2内部结构是否足以说明为什么它可以为你的案例中的一些

工作,但是:


如果手册没有*不*声明它适用于非jar文件,比你

不能依赖你的测试。你很幸运,它首先与JDBC

课程一起工作。


-

Knut Stolze

信息集成

IBM德国/耶拿大学



I don''t know the DB2 internals well enough to say why it did work for some
of your cases, but:

If the manual does *not* state that it works for non-jar files, than you
can''t rely on your tests. You were just lucky that it did work with JDBC
classes in the first place.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


它应该适用于......我们在销毁类加载器时这个函数

被调用。你能联系支持吗?


Raquel写道:
It should work for both...we destroy the classloader when this function
is called. Can you contact support?

Raquel wrote:
Win XP上的UDB PE 8.1。

好的,这个功能引起了很多今天悲伤我的存储过程是java存储过程,所有FENCED都直接放在
\sqllib \ function目录下(不内置到JAR文件中)。

虽然手册说明了SQLJ.REFRESH_CLASSES()只刷新内置到JAR文件中的
例程,我已经用这个函数成功刷新了我的
JDBC存储过程。

几天前,我开始开发SQLJ存储过程和
我花了很长时间才弄清楚我试图运行SQLJ存储过程时收到的所有奇怪错误
(参数不兼容的消息)是因为SQLJ.REFRESH_CLASSES()没有在
\sqllib \ function中刷新我的SQLJ存储过程。我每次更改并重新编译存储过程时都必须停止并启动数据库管理器。这解决了
问题。

在dbm config中保持KEEPFENCED。文件设置为YES(默认)。

无论如何,我的问题是:列表中有人知道
处理SQLJ.REFRESH_CLASSES()是什么?为什么它适用于JDBC
过程而不适用于SQLJ过程。实际上,根据手册,它只应*用于*内置于JAR
文件中的存储过程。由于我的JDBC存储过程没有内置到JAR文件中,所以即使使用JDBC,SQLJ.REFRESH_CLASSES()也不应该有效。

您在这方面的经验是什么。
< TIA
Raquel。
UDB PE 8.1 on Win XP.

ok, this function caused a lot of grief today. My stored procedures
are java stored procedures, all FENCED and directly placed in
\sqllib\function directory (not built into JAR files).

While the manuals state that SQLJ.REFRESH_CLASSES() only refreshes the
routines built into JAR files, I have been successfully refreshing my
JDBC stored procedures with this function.

A couple of days back, I started developing SQLJ stored procedures and
it took me a long while to figure out that all the strange errors I
was receiving while attempting to run the SQLJ stored procedures
(messages like arguments not being compatible etc.) were because
SQLJ.REFRESH_CLASSES() was NOT refreshing my SQLJ stored procedures in
\sqllib\function. I had to stop and start the database manager
everytime I changed and recompiled a stored procedure. This solved the
problem.

KEEPFENCED in dbm config. file is set to YES (default).

Anyway, so my question is: Is someone on the list aware of what the
deal with SQLJ.REFRESH_CLASSES() is? Why does it work with JDBC
procedures and not with SQLJ procedures. Actually, per the manual, it
should work *only* for stored procedures that are built into JAR
files. Since my JDBC stored procedures are not built into JAR files,
SQLJ.REFRESH_CLASSES() should not have worked even with JDBC.

What are your experiences in this regard.

TIA
Raquel.



我没有关注你之前的帖子,请原谅我,如果这已经是

说。


根据我的经验,使用DB2 V7.2及更早版本,关键

因为获取有限的存储过程来刷新自己正确

是将KEEPDARI设置为NO。您可以通过以下方式执行此操作:

db2 upd dbm cfg使用keepdari no


KEEPDARI是一个性能设置,对于

生产环境,但对于

开发环境几乎肯定会设置为NO。否则,你会遇到各种各样的问题。

正如我所说,我还没有使用过DB2 V8,所以这个建议可能不会适用

,但它确实在V7.2中产生了很大的不同。


还有其他一些因素可能导致存储过程刷新

问题,但KEEPDARI是我经验中最大的一个。但是,如果你给
设置了适当的KEEPDARI,还有两件事你需要

探索:

1)如果你是手工编码您的程序 - 而不是使用存储的

程序构建器/开发中心 - 您的程序准备程序

可能不正确。您可能正在编译程序的最新版本

但您的准备程序可能会在您的SQLLIB \ FUNCTION中将旧版本的

..class文件放入JAR\<模式>目录。

2)你的SQLLIB中可能有* * .class文件和包含相同程序的.jar

$ \\ / $
FUNCTION\JAR \< schema> \目录。在这种情况下,DB2将始终使用

..class文件而不是.jar,即使.class文件是较旧的

版本。


我已经设法在这一点或另一点上犯了这三个错误。

我理解你对程序无法正常刷新的挫败感。

但是,如果确保开发环境中的KEEPDARI为NO,请确认您的准备程序存储当前版本

.class文件在SQLLIB\FUNCTION\JAR \< schema>中目录,你的

刷新课程的问题*应该*消失。


犀牛


" Raquel" < RA **************** @ yahoo.com>在消息中写道

news:9a ************************** @ posting.google.c om ...
I did not follow your earlier posts so forgive me if this has already been
said.

In my experience, which is with DB2 V7.2 and earlier versions, the key
factor in getting fenced stored procedures to refresh themselves correctly
is to set KEEPDARI to NO. You can do this via:
db2 upd dbm cfg using keepdari no

KEEPDARI is a performance setting that should normally be set to YES for a
production environment but should almost certainly be set to NO for a
development environment. Otherwise, you get the sorts of problems you are
having.

As I said, I haven''t used DB2 V8 yet so this advice may not be applicable
any longer but it certainly made a big difference in V7.2.

There are other things that can cause stored procedures to have refresh
issues but KEEPDARI is the biggest one in my experience. However, if you
have KEEPDARI set appropriately, there are two other things you should
explore:
1) If you are hand-coding your procedures - as opposed to using the Stored
Procedure Builder/Development Center - your program preparation procedures
may not be correct. You may be compiling the latest version of your program
but your preparation procedures may be putting an older version of the
..class file in your SQLLIB\FUNCTION\JAR\<schema> directory.
2) You may have *both* a .class file and a .jar containing the same program
in your SQLLIB\
FUNCTION\JAR\<schema>\ directory. In this case, DB2 will always use the
..class file in preference to your .jar, even if the .class file is an older
version.

I''ve managed to make all three of these mistakes at one point or another so
I understand your frustration with the procedures not refreshing properly.
However, if you make sure that KEEPDARI is NO in a development environment
and verify that your preparation procedures are storing the current version
of the .class file in the SQLLIB\FUNCTION\JAR\<schema> directory, your
problem with refreshing classes *should* go away.

Rhino

"Raquel" <ra****************@yahoo.com> wrote in message
news:9a**************************@posting.google.c om...
Win XP上的UDB PE 8.1。

好的,这个功能今天引起了很多悲痛。我的存储过程是java存储过程,所有FENCED都直接放在
\sqllib \ function目录下(不内置到JAR文件中)。

虽然手册说明了SQLJ.REFRESH_CLASSES()只刷新内置到JAR文件中的
例程,我已经用这个函数成功刷新了我的
JDBC存储过程。

几天前,我开始开发SQLJ存储过程和
我花了很长时间才弄清楚我试图运行SQLJ存储过程时收到的所有奇怪错误
(参数不兼容的消息)是因为SQLJ.REFRESH_CLASSES()没有在
\sqllib \ function中刷新我的SQLJ存储过程。我每次更改并重新编译存储过程时都必须停止并启动数据库管理器。这解决了
问题。

在dbm config中保持KEEPFENCED。文件设置为YES(默认)。

无论如何,我的问题是:列表中有人知道
处理SQLJ.REFRESH_CLASSES()是什么?为什么它适用于JDBC
过程而不适用于SQLJ过程。实际上,根据手册,它只应*用于*内置于JAR
文件中的存储过程。由于我的JDBC存储过程没有内置到JAR文件中,所以即使使用JDBC,SQLJ.REFRESH_CLASSES()也不应该有效。

您在这方面的经验是什么。
< TIA
拉奎尔。
UDB PE 8.1 on Win XP.

ok, this function caused a lot of grief today. My stored procedures
are java stored procedures, all FENCED and directly placed in
\sqllib\function directory (not built into JAR files).

While the manuals state that SQLJ.REFRESH_CLASSES() only refreshes the
routines built into JAR files, I have been successfully refreshing my
JDBC stored procedures with this function.

A couple of days back, I started developing SQLJ stored procedures and
it took me a long while to figure out that all the strange errors I
was receiving while attempting to run the SQLJ stored procedures
(messages like arguments not being compatible etc.) were because
SQLJ.REFRESH_CLASSES() was NOT refreshing my SQLJ stored procedures in
\sqllib\function. I had to stop and start the database manager
everytime I changed and recompiled a stored procedure. This solved the
problem.

KEEPFENCED in dbm config. file is set to YES (default).

Anyway, so my question is: Is someone on the list aware of what the
deal with SQLJ.REFRESH_CLASSES() is? Why does it work with JDBC
procedures and not with SQLJ procedures. Actually, per the manual, it
should work *only* for stored procedures that are built into JAR
files. Since my JDBC stored procedures are not built into JAR files,
SQLJ.REFRESH_CLASSES() should not have worked even with JDBC.

What are your experiences in this regard.

TIA
Raquel.



这篇关于SQLJ.REFRESH_CLASSES()....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆