• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7214
  • Last Modified:

ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown object","joxs heap","Intern")

When I try to install java on oracle (10g Release 10.2.0.2.0) I receive the following error message:

SQL> spool initjvm.log
SQL> @initjvm.sql

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


Package created.


Package body created.

No errors.

Call completed.


Call completed.


Call completed.


Table created.


Table created.


Table created.


Index created.


Index created.


Index created.


Package created.


Package body created.


Package created.


Package body created.


Call completed.


PL/SQL procedure successfully completed.

alter system flush shared_pool

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

create or replace java system
begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","unknown
object","joxs heap","Intern")
ORA-06512: at "SYS.INITJVMAUX", line 23
ORA-06512: at line 5


Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production

C:\Oracle\ora10g\javavm\install>

Thanks in advance
0
tcorigli
Asked:
tcorigli
  • 6
  • 4
  • 4
  • +1
2 Solutions
 
slightwv (䄆 Netminder) Commented:
You need more memory allocated to the sga and java_pool_size.

post the results of the following from sqlplus:  show parameter java_pool_size
0
 
tcorigliAuthor Commented:
SQL> show parameter java_pool_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
java_pool_size                       big integer 0
SQL>
0
 
slightwv (䄆 Netminder) Commented:
Cool.  Looks like you might be using Automatic Memory Management.

What are the results of:
show parameter shared_pool_size
show parameter sga_max_size
show parameter sga_target
show parameter pga_aggregate_target

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
tcorigliAuthor Commented:
SQL> show parameter java_pool_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
java_pool_size                       big integer 0
SQL> show parameter shared_pool_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 200M
SQL> show parameter sga_max_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_max_size                         big integer 332M
SQL> show parameter sga_target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_target                           big integer 0
SQL> show parameter pga_aggregate_target

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
pga_aggregate_target                 big integer 145M
SQL>
0
 
slightwv (䄆 Netminder) Commented:
The installation docs for installing Java in Oracle should have minimum requirements.  Even if you meet the minimum, it might not be enough depending on what else is running.

I would increase the sga_max_size and shared_pool_size parameters.

0
 
POracleCommented:
The Parameter called sga_target affecting here.

Choice you have:-
1)
Decrease Shared_pool_size parameter, you can set it to 0, try this if not success then go for 2nd choice.
Or
2)
Increase sga_max_size, sga_target to some large value
0
 
Aaron ShiloCommented:
To overcome this problem create a PFILE from the SPFILE:

SQL>create pfile='/u03/init.ora' from spfile;

Open and edit this file:

increase max_sga_size, java_pool_size, shared_pool_size

Open the DB for migration so:

SQL>shutdown immediate
...
SQL>startup migrate pfile=/u03/init.ora

0
 
Aaron ShiloCommented:
or

ALTER SYSTEM SET SGA_MAX_SIZE=nM SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=nM SCOPE=SPFILE
ALTER SYSTEM SET SHARED_POOL_SIZE='nM' scope=spfile;

shutdown immediate;

startup;
0
 
slightwv (䄆 Netminder) Commented:
ashilo,

I believe those parameters have already been covered.

Also, no need to increase java_pool_size.  If not set it is taken from shared_pool_size.

>>To overcome this problem create a PFILE from the SPFILE:

Unnecessary.  Just alter the spfile directly with the commands in your second post.
0
 
Aaron ShiloCommented:
slightwv : i found that sometimes it is necesery to set memory parameters to minimum value in order not to run out of memory when needed.

but hi all CREDIT to you.
0
 
tcorigliAuthor Commented:
SQL> ALTER SYSTEM SET SGA_MAX_SIZE=996 SCOPE=SPFILE;

System altered.

SQL> ALTER SYSTEM SET SGA_TARGET=10 SCOPE=SPFILE;

System altered.

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE=600 scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORA-00821: Specified value of sga_target 4M is too small, needs to be at least 160M
SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available


SQL> ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=480 SCOPE=SPFILE
*
ERROR at line 1:
ORA-01034: ORACLE not available


SQL> startup;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup mount
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL> startup mount;
ORA-00093: _shared_pool_reserved_min_alloc must be between 4000 and 0
SQL>

What should I do now?
0
 
Aaron ShiloCommented:
create pfile='/u03/init.ora' from spfile;

edit the parameter in the pfile ans startup the instance using the pfile.

create spfile from pfile = '/u03/init.ora' ;

shutdown;
startup;
0
 
slightwv (䄆 Netminder) Commented:
Yes.  Since you set the values so low in your previous alter system statements before shutdown, you have to create a temporary pfile to get the database open.

After you edit the values to acceptable numbers (Don't forget the M and G after the values for Meg and Gig) and get the database opened,  don't forget to recreate the spfile:

create spfile from pfile='/u03/init.ora';

using the example filder from above.
0
 
tcorigliAuthor Commented:
I've requested that this question be deleted for the following reason:

not needed anymore
0
 
slightwv (䄆 Netminder) Commented:
Just because you don't need this anymore doesn't mean we did not answer your question.

Please post your final solution and if it wasn't covered here, I'll retract my objection.
0
 
POracleCommented:
you want to close your 2 question!!
(Another is http://www.experts-exchange.com/Database/Oracle/Q_27031282.html?cid=238)

Really you didn't get any hint or solution from EE for both of these two?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now