Oracle: How to avoid & ldquo; java session cleared & rdquo; error when loading a java class?

advertisements

Whenever I load a java class, I will get this error on my open sessions when I call a member of the class. Is it possible to avoid this?

ORA-29549: class MH.Tbs has changed, Java session state cleared
ORA-06512: at "MH.TBS", line 2
ORA-06512: at line 4
29549. 00000 -  "class %s.%s has changed, Java session state cleared"
*Cause:    A class in use by the current session was redefined or dropped,
           invalidating the current Java session state and requiring that
           it be cleared.
*Action:   No action required.


You can not avoid this, but there are workarounds.

When you change (loadjava, dropjava etc for example) the classes used by java stored procedures, this happens. Recalling might work; ending your session, creating a new one and recalling will definitely work. This is like the pl/sql packages getting invalidated when related(dependent) objects are modified.

by the way, you might like to check this also: http://forums.oracle.com/forums/thread.jspa?threadID=856644