Search This Blog

Friday, 18 April 2008

JDBC Thin connection using tnsnames.ora entry

As of the 10.2.x JDBC driver we now allow you to connect to your database using a tnsnames.ora entry from JDBC THIN. Previously this was not possible without fully qualifying the description alias. To do this in 10.2.x JDBC driver you can do it one of 2 ways.

Option 1:

Pass a system property as follows at the command line

-Doracle.net.tns_admin=D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN

Option 2:


System.setProperty("oracle.net.tns_admin",
"D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN");



His a quick code example showing how it works:

tnsnames.ora entry

LNX102 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = papicell-au2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = lnx102)
)
)

Java Code


/*
* Option 1 : Systsem property as command line option
*
* -Doracle.net.tns_admin=D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
*
* Option 2 : System propety within code
*
* System.setProperty("oracle.net.tns_admin",
* "D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN");
*/

package pas.test;

import java.sql.*;
import oracle.jdbc.OracleDriver;

public class JdbcThinTnsNamesTest
{
public JdbcThinTnsNamesTest()
{
System.setProperty("oracle.net.tns_admin",
"D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN");
}

public static Connection getConnection() throws SQLException
{
String username = "scott";
String password = "tiger";
String thinConn = "jdbc:oracle:thin:@lnx102";
DriverManager.registerDriver(new OracleDriver());
Connection conn = DriverManager.getConnection(thinConn,username,password);
conn.setAutoCommit(false);
return conn;
}

public void run () throws SQLException
{
Connection conn = getConnection();
System.out.println("Auto Commit = " + conn.getAutoCommit());
conn.close();
}

public static void main(String[] args)
{
JdbcThinTnsNamesTest test = new JdbcThinTnsNamesTest();
try
{
test.run();
System.out.println("all done..");
}
catch (SQLException e)
{
e.printStackTrace();
}
}

}


Runtime Output

Auto Commit = false
all done..

Tuesday, 15 April 2008

SQLException: Data size bigger than max size for this type using 9i JDBC Driver

If your using the 9i JDBC Driver in this case the (9.2.0.8) driver and you try to update/insert a very large string , say 100,000 bytes into a LONG column you will get a runtime error as follows

java.sql.SQLException: Data size bigger than max size for this type: 1000000

There are 2 ways to get around this.

OPTION 1
-----------

Use CLOB to handle very large column data instead of using a LONG column. CLOB columns is the recommended way to deal with large column values, so avoid using LONG if possible.

OPTION 2
-----------

Until JDBC THIN Driver 10.1.x there is a restriction on the amount of data that can be used be with methods setBytes(), setString() for example.

When using a JDBC THIN Driver 9.x or 10.1.x you should use setBinaryStream() or setCharacterStream() instead. The 10.2.x driver will automatically switch to using streams if the data exceeds a certain value. So switching to the 10.2.0.4 JDBC driver for example will make it even easier to get around this.


Here is some code you can use to verify this with 9.2.0.8 JDBC driver then use the 10.2.0.4 driver and verify it will work in 10.2.0.4 JDBC Driver fine.

SQL Needed


drop table long_table;

create table long_table
(id number,
long_col long)
/

insert into long_table values (1, 'Sample Data');

commit;


Java Code


import java.sql.*;

import oracle.jdbc.OracleDriver;

public class LongDemo
{
public LongDemo()
{
}

public void run () throws SQLException
{
Connection conn = getConnection();

// print driver details
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData ();

// gets driver info:

System.out.println("\n=============\nDatabase Product Name is ... " +
meta.getDatabaseProductName());
System.out.println("Database Product Version is " +
meta.getDatabaseProductVersion());
System.out.println("\n=============\nJDBC Driver Name is ........ " +
meta.getDriverName());
System.out.println("JDBC Driver Version is ..... " +
meta.getDriverVersion());
System.out.println("JDBC Driver Major Version is " +
meta.getDriverMajorVersion());
System.out.println("JDBC Driver Minor Version is " +
meta.getDriverMinorVersion());
System.out.println("=============");

String updateQuery = "update long_table set long_col = ? where id = 1";
PreparedStatement updateStatement = conn.prepareStatement(updateQuery);
String outValue = createLargeString(1000000);
System.out.println("Update String size: " + outValue.length());
updateStatement.setString(1, outValue);
updateStatement.executeUpdate();
updateStatement.close();

conn.commit();
conn.close();
}

/*
* Creates a large string the size we require
*/

private String createLargeString(int size)
{
StringBuffer b = new StringBuffer(size);
for (int i=0; i<size; i++)
{
b.append("X");
}
return b.toString();
}

public static Connection getConnection() throws SQLException
{
String username = "tars";
String password = "tars";
String thinConn = "jdbc:oracle:thin:@papicell-au2:1521:lnx102";
DriverManager.registerDriver(new OracleDriver());
Connection conn = DriverManager.getConnection(thinConn,username,password);
conn.setAutoCommit(false);
return conn;
}

public static void main(String[] args)
{
LongDemo longDemo = new LongDemo();
try
{
longDemo.run();
System.out.println("update worked fine");
}
catch (SQLException e)
{
e.printStackTrace();
}
}
}

