install_ojvmwcu.sql and “Enter value for 1:”

In the Oracle JVM Web Services Call-Out Utility Developer’s guide, it states that the install_ojvmwcu.sql script must be run, but if you do that, it will ask you for a value. Which value?

In 12.2.0.1 the script has been changed, but the documentation hasn’t. The value it is asking for is a password, the password of the OJVMWCU_INSTALL user. Hang on? According to the docs this user must be created manualy first… not any more.

The “install_ojvmwcu.sql” calls “@configure_ojvmwcu.sql &1”, that’s where the “Enter value for 1:” comes from.
The “configure_ojvmwcu.sql” contains:

install_schema  VARCHAR2(20) := 'OJVMWCU_INSTALL';
...

procedure create_user as
  user_exists integer := 0;
begin
  select count(1) into user_exists from dba_users where username = install_schema;
  if user_exists != 0 then
    execute immediate 'drop user ' || install_schema || ' cascade';
  end if;
  execute immediate 'create user ' || install_schema || ' identified by &1';
...

Aha! The &1 the password of the OJVMWCU_INSTALL user, if it’s there it will be dropped and it will be created.

So, run “install_ojvmwcu.sql  password” for installing and creating the OJVMWCU_INSTALL user automagically. After that, grant users with “@grant_ojvmwcu.sql  user”.

Oh, run an “utlrp” (recompile invalid objects) after running the install_ojvmwcu.sql script.

Happy installing.

JInitiator: “Unable to verify the certificate – code will be treated as unsigned.”

When getting the following message using JInitiator: “Unable to verify the certificate – code will be treated as unsigned.”, please check “Control Panel > JInitiator > Cache”, to which location Java will store the ‘Oracle Jar Cache’ and JInitiator settings (like the ‘Grant Always’ setting and ‘Oracle Jar Cache’ directory) in <USERHOME>\.jinit\properties<jinit version> and jpicerts<jinit version>.

Java will get the USERHOME path from the Windows registry [HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop] when looking for the Desktop path setting and truncates the ‘Desktop’ part. Most of the time this will result in the correct USERHOME directory, but when this setting is changed to a network path where users are not granted write access, Java is not able to store the Cache and JInitiator settings.

Ofcourse, this can be one of a few problems, but if you suspect a case like this, there might be a solution… Continue reading