Appendix
Creating a Smart Blob Space (sbspace)
You have been advised do the following steps under the informix user.
When running:
onspaces -c -S sbspace1 -p C:\IFMXDATA\ol_scoobidoo\sbspace1_dat.000 -o 0 -s 10000 |
The result should be:
Verifying physical disk space, please wait ... Space successfully added. ** WARNING ** A level 0 archive of Root DBSpace will need to be done. |
If you get:
The file C:\IFMXDATA\ol_scoobidoo\sbspace1_dat.000 does not exist. |
Create the file first, by calling:
copy con C:\IFMXDATA\ol_scoobidoo\sbspace1_dat.000 |
Press Ctrl+Z (or F6) then Enter to exit. The file is created and you can call the onspaces utility again.
Install the Super Stores database
You are advised do the following steps under the informix user.
This example relies on the Super Store database, which is not installed by default on the system.
First you need to create an empty file that will contain the Smart Blob Space.
copy con C:\IFMXDATA\ol_scoobidoo\s9_sbspc_dat.000 |
Press Ctrl+Z (or F6) then Enter to exit. You then need to run onspaces to create the Smart Blob Space.
onspaces -c -S s9_sbspc -g 2 -p C:\IFMXDATA\ol_scoobidoo\s9_sbspc_dat.000 -o 0 -s 2000 |
Finally, you can install it:
dbaccessdemo_ud –log–dbspace dbs_scoobidoo superstores_demo |
Restart the Informix engine from the command line.
It is sometimes easier to do things through the command line rather than through clicking. Here is a way to restart your IDS instance without using the mouse.
To stop the engine, type:
net stop "Informix IDS - ol_scoobidoo" |
You should get:
The Informix IDS - ol_scoobidoo service is stopping.... The Informix IDS - ol_scoobidoo service was stopped successfully. |
To start the engine, type:
net start "Informix IDS - ol_scoobidoo" |
You should get:
The Informix IDS - ol_scoobidoo service is starting. The Informix IDS - ol_scoobidoo service was started successfully. |
Listing the Virtual Processors
To be sure that your JVP is running, you can use the onstat command.
onstat -g glo |
This is a typical result when the JVP is not running.
IBM Informix Dynamic Server Version 10.00.TC4
-- On-Line -- Up 1 days 04:57:56 -- 21568 Kbytes
MT global info:
sessions threads vps lngspins
0 14 8 11
sched calls thread switches yield 0 yield n yield forever
total: 6343727 650771 5692983 208988 167929
per sec: 0 0 0 0 0
Virtual processor summary:
class vps usercpu syscpu total
cpu 1 2.92 1.00 3.92
aio 1 0.00 0.00 0.00
lio 1 0.00 0.00 0.00
pio 1 0.00 0.00 0.00
adm 1 0.25 0.20 0.45
soc 2 0.00 0.00 0.00
msc 1 0.00 0.07 0.07
total 8 3.17 1.27 4.43
Individual virtual processors:
vp pid class usercpu syscpu total
1 2472 cpu 2.92 1.00 3.92
2 3576 adm 0.25 0.20 0.45
3 3580 lio 0.00 0.00 0.00
4 3680 pio 0.00 0.00 0.00
5 3716 aio 0.00 0.00 0.00
6 3720 msc 0.00 0.07 0.07
7 3724 soc 0.00 0.00 0.00
8 3728 soc 0.00 0.00 0.00
tot 3.17 1.27 4.43 |
This is a typical result when the JVP is running.
IBM Informix Dynamic Server Version 10.00.TC4
-- On-Line -- Up 00:01:27 -- 21568 Kbytes
MT global info:
sessions threads vps lngspins
0 14 9 0
sched calls thread switches yield 0 yield n yield forever
total: 4829332 210947 4618410 129 105396
per sec: 0 0 0 0 0
Virtual processor summary:
class vps usercpu syscpu total
cpu 1 2.18 0.72 2.90
aio 1 0.00 0.00 0.00
lio 1 0.00 0.00 0.00
pio 1 0.00 0.00 0.00
adm 1 0.00 0.00 0.00
soc 2 0.00 0.00 0.00
msc 1 0.00 0.00 0.00
jvp 1 0.00 0.00 0.00
total 9 2.18 0.72 2.90
Individual virtual processors:
vp pid class usercpu syscpu total
1 2888 cpu 2.18 0.72 2.90
2 2260 adm 0.00 0.00 0.00
3 6052 jvp 0.00 0.00 0.00
4 3784 lio 0.00 0.00 0.00
5 2316 pio 0.00 0.00 0.00
6 5452 aio 0.00 0.00 0.00
7 4876 msc 0.00 0.00 0.00
8 2928 soc 0.00 0.00 0.00
9 3644 soc 0.00 0.00 0.00
tot 2.18 0.72 2.90 |
If you want to use the JDK on the command line, you should ensure that javac (the Java compiler) is in your system path.
To check that it is available, start a command prompt and type javac. If you get the following error message, continue reading.
'javac' is not recognized as an internal or external command, operable program or batch file. |
Locate javac on your system. Typically it is in C:\Program Files\Java\jdk1.5.0_05\bin. The minor version might defer on your system.
Click Start > Control Panel. Double-click on the System icon. Click on the Advanced tab, and then click Environment Variables. In the system variables block, find and select the Path entry. Click Edit.
Before typing anything, ensure that your cursor is at the end of the field. Press either the right arrow key or the End key on your keyboard.
Type:
;C:\Program Files\Java\jdk1.5.0_05\bin |
Do not forget the semicolon.
Click OK three times.
To check that it works, open a new command prompt and type javac, you should get its usage.
Troubleshooting – Error #25785 (Informix error)
If you get:
25785: Cannot create external routine (gethelloworld) without the EXTEND role. |
It means that you cannot create an external function or a procedure without the privileges of the EXTEND role. You can either grant the role to the user or log in as the Informix user. DB-Access lets you connect as a specific user: Connection, Connect, Select your database server (here ol_scoobidoo), enter informix as the username and then your password, and you can select the database.
Troubleshooting – Error #46002 (SQL State)
If you get:
(46002) - Attempt to remove or alter path for non-existing jar: (superstores_demo.informix.hw_jar). |
Symptom: You are probably trying to update a JAR, which does not exist (like launching the update script before the install script or just after the uninstall script).
Solution: Install the JAR first.
If you get:
(46002) - Attempt to install an existing jar: (superstores_demo.informix.pc_jar). |
Symptom: You are probably running the install script but the JAR is already installed.
Solution: Uninstall the JAR first or use the update script.
Troubleshooting – Error #46003 (SQL State)
If you get:
(46003) - Invalid jar removal. All dependent UDRs not dropped. |
You will have a hard time finding where the error is documented. It is a SQL State error: “46003 Java DDL - Invalid class deletion”.
I originally made a typo when I installed the Hello World function and called it “getHellowWorld” (notice the two ‘w’s). The function was installed OK (with the typo), was running OK (with the typo) but uninstallation did not work as I was dropping the function without the typo, and IDS did not want to remove the JAR file, and thus the error #46003.
We used AGS’ ServerStudio and it listed all the functions available to me and we discovered the wrongly-spelled function in the database.
Troubleshooting – Function not found
Another common problem is that the function is not found by the engine, simply because the user does not have the rights to run it. Think about granting the right to your users.
GRANT EXECUTE ON FUNCTION getHelloWorld() TO ALL; |
Problems when installing the source code
You may encounter some problem when installing the source code on your system, as illustrated in Figure 25.
Figure 25. Problem during integration of the project
The error Unbound classpath variable: 'INFORMIXKRAKATOADIR/jdbc.jar' in project net.jgp.lab.udr.pricechanger, simply means that your INFORMIXKRAKATOADIR variable is not defined within your workspace. To solve the problem, refer to an earlier section of the tutorial where the INFORMIXKRAKATOADIR variable was set.