Monday, 14 April 2008

Obtaining statistics on a Message Driven Bean from a JMX Client connecting to OC4J 10.1.3.x

A while ago steve showed me a few code demos on how to access OC4J Mbeans within OC4J 10.1.3.x. Since then I have created a few command line clients to perform tasks which admin_client.jar doesn't expose. A few for example include these.
  • View application statuses
  • Stop/Start a Message Driven Bean
While doing this I noticed that if you ever need to access a MDB statistics you would do it with code as follows.


private void showStats(ObjectName cp) throws Exception
{

EJBStats stats =
(EJBStats) mbs.getAttribute(cp, "stats");



When you run this with say with a 10.1.3.3 OAS client side distribution home you will get a runtime exception as follows.

[java] 14/04/2008 12:05:27 oracle.j2ee.rmi.RMIMessages
EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
[java] WARNING: Exception returned by remote server: {0}
[java] java.lang.NoClassDefFoundError:
Loracle/oc4j/admin/management/callbackinterfaces/MessageDrivenBeanCallBackIf;


In order to get around this add the following JAR to your classpath, which can be obtained from the OAS server home or a stand alone OC4J home.

$ORACLE_HOME\j2ee\home\lib\oc4j-internal.jar

Tuesday, 1 April 2008

Changes made in bc4j.xcfg from JDeveloper Application Module Configuration editor

The file bc4j.xcfg has various configuration parameter's which if not displayed will take on their defaults. After a recent customer visit I was asked if a default configuration parameter was added to the file and then reverted back to it's original default value is the parameter removed from the bc4j.xcfg file to ensure it can be supplied at the container level if required?

I would suspect it would but to prove that here is what I did.

1. Created a simple ADF BC project based on 1 entity and 1 view object, in this case EMP
2. Right click on the application module and select -> Configurations
3. Click the "Edit" button on your configuration
4. Click on the tab "Pooling and scalability"
5. Set the initial pool size of the "Application Pool" to 5 and press OK

The following is added to the bc4j.xcfg file.

<jbo.ampool.initpoolsize>5</jbo.ampool.initpoolsize>

Now if we redit the config and set the same value to 0 (which is it's default) does it remove the parameter?

The answer is yes.

Of course you can click on "Reset" button BUT that will remove all configuration parameters you set which may not be what you require.

Friday, 14 March 2008

JDBC SSL Demo from JDeveloper Using a Wallet (PKCS12) as a truststore

I decided to test JDBC SSL using a PKCS12 wallet as a truststore to see if I could get this working from JDeveloper here is how I did this:

1. Before trying this I need to be sure I can connect using SQL*Plus and that the database is configured to use TCPS. My SQL*Plus entry was as follows which I used to ensure it was working fine.

SRACANOV-au2_SSL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = sracanov-au2.au.oracle.com)(PORT = 2484))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

The sqlnet.ora file is as follows:

SQLNET.AUTHENTICATION_SERVICES=(TCPS,NTS)

SSL_CLIENT_AUTHENTICATION = FALSE

WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\Wallets\server)
)
)

SSL_CIPHER_SUITES= (SSL_RSA_WITH_AES_128_CBC_SHA, SSL_DH_anon_WITH_3DES_EDE_CBC_SHA)

Now in SQL*Plus we can connect as shown:

$ sqlplus scott/tiger@SRACANOV-au2_SSL

SQL*Plus: Release 10.1.0.4.2 - Production on Fri Mar 14 08:32:38 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SCOTT@SRACANOV-au2_SSL>

With that working we can now move over to the JDBC side and what is required in JDeveloper to get this to work

2. Before we begin because we are using a PKCS12 wallet (ewallet.p12) we have to set the following in our JRE runtime environment file java.security as shown below. I am doing this in my JDeveloper home as that is where I am going to run the client from. Notice how "security.provider.3=oracle.security.pki.OraclePKIProvider" has been added and is third on the list.

#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=oracle.security.pki.OraclePKIProvider
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider

Note: This file would exist in the following location from JDeveloper:

$JDEV_HOME\jdk\jre\lib\security\java.security

3. Now we can start JDeveloper and create a new empty project. In that project we need to add 2 JAR files for our code to compile, one is the 10.2.0.3 JDBC driver file and the other is oraclepki.jar

ojdbc14.jar (10.2.0.3 should be used or later)
$JDEV_HOME\jlib\oraclepki.jar

4. Now add a Java Class as follows, it's referring to the client wallet and some properties which are required to be set, there highlighted in RED.


package pas.jdbc.ssl.demo;

import java.security.Security;

import java.sql.Connection;
import java.sql.SQLException;

import java.sql.*;
import oracle.jdbc.OracleDriver;

public class JDBCSSLTest
{

public JDBCSSLTest()
{
// must enable this
Security.addProvider(new oracle.security.pki.OraclePKIProvider());
}

public void run () throws SQLException
{
Connection conn = getConnection();
System.out.println("Auto Commit = " + conn.getAutoCommit());
conn.close();
}

public static Connection getConnection() throws SQLException
{
String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)" +
"(HOST=sracanov-au2.au.oracle.com)(PORT=2484))" +
"(CONNECT_DATA=(SERVICE_NAME=orcl)))";
java.util.Properties props = new java.util.Properties();

props.setProperty("user", "scott");
props.setProperty("password", "tiger");
props.setProperty("javax.net.ssl.trustStore",
"D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN\\" +
"Wallets\\client\\ewallet.p12");
props.setProperty("javax.net.ssl.trustStoreType","PKCS12");
props.setProperty("javax.net.ssl.trustStorePassword","welcome2");

DriverManager.registerDriver(new OracleDriver());
Connection conn = DriverManager.getConnection(url, props);
return conn;
}

public static void main(String[] args) throws SQLException
{
JDBCSSLTest dSTest = new JDBCSSLTest();
dSTest.run();
System.out.println("all done..");
}
}



5. Now run the class and verify it is able to establish a connection as follows:

Auto Commit = true
all done..

Few things to note here.

- We must enable Oracle's PKI provider to use wallets as shown below.

// must enable this
Security.addProvider(new oracle.security.pki.OraclePKIProvider());

- The following properties must be set before a connection can be retrieved, and the database username/password are also required along with the wallet password.

props.setProperty("user", "scott");
props.setProperty("password", "tiger");
props.setProperty("javax.net.ssl.trustStore",
"D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN\\" +
"Wallets\\client\\ewallet.p12");
props.setProperty("javax.net.ssl.trustStoreType","PKCS12");
props.setProperty("javax.net.ssl.trustStorePassword","welcome2");

- The connect URL should include a description using TCPS as shown below

"jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)" +
"(HOST=sracanov-au2.au.oracle.com)(PORT=2484))" +
"(CONNECT_DATA=(SERVICE_NAME=orcl)))";

Wednesday, 27 February 2008

ClassCastException casting to OracleConnection from a Data Source Connection in OAS 10.1.3.x

I have previously blogged how to access a data source remotely using OAS 10.1.3.x as shown below.

http://theblasfrompas.blogspot.com/2007/07/access-data-source-from-oc4j-remotely.html


Normally I cast back to a java.sql.Connection but you can also cast to an OracleConnection, as shown below.

OracleConnection oraConnection = null;
InitialContext ic = new InitialContext(env);
DataSource ds = (DataSource) ic.lookup("jdbc/scottDS");
oraConnection = (OracleConnection) ds.getConnection();

When you do this you may get a runtime exception as follows:

Exception in thread "main" java.lang.ClassCastException: oracle_jdbc_driver_LogicalConnection_Proxy

The problem here is you must import the correct OracleConnection. The one you want to import is "oracle.jdbc.OracleConnection". You end up with the error above if you use "oracle.jdbc.driver.OracleConnection".

Monday, 25 February 2008

Cancelling Long Running Queries with 11g JDBC Thin Driver

With the introduction of the 11g JDBC driver calling Statement.cancel() will actually cancel a long running query where in 10g JDBC Driver this would not work. Now with the 11g JDBC driver the cancel request is sent out of band. The out-of-band implementation may allow the database server to process the request immediately and terminate the system call that would otherwise block the query. This database feature is OS dependent and may not work on all platforms. I tested on Linux x86-32bit system with a 11.1.0 Database and it worked fine.

Java Code:

CancelQuery11G.java


package pas.jdbc.cancel;

import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;

import java.sql.Connection;

import java.sql.ResultSet;
import java.sql.SQLException;

import java.sql.Statement;

import oracle.jdbc.pool.OracleDataSource;

public class CancelQuery11G
{
private OracleDataSource ods = null;
public final String userId = "scott";
public final String password = "tiger";
public final String url =
"jdbc:oracle:thin:@myhost:1521:linux11g";

public CancelQuery11G() throws SQLException
{
ods = new OracleDataSource();
ods.setUser(userId);
ods.setPassword(password);
ods.setURL(url);
}

public void run () throws SQLException, IOException
{
Connection conn = null;
Statement stmt = null;

ResultSet rset = null;

try
{
conn = getConnection();
getDriverDetails(conn);
stmt = conn.createStatement();

CancelThread ct = new CancelThread(stmt);
Thread th = new Thread(ct);
th.start();
Thread.sleep(1000);
System.out.println("Hit enter to cancel:");
BufferedReader stdin = new BufferedReader( new InputStreamReader( System.in ) );
String input = stdin.readLine();

System.out.println("Cancelling Query");
stmt.cancel();
System.out.println("Query Cancelled");

System.out.println("Hit enter to finish:");
stdin.readLine();

}
catch (SQLException e)
{
System.out.println("SQLException in run() : ");
e.printStackTrace();
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
catch (InterruptedException ie)
{
ie.printStackTrace();
}
finally
{
if (ods != null)
ods.close();

if (conn != null)
conn.close();
}

}

private Connection getConnection() throws SQLException
{
return ods.getConnection();
}

private void getDriverDetails (Connection conn) throws SQLException
{
java.sql.DatabaseMetaData meta = conn.getMetaData ();

// gets driver info:

System.out.println("=============\nDatabase Product Name is ... " +
meta.getDatabaseProductName());
System.out.println("Database Product Version is " +
meta.getDatabaseProductVersion());
System.out.println("=============JDBC Driver Name is ........ " +
meta.getDriverName());
System.out.println("JDBC Driver Version is ..... " +
meta.getDriverVersion());
System.out.println("JDBC Driver Major Version is " +
meta.getDriverMajorVersion());
System.out.println("JDBC Driver Minor Version is " + meta.getDriverMinorVersion());
System.out.println("=============");
}
public static void main(String[] args) throws Exception
{
CancelQuery11G test = new CancelQuery11G();
test.run();
System.out.println("Completed");
}
}




CancelThread.java


package pas.jdbc.cancel;

import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;

public class CancelThread implements Runnable
{
private Statement stmt = null;
String longRunningSQL =
"select * from all_objects";
private int i = 0;

public CancelThread(Statement oracleStmt)
{
stmt = oracleStmt;
}

public void run()
{
ResultSet rset = null;

try
{
System.out.println("Executing statement....");
rset = stmt.executeQuery(longRunningSQL);
System.out.println("Processing resultset now..");
while (rset.next())
{
i++;
}
System.out.println("Finished with resultset and statement now..");
}
catch (SQLException e)
{
e.printStackTrace();
}
finally
{
try
{
if (rset != null)
rset.close();

if (stmt != null)
stmt.close();
}
catch (SQLException e)
{

}
}

}
}



Output:

=============
Database Product Name is ... Oracle
Database Product Version is Oracle Database 11g Release 11.1.0.0.0 - Production
=============
JDBC Driver Name is ........ Oracle JDBC driver
JDBC Driver Version is ..... 11.1.0.6.0-Production
JDBC Driver Major Version is 11
JDBC Driver Minor Version is 1
=============
Executing statement....
Processing resultset now..
Hit enter to cancel:

Cancelling Query

java.sql.SQLException: ORA-01013: user requested cancel of current operation

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:119)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:115)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:221)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:467)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:417)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1084)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:187)
at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1312)
at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:606)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:493)
at pas.jdbc.cancel.CancelThread.run(CancelThread.java:28)
at java.lang.Thread.run(Thread.java:595)

Query Cancelled
Hit enter to finish:

Completed

Monday, 4 February 2008

Variable in list with Oracle JDBC and RDBMS

I always wanted to create a variable in list query using a single parameter and found that it wasn't possible with JDBC.

SELECT * FROM DEPT WHERE like DEPTNO IN (?);

Then I stumbled upon this on steve's blog, which he shows how he did it in ADF BC using a SQL function.

http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
126. Using Comma-Separated String Bind for Variable IN List [10.1.3.3] 10-JAN-2008

So his my simple JDBC program method showing how it works, using the DEPT table here.



public void run () throws SQLException
{
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rset = null;
String queryInList =
"SELECT DEPTNO, " +
" DNAME, " +
" LOC " +
"FROM DEPT " +
"WHERE DEPTNO IN " +
"(SELECT * FROM TABLE(CAST(in_number_list(?) as num_table)))";

try
{
conn = getConnection();
stmt = conn.prepareStatement(queryInList);
stmt.setString(1, "10, 20, 30");
rset = stmt.executeQuery();

while (rset.next())
{
System.out.println("Dept [" + rset.getInt(1) + ", " +
rset.getString(2) + "]");
}
}
catch (SQLException e)
{
System.out.println("SQLException occurred");
e.printStackTrace();
}
finally
{
if (rset != null)
rset.close();

if (stmt != null)
stmt.close();

if (conn != null)
conn.close();
}
}


So the output is as follows showing that only records 10, 20, 30 will be returned.

Dept [10, ACCOUNTING]
Dept [20, RESEARCH]
Dept [30, SALES]

Note: SQL being used is as follows


CREATE TYPE num_table AS TABLE OF NUMBER;
/
CREATE OR REPLACE FUNCTION in_number_list (p_in_list IN VARCHAR2)
RETURN num_table
AS
l_tab num_table := num_table();
l_text VARCHAR2(32767) := p_in_list || ',';
l_idx NUMBER;
BEGIN
LOOP
l_idx := INSTR(l_text, ',');
EXIT WHEN NVL(l_idx, 0) = 0;
l_tab.extend;
l_tab(l_tab.last) := to_number(TRIM(SUBSTR(l_text, 1, l_idx - 1)));
l_text := SUBSTR(l_text, l_idx + 1);
END LOOP;

RETURN l_tab;
END;
/
show errors


Friday, 1 February 2008

Incremental deployment of EJB JAR file fails in ASC

If you try to redeploy an EJB JAR file in ASC you will get a runtime error as follows.

[Dec 24, 2007 7:41:48 AM] Application Deployer for hotdeployEAR STARTS.
[Dec 24, 2007 7:41:48 AM] Stopping application : hotdeployEAR
[Dec 24, 2007 7:41:48 AM] Stopped application : hotdeployEAR
[Dec 24, 2007 7:41:48 AM] Undeploy previous deployment
[Dec 24, 2007 7:41:48 AM] Initialize /u01/oracle/product/10.1.3.2/OracleAS_pink/j2ee/pas_oc4j/applications/hotdeployEAR.ear begins...
[Dec 24, 2007 7:41:48 AM] Initialize /u01/oracle/product/10.1.3.2/OracleAS_pink/j2ee/pas_oc4j/applications/hotdeployEAR.ear ends...
[Dec 24, 2007 7:41:48 AM] Starting application : hotdeployEAR
[Dec 24, 2007 7:41:48 AM] Initializing ClassLoader(s)
[Dec 24, 2007 7:41:48 AM] Initializing EJB container
[Dec 24, 2007 7:41:48 AM] Loading connector(s)
[Dec 24, 2007 7:41:49 AM] Starting up resource adapters
[Dec 24, 2007 7:41:49 AM] Processing EJB module: anothermodule.jar
[Dec 24, 2007 7:41:49 AM] application : hotdeployEAR is in failed state
[Dec 24, 2007 7:41:49 AM] Operation failed with error: Missing class: project1.SessionEJBBean Dependent class: com.evermind.server.ejb.deployment.BeanDescriptor Loader: oc4j:10.1.3 Code-Source: /u01/oracle/product/10.1.3.2/OracleAS_pink/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in /u01/oracle/product/10.1.3.2/OracleAS_pink/j2ee/home/oc4j.jar This load was initiated at hotdeployEAR.root:0.0.0 using the Class.forName() method. The missing class is not available from any code-source or loader in the system.

The way to achieve this is to use admin_client.jar and then it will work fine. Incremental EJB deployment (updateEjbModule) is not supported in ASC.

Eg: (This will work fine)

D:\jdev\oas-admin-distribution\10132\j2ee\home>java -jar admin_client.jar deployer:oc4j:opmn://papicell-au2.au.oracle.com:6007/pas_oc4j oc4jadmin welcome1 -updateEJBModule -appName hotdeployEAR -ejbModuleName anothermodule.jar -file D:\jdev\jdevprod\10133\jdev\mywork\SR18362234.600\Project1\deploy\anothermodule.jar
07/12/24 07:39:20 Notification ==>Uploading file anothermodule.jar ...

07/12/24 07:39:21 Notification ==>Installation of File anothermodule.jar completed successfully.

D:\jdev\oas-admin-distribution\10132\j2ee\home>