Java Concurrent Program Errors out
Hi All,
Request you to help me in this issue as this is on high priority.
we have registered a Java Concurrent Program Named Genus Merge Two P45 Pdf's which gives the output in pdf format.
The concurrent program errors out showing the log as follows :
GENUS Custom: Version : UNKNOWN
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
GEN_MERGE_TWO_PDFS module: Genus Merge Two P45 Pdf's
Current system time is 10-MAR-2010 07:10:43
Exception in static block of jtf.cache.appsimpl.AppsCacheLogger. Stack trace is: oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509)
at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)
at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:210)
at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:169)
at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)
at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1201)
at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1044)
at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1013)
at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:980)
at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:967)
at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:570)
at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)
at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:292)
at oracle.apps.fnd.common.WebAppsContext.<init>(WebAppsContext.java:1002)
at oracle.apps.jtf.cache.ArchitectureWrapper.createAppsContextWithDBCFile(ArchitectureWrapper.java:143)
at oracle.apps.jtf.cache.ArchitectureWrapper.createDefaultAppsContext(ArchitectureWrapper.java:107)
at oracle.apps.jtf.cache.ArchitectureWrapper.createAppsContext(ArchitectureWrapper.java:96)
at oracle.apps.jtf.cache.appsimpl.AppsCacheLogger.<clinit>(AppsCacheLogger.java:43)
at oracle.apps.jtf.cache.appsimpl.AppsCacheEnvironment.getCacheLogger(AppsCacheEnvironment.java:67)
at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:711)
at oracle.apps.jtf.cache.CacheManager.<clinit>(CacheManager.java:378)
at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
at oracle.apps.fnd.cache.Cache.<init>(Cache.java:89)
at oracle.apps.fnd.cache.AppsCache.<init>(AppsCache.java:86)
at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
at oracle.apps.fnd.profiles.Profiles.<clinit>(Profiles.java:241)
at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileStore.java:498)
at oracle.apps.fnd.profiles.ExtendedProfileStore.<init>(ExtendedProfileStore.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContext.java:3959)
at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:780)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:767)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:749)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:564)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)
at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:292)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
Caused by: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
at oracle.apps.fnd.common.Pool.createObject(Pool.java:1321)
at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:1062)
at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:752)
at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:297)
at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1720)
at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2306)
at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2243)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2101)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1910)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1754)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1767)
at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1453)
at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:168)
at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500)
... 44 more
Caused by: java.lang.AbstractMethodError: oracle.sql.LnxLibThin.lnxnuc([BILjava/lang/String;)Ljava/lang/String;
at oracle.sql.NUMBER.toInt(NUMBER.java:414)
at oracle.jdbc.dbaccess.DBConversion.NumberBytesToInt(DBConversion.java:2959)
at oracle.jdbc.driver.OracleStatement.getIntValue(OracleStatement.java:4596)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:536)
at oracle.apps.fnd.security.ConnectionManager.setClientData(ConnectionManager.java:1497)
at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1446)
at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1325)
at oracle.apps.fnd.security.AppsConnectionManager.makeGwyuidConn(AppsConnectionManager.java:884)
at oracle.apps.fnd.security.AppsConnectionManager.getGwyuidConn(AppsConnectionManager.java:962)
at oracle.apps.fnd.security.AppsConnectionManager.makeGuestConnection(AppsConnectionManager.java:780)
at oracle.apps.fnd.security.DBConnObj.<init>(DBConnObj.java:246)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.apps.fnd.common.Pool.createObject(Pool.java:1308)
... 57 more
Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps.jtf.base.resources.FrameworkException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:718)
at oracle.apps.jtf.cache.CacheManager.<clinit>(CacheManager.java:378)
at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
at oracle.apps.fnd.cache.Cache.<init>(Cache.java:89)
at oracle.apps.fnd.cache.AppsCache.<init>(AppsCache.java:86)
at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
at oracle.apps.fnd.profiles.Profiles.<clinit>(Profiles.java:241)
at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileStore.java:498)
at oracle.apps.fnd.profiles.ExtendedProfileStore.<init>(ExtendedProfileStore.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContext.java:3959)
at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:780)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:767)
at oracle.apps.fnd.common.Context.setProfileStore(Context.java:749)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:564)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)
at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:292)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
Caused by: oracle.apps.jtf.base.resources.FrameworkException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
at oracle.apps.jtf.base.resources.FrameworkException.convertException(FrameworkException.java:607)
at oracle.apps.jtf.base.resources.FrameworkException.addException(FrameworkException.java:585)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:66)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:88)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:202)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:218)
at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkException.java:249)
... 24 more
Exception in thread "main" oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
at oracle.apps.fnd.common.Pool.createObject(Pool.java:1321)
at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:1062)
at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:752)
at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:297)
at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1720)
at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2306)
at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2243)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2101)
at oracle.apps.fnd.common.AppsContext.getLocalJDBCConnection(AppsContext.java:2481)
at oracle.apps.fnd.common.AppsContext.getLocalJDBCConnection(AppsContext.java:2416)
at oracle.apps.fnd.common.AppsContext.getLocalJDBCConnection(AppsContext.java:2397)
at oracle.apps.fnd.common.ProfileCache.getProfileObject(ProfileCache.java:110)
at oracle.apps.fnd.common.NativeProfileStore.getSpecificProfileFromDB(NativeProfileStore.java:375)
at oracle.apps.fnd.common.NativeProfileStore.getProfile(NativeProfileStore.java:314)
at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1201)
at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1044)
at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1013)
at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:980)
at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:967)
at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:570)
at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)
at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)
at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:292)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
Caused by: java.lang.AbstractMethodError: oracle.sql.LnxLibThin.lnxnuc([BILjava/lang/String;)Ljava/lang/String;
at oracle.sql.NUMBER.toInt(NUMBER.java:414)
at oracle.jdbc.dbaccess.DBConversion.NumberBytesToInt(DBConversion.java:2959)
at oracle.jdbc.driver.OracleStatement.getIntValue(OracleStatement.java:4596)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:536)
at oracle.apps.fnd.security.ConnectionManager.setClientData(ConnectionManager.java:1497)
at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1446)
at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1325)
at oracle.apps.fnd.security.AppsConnectionManager.makeGwyuidConn(AppsConnectionManager.java:884)
at oracle.apps.fnd.security.AppsConnectionManager.getGwyuidConn(AppsConnectionManager.java:962)
at oracle.apps.fnd.security.AppsConnectionManager.makeGuestConnection(AppsConnectionManager.java:780)
at oracle.apps.fnd.security.DBConnObj.<init>(DBConnObj.java:246)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.apps.fnd.common.Pool.createObject(Pool.java:1308)
... 26 more
Start of log messages from FND_FILE
End of log messages from FND_FILE
oracle.apps.genus.utils.MergePdfs
Program exited with status 1
Executing request completion options...
Finished executing request completion options.
Concurrent request completed
Current system time is 10-MAR-2010 07:10:47
---------------------------------------------------------------------------
Hi,
FYI,
I am not sure about this error,
Use the following links, hope it may solve your problem,
http://oracleappstechnology.blogspot.com/2007/09/oracleappsfndcommonpoolexception.html
http://www.appsdbatechstuff.com/2008/06/java-workflow-mailer-does-not-startup.html
http://it.toolbox.com/wiki/index.php/Oracle_Apps_-JavaConcurrent_Program
Io exception: The Network Adapter could not establish the connection
Regards,
Hari
Similar Messages
-
Receiving Transaction Manager concurrent program errors out with INACTIVE, NO Manager
Hi,
We have an R12.1.3, 2-node (1 node Apps, 1 node DB) ERP system on Sparc 64, Solaris 10 Machines.
All the concurrent managers including Standard Manager and Receiving Transaction Manager are running fine.
When we are running the concurrent program Receiving Transaction Manager(RCVTPO), it errors out with Inactive No Manager error.
I am not being able to find any errors in the log files of CM or DB.
Could someone help me resolve this error. Its kinda urgent
Thanks.
MuneerPlease see the solution in (PODAMGR And RCVOLTM Inactive And Cannot Be Started (Doc ID 726158.1)).
Are there any errors in the database log file?
If the above didn't help, please run cmclean.sql and ccm.sql scripts.
Concurrent Processing - CMCLEAN.SQL - Non Destructive Script to Clean Concurrent Manager Tables (Doc ID 134007.1)
Concurrent Processing - CCM.sql Diagnostic Script to Diagnose Common Concurrent Manager Issues (Doc ID 171855.1)
Thanks,
Hussein -
Concurrent program erroring out
Folk,
I am getting below error and it is R12 and 11g
End: The program is not being executed friom the database
Output file size:11678716
OPP Error from severname
[OPPServiceThread1] Post-processing request 56311869.[8/10/11 4:26:41 PM] [UNEXPECTED] [3612819:RT56311869] oracle.apps.fnd.common.AppsException: oracle.apps.jtf.base.resources.FrameworkException at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509) at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362) at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211) at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171) at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148) at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294) at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149) at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118) at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085) at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072) at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595) at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:602) at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:579) at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:533) at oracle.apps.fnd.common.AppsContext.(AppsContext.java:301) at oracle.apps.fnd.cp.util.CPAppsDatabaseContext.(CPAppsDatabaseContext.java:64) at oracle.apps.fnd.cp.util.CPContextFactory.makeContext(CPContextFactory.java:56) at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:127)Caused by: oracle.apps.jtf.base.resources.FrameworkException at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:234) at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:201) at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:176) at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500) … 17 moreCaused by: oracle.apps.jtf.base.resources.FrameworkException: No more data to read from socket at oracle.apps.jtf.base.resources.FrameworkException.convertException(FrameworkException.java:607) at oracle.apps.jtf.base.resources.FrameworkException.addException(FrameworkException.java:585) at oracle.apps.jtf.base.resources.FrameworkException.(FrameworkException.java:66) at oracle.apps.jtf.base.resources.FrameworkException.(FrameworkException.java:88) at oracle.apps.jtf.base.resources.FrameworkException.(FrameworkException.java:202) at oracle.apps.jtf.base.resources.FrameworkException.(FrameworkException.java:218) at oracle.apps.jtf.base.resources.FrameworkException.(FrameworkException.java:249) … 21 more
Thanks,
Seetha.Hi,
Seems like some issue with node information in concurrent queues.
Have you ever run this request on this instance?
Also is this happening for all OPP request only? can you try any other request and see if that works..maybe 'active user'.
Run below command to see if correct coponents are pointing to correct nodes:-
select node_name , node_mode , support_cp ,
support_web , support_admin , support_forms
from FND_NODES;
If not then:-
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;
Run AutoConfig on all tiers, starting from db and then to apps.
Thansks,
JD -
Sourcing : Error while Running Java Concurrent Program
Hi All,
Navigations:
Application: Sourcing
Responsibility : Sourcing Buyer
Concurrent Program : Generate and Store Sourcing response spreadsheet
I am trying to run
Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
it completed with Error status.
Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
Please provide resolution on this.Thanks for your reply..
Program: Generate and Store Sourcing response spreadsheet
ShortName: PON_EXPORT_RESPONSE
Application: Sourcing
Executable: ExportResponseCp
Method: Java Concurrent Program
Responsibility : Sourcing Buyer.
Has this ever worked? If yes, any changes been done recently?
=> No
Is this the seeded concurrent program or a custom one?
=> Its seeded program.
EBS: R12.1.3
Login as Sourcing Buyer Responsibility :
When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
Thanks.. -
Error occurred during execution of java concurrent program in R12.2 instance
Hi All,
The R12.2 instance is a cloned instance. I am getting the below error while compiling the java concurrent program in R12.2 instance.
Has anybody had this error before?
Any help or advice will be really appreciated.
Thanks in advance.
Kind regards,
RanjanHi,
The error could be because of the XSD attributes.
In the Source message CustomerDetails, check the XSD attributes of the DataType CustNumber in the 'Detail' column in the IR. For example, it may have a pattern or whiteSpace or some other attribute.
Then check the input file contents for the CustNumber node. One of those values may not match these attributes.
Hope this helps,
Bhanu -
Error finding/creating AM from Java Concurrent Program
Hi All,
Here is what I am attempting to do in a Java concurrent program
--------------- Code Start - Error description in the code snippet comments ---------------
public void runProgram(CpContext pCpContext)
DBTransactionImpl mDBTransactionImpl
= new DBTransactionImpl(pCpContext.getJDBCConnection());
OAApplicationModule am = null;
// At this point I tried to call various methods on DBTransactionImpl
// And each method call, causes the CP to error with a different exception
// Calling findApplicationModule() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.findApplicationModule(DBTransactionImpl.java:4840)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:101)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
am = mDBTransactionImpl.findApplicationModule(IMPORT_UNITS_AM_INS);
// Calling createApplicationModule() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.createApplicationModule(DBTransactionImpl.java:4954)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:109)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
am = mDBTrx.createApplicationModule( IMPORT_UNITS_AM_INS
,IMPORT_UNITS_AM_DEF);
// Calling isConnected() causes the following exception
// java.lang.NullPointerException
// at oracle.jbo.server.DBTransactionImpl.isConnected(DBTransactionImpl.java:4335)
// at xxicon.oracle.apps.xbol.pa.cp.XXIconImportUnitsFrmXls.runProgram(XXIconImportUnitsFrmXls.java:65)
// at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
if (mDBTransactionImpl.isConnected())
// Log the fact that DBTrx is connected
--------------- Code End - Error description in the code snippet comments ---------------
Would someone be kind enough to tell me what is it that I am doing wrong here?
Thanks a ton!
KH
Message was edited by: Kiran
kiran.k.hegdeKiran,
How did you convert/cast the CpContext into an AppsContext to supply to createRootAM?
Would you maybe share some more code?
Update
No need for that, a simple
public void runProgram( CpContext ctx )
String amName;
String methodName;
OAApplicationModuleFactory amF = new OAApplicationModuleFactory();
OAApplicationModule am = amF.createRootOAApplicationModule( ctx, amName );
am.invokeMethod( methodName );
will do...
Message was edited by:
TyskJohan -
Facing error wen running Java Concurrent Program to insert data into table
Hi All,
Its first time I am wrkng on Java Concurrent Programs. I created a java class with the below code:
import oracle.apps.fnd.cp.request.*;
import oracle.apps.iby.scheduler.*;
import java.sql.*;
import java.sql.Statement;
import java.sql.Connection;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.cp.request.CpContext;
import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
import oracle.apps.iby.database.DBWrapper;
import oracle.apps.iby.ecapp.OraPmt;
import oracle.apps.iby.exception.Log;
import oracle.apps.iby.security.SecurityUtil;
//package oracle.apps.ibe.util.key;
//package oracle.apps.iby.scheduler;
// Referenced classes of package oracle.apps.iby.scheduler:
// SchedUtils
public class XXIBE_KeyInsert
implements JavaConcurrentProgram
public XXIBE_KeyInsert()
public void runProgram(CpContext cpcontext)
try{
String s;
oracle.apps.fnd.cp.request.ReqCompletion reqcompletion;
Connection connection;
// s = "iby.scheduler.XXIBE_keyInsert.runProgram";
reqcompletion = cpcontext.getReqCompletion();
connection = null;
OraPmt.init(cpcontext);
Log.debug("Inserting Credit Card key", 1, "XXIBE_KeyInsert.java");
byte abyte0[] = SecurityUtil.getSystemKey();
connection = cpcontext.getJDBCConnection();
Statement st = connection.createStatement();
String sql = "Insert into xxibe_scodes values ("+abyte0+")";
st.executeUpdate(sql);
connection.commit();
st.close();
connection.close();
Log.debug("done", 1, "XXIBE_KeyInsert.java");
reqcompletion.setCompletion(reqcompletion.NORMAL, "Request Completed Normal");
OraPmt.end();
SchedUtils.setSuccess(reqcompletion);
DBWrapper.closeDBConnection(connection);
catch(Exception e){
e.printStackTrace();
//reqcompletion.setCompletion(ReqCompletion.ERROR, e.toString());
I compiled the program and in the java_top/oracle/apps/../.. (in the pkg given). Now the class files and java files are in the said location. I created an executable of type "java concurent Prog" and location same as Package name.
Created a Program and assigned it to the responsibility. Having done this when i run the CP I find it ends with an error msg. The log files show the below exceptions: "java.lang.ClassNotFound Exception".
We are doing it in R12.0.6 and in Unix server. Pls help me where I am missing it. It turned to be an urgent requirement frm my end.
Thanks,
Abhishek.The Exception Stack is :
java.lang.ClassNotFoundException: oracle.apps.iby.scheduler.test.XXIBE_KeyInsert
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at oracle.apps.fnd.cp.request.Run.main(Run.java:152).
Please advice me on how to proceed. -
Issue in Java concurrent program for Digital Signature Stamping
Hi All,
Im calling a Java concurrent program which does digital signature stamping on the PDF report generated.Program able to able to read the PDF file as input and also digital signature stored as file in the application but
ends in error in create signature method , need help in this regard.
Error:
Parameter 0 is Request id of with out Digital signature file
Parameter 1 is employee id of approver
Parameter:0:99203256
Parameter:1:1414603
$$$$ start query fileinfo with callable statment
programName>>>>>>>>BTPOPORPXML
$$$$ Without digital Signature file Name $$$
$/inst_top/finprod/apps/FINPROD_CPNQERPAAPZP10/logs/appl/conc/out/BTPOPORPXML_99203256_1.PDF
PFX File Reading Start
PFX File Reading Ends
PFX File size is: 6460 Byte size is: 6460
Elements present
java.lang.NullPointerException
at
com.lowagie.text.pdf.PdfSignatureAppearance.getAppearance
(Unknown Source)
at
com.lowagie.text.pdf.PdfSignatureAppearance.preClose
(Unknown Source)
at
com.lowagie.text.pdf.PdfSignatureAppearance.preClose
(Unknown Source)
at com.lowagie.text.pdf.PdfStamper.close(Unknown
Source)
at
btvl.oracle.apps.po.digsig.BTVLDigSign.runProgram
(BTVLDigSign.java:151)
at oracle.apps.fnd.cp.request.Run.main
(Run.java:157)
Edited by: 999033 on May 16, 2013 7:20 PMHi Charls,
I have successfully implemented at our end in 11i. Pl.try at your end.
v_request_id := FND_REQUEST.SUBMIT_REQUEST (passed your arguments... );
COMMIT;
IF NVL( v_request_id , 0 ) = 0 THEN
DBMS_OUTPUT.PUT_LINE( 'Item Assignment to Organization Program Not Submitted');
p_status := 'FAILURE' ;
p_err_msg := 'ERROR RAISED AFTER SUBMITTING THE IMPORT ITEM ORG.ASSIGNMENT CONCURRENT REQUEST ... ' ;
ELSE
v_finished := FND_CONCURRENT.WAIT_FOR_REQUEST
request_id => v_request_id,
interval => 0,
max_wait => 0,
phase => v_phase,
status => v_status,
dev_phase => v_request_phase,
dev_status => v_request_status,
message => v_message
LOOP
EXIT WHEN ( UPPER(v_request_phase) = 'COMPLETE' OR v_phase = 'C');
END LOOP;
HTH
Sanjay -
Hello,
I am fairly new the Java Concurrent Programs concept. I was just trying a simple Hello World example but I cannot seem to run it from the operating system. Here is my Hello World java program I created using Jdeveloper:
package oracle.apps.fnd.cp.request;
public class Hello implements JavaConcurrentProgram {
public static final String RCS_ID = "$Header$";
public void runProgram(CpContext ctx) {
ctx.getLogFile().writeln("-- Hello World! --", 0);
ctx.getOutFile().writeln("-- Hello World! --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
It compiles fine in Jdev generating the class file. Here is what I did :
1) Created directory under $JAVA_TOP as follows :
mkdir $JAVA_TOP/oracle/apps/fnd/cp/sample
2) moved the Hello.java file there under sample directory
3) compiled java file using avac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java ( It compiles fine generating the class file )
4) Now I wanted to test running it : I tried using jre command first as I saw in other posts but this is not working :
jre -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
Error :
ksh: jre: not found
Then I tried using the other way I saw on posts which is using the java command :
java -cp $AF_CLASSPATH -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
This gives me the following error :
java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/sample/Hello (wrong name: oracle/apps/fnd/cp/request/Hello)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Can anyone tell me what I am doing wrong ? I have tried everything even tried ftp the class file from my local but I get the same error. Any help would be appreciated.
ThanksAjay,
Yes you are right. I did not register my java program yet in the concurrent programs.
I thought I could test it out from the operating system command line before registering it. But looking at your document you sent me it seems I have to do all the steps i.e. define concurrent program etc before I can test it from the operating system. If that's the case then what's the use of trying to test it via operating system using
java -cp $AF_CLASSPATH -Ddbcfile=$FND_TOP/secure/k021kp-6180_r115dev1.dbc -Drequest.outfile=/export/home/sqadri/outfile oracle.apps.fnd.cp.request.Run oracle.apps.fnd.cp.sample.Hello
Thanks
Syed -
How to integrate a class with template.java - Java Concurrent Program. 11i
Hello, I have a java class I got from a vendor. This java class needs to run through as concurrent program. As per metalink note *How To Create a Java Concurrent Program? [ID 827563.1]* it says that, we must require template.java to wrap around the custom class. I have done that in the following java code. However, being a new java guy, I really dont know how to connect these two classes and constructor.
Any suggestions about how do I make these classes work in order to run from a concurrent program?
package oracle.apps.fnd.cp.request;
import oracle.apps.fnd.util.*;
import oracle.apps.fnd.cp.request.*;
import java.io.BufferedReader;
import java.io.IOException;
import javax.net.ssl.SSLSocketFactory;
public class cyberBatch implements JavaConcurrentProgram {
// Optionally provide class constructor without any arguments.
// If you provide any arguments to the class constructor then while running the program will fail.
public void runProgram(CpContext pCpContext) {
ReqCompletion lRC = pCpContext.getReqCompletion();
String CompletionText = "";
// This class is to upload files but can be expanded to download files also.
public class SSLFileTransfer {
Properties props =
new Properties(); // stores properties from property file
* SSLFileTransfer(): constructor
public SSLFileTransfer() {
* init(): initialization (load property file)
* @param propsFile properties needed for file transfer
public void init(String propsFile) {
try {
props.load(new BufferedInputStream(new FileInputStream(new File(propsFile))));
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);
* usage()
public static void usage() {
System.out.println("USAGE: java SSLFileTransfer <full path property file name>");
System.exit(-1);
* getFactory(): get factory for authentication
* @throws IOException if exception occurs
private SSLSocketFactory getFactory() throws IOException {
try {
SSLContext ctx;
KeyManagerFactory kmf;
KeyStore ks, ks1;
char[] passphrase =
props.getProperty("passPhrase").toCharArray();
ctx = SSLContext.getInstance("TLS");
kmf = KeyManagerFactory.getInstance("SunX509");
ks = KeyStore.getInstance("PKCS12", "BC");
ks1 = KeyStore.getInstance("JKS");
ks.load(new FileInputStream(props.getProperty("key")),
passphrase);
ks1.load(new FileInputStream(props.getProperty("keyStore")),
passphrase);
kmf.init(ks, passphrase);
TrustManagerFactory tmf =
TrustManagerFactory.getInstance("SunX509");
tmf.init(ks1);
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
return ctx.getSocketFactory();
} catch (Exception e) {
e.printStackTrace();
throw new IOException(e.getMessage());
* getHost(): Get host from property file
private String getHost() {
return props.getProperty("host", "localhost");
* getPort(): Get port from property file
private int getPort() {
return Integer.parseInt(props.getProperty("port"));
* sendRequest(): Send request (file) to the server
* @param out stream to send the data to the server
* @throws Exception if an error occurs.
private void sendRequest(PrintWriter out) throws Exception {
String path = props.getProperty("path");
out.println("POST " + path + " HTTP/1.0");
final String BOUNDARY = "7d03135102b8";
out.println("Content-Type: multipart/form-data; boundary=" +
BOUNDARY);
String uploadFile = props.getProperty("uploadFile");
String authString =
props.getProperty("bcUserName") + ":" + props.getProperty("bcPassword");
String encodedAuthString =
"Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes());
out.println("Authorization: " + encodedAuthString);
final String CRLF = "\r\n";
StringBuffer sbuf = new StringBuffer();
sbuf.append("--" + BOUNDARY + CRLF);
sbuf.append("Content-Disposition: form-data; name=\"upfile\"; filename=\"" +
uploadFile + "\"" + CRLF);
sbuf.append("Content-Type: text/plain" + CRLF + CRLF);
FileReader fi = new FileReader(uploadFile);
char[] buf = new char[1024000];
int cnt = fi.read(buf);
sbuf.append(buf, 0, cnt);
sbuf.append(CRLF);
sbuf.append("--" + BOUNDARY + "--" + CRLF);
int sz = sbuf.length();
out.println("Content-Length: " + sz);
out.println();
out.println(sbuf);
out.flush();
// Make sure there were no surprises
if (out.checkError())
System.out.println("SSLFileTransfer: java.io.PrintWriter error");
* readResponse(): reads response from the server
* @param in stream to get the data from the server
* @throws Exception if an error occurs.
private void readResponse(BufferedReader in) throws Exception {
boolean successful = false;
String inputLine;
while ((inputLine = in.readLine()) != null) {
if (inputLine.startsWith("HTTP") &&
inputLine.indexOf("200") >= 0)
successful = true;
System.out.println(inputLine);
System.out.println("UPLOAD FILE " +
(successful ? "SUCCESSFUL" : "FAILED") +
"!!!\n");
* upload(): upload file to server
* @throws Exception if an error occurs.
public void upload() throws Exception {
try {
SSLSocketFactory factory = getFactory();
SSLSocket socket =
(SSLSocket)factory.createSocket(getHost(), getPort());
PrintWriter out =
new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())));
BufferedReader in =
new BufferedReader(new InputStreamReader(socket.getInputStream()));
socket.startHandshake();
sendRequest(out);
readResponse(in);
out.close();
in.close();
socket.close();
} catch (Exception e) {
e.printStackTrace();
throw e;
* main(): main method to start file transfer
* @param args command line arguments (property file, see usage())
* @throws Exception if an error occurs.
public static void main(String[] args) throws Exception {
if (args == null || args.length != 1)
usage();
SSLFileTransfer fileXfer = new SSLFileTransfer();
fileXfer.init(args[0]);
fileXfer.upload();
lRC.setCompletion(ReqCompletion.NORMAL,CompletionText) ;
}Thanks,
RI believe the OP is aware of this :) -- Re: Oracle 11i - 11.5.10.2 - and Java
Thanks,
Hussein -
Need to call OAF API from JAVA concurrent program
Hi Gurus,
I am trying invoke an OAF Application method which generate the Batch ID. I am trying the invoke the same from JAVA Concurrent program. Below is teh code used,
package oracle.apps.ego.item.cp;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import oracle.apps.ego.item.common.server.EgoBatchHeader;
import oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl;
import oracle.apps.fnd.cp.request.CpContext;
import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
import oracle.apps.fnd.cp.request.LogFile;
import oracle.apps.fnd.cp.request.OutFile;
import oracle.apps.fnd.cp.request.ReqCompletion;
import oracle.jbo.ApplicationModule;
import oracle.jbo.ApplicationModuleCreateException;
import oracle.jbo.ApplicationModuleHome;
import oracle.jbo.JboContext;
import oracle.jbo.domain.Number;
import oracle.jdbc.internal.OracleCallableStatement;
public class XX_EGO_BATCH_CREATE implements JavaConcurrentProgram {
static LogFile log = null;
public void runProgram(CpContext ctx){
//Obtain the reference to the Output file for Concurrent Prog
OutFile out = ctx.getOutFile();
EgoBatchHeader v_header = new EgoBatchHeader();
//Obtain the reference to the Log file for Concurrent Prog
log = ctx.getLogFile();
log.writeln("Batch Number Creation", 0);
ApplicationModule am = null;
try{
//Write your logic here
log.writeln("Batch Number Creation", 0);
log.writeln("definition of batch num",0);
Number batch_num;
Number ssid = new Number(10000);
String jdbcUrl =
"jdbc:oracle:thin:apps/[email protected]:10201:ARERP4";
ApplicationModule am_Member = null;
log.writeln("Before Calling Create method",0);
am_Member =
create("oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl",
jdbcUrl);
log.writeln("assigning ssid"+ssid,0);
EgoImportBatchHeaderAMImpl bheader = new EgoImportBatchHeaderAMImpl();
log.writeln("bheader object is :"+bheader,0);
log.writeln("calling getBatchObjectForCreate"+bheader,0);
v_header = bheader.getBatchObjectForCreate(ssid);
//System.out.println("v_header is :" + v_head);
log.writeln("calling createBatch"+v_header,0);
batch_num = bheader.createBatch(v_header);
log.writeln("Batch Number is :"+batch_num ,0);
out.writeln("This will be printed to the Output File");
log.writeln("This will be printed to the Log File", 0);
//Request the completion of this Concurrent Prog
//This step will signal the end of execution of your Concurrent Prog
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL,"Completed.");
//Handle any exceptional conditions
catch(Exception e){
log.writeln("Exception2 occurred here !!"+e,0);
log.writeln("calling createBatch"+v_header,0);
public static ApplicationModule create(String amDefName,
String jdbcConnStr) throws ApplicationModuleCreateException, Exception {
ApplicationModule am = null;
try {
OracleCallableStatement conn = null;
// Setup the hashtable of JNDI initialization parameters
log.writeln("inside create method .. ",0);
Hashtable env = new Hashtable(2);
env.put(Context.INITIAL_CONTEXT_FACTORY,
JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
// Create an JNDI initial context
Context ic;
ic = new InitialContext(env);
// Lookup a home interface (factory) for the AppModule by name
ApplicationModuleHome home =
(ApplicationModuleHome)ic.lookup(amDefName);
if(home==null){
log.writeln("home is null... .",0);
}else{
log.writeln("home is not null"+home,0);
// Create an instance of the AppModule using the home/factory
am = home.create();
if(am!=null){
log.writeln("am is not null"+am,0);
}else{
log.writeln("am is null",0);
// Connect the application module to the database
am.getTransaction().connect(jdbcConnStr);
} catch (NamingException ex) {
log.writeln("NamingException occurred here !!"+ex.getMessage(),0);
ex.printStackTrace();
throw new ApplicationModuleCreateException(ex);
}catch(Exception ex){
log.writeln("Exception occurred here !!"+ex.getMessage(),0);
ex.printStackTrace();
throw new Exception(ex);
return am;
I am not able to call the web server and facing issues. Please let me know if you can help me to get a solution to this.
Thanks in advance
VeerendraHi Zafar,
I got an error saying :
Batch Number Creation
Batch Number Creation
definition of batch num
Before Calling Create method
inside create method ..
home is not nulloracle.jbo.server.ApplicationModuleHomeImpl@11d2572
Jul 9, 2008 5:04:21 AM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
Exception occurred here !!JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:441)
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:358)
at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:340)
at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:700)
at oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(ApplicationModuleDefImpl.java:232)
at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:401)
at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:91)
at oracle.apps.ego.item.cp.XX_EGO_BATCH_CREATE.create(XX_EGO_BATCH_CREATE.java:139)
at oracle.apps.ego.item.cp.XX_EGO_BATCH_CREATE.runProgram(XX_EGO_BATCH_CREATE.java:57)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Exception2 occurred here !!java.lang.Exception: oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.ego.item.itemimport.server.EgoImportBatchHeaderAMImpl of type ApplicationModule not found
calling [email protected]9c -
Java.lang.OutOfMemoryError when running java concurrent program
Hi,
i had written a java concurrent program to create the content items into Oracle Content Manager (OCM). Process the records from interface table and create the content items into OCM by calling the API IBC_CITEM_ADMIN_GRP.upsert_item().
I run the concurrent program with 2000 records in interface table, it's an one to one process, 563 records are processed and 563 content items are created successfully in OCM. After 563 records continuously throws the Exception
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('EX - bundle validation others--');
x_return_status := FND_API.G_RET_STS_ERROR;
FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_ERROR');
FND_MESSAGE.set_token('SITUATION', 'VALIDATION');
FND_MSG_PUB.ADD;
IF IBC_DEBUG_PVT.debug_enabled THEN
IBC_DEBUG_PVT.end_process(
IBC_DEBUG_PVT.make_parameter_list(
p_tag => 'OUTPUT',
p_parms => JTF_VARCHAR2_TABLE_4000(
'x_return_status', '*** EXCEPTION *** [' || SQLERRM || ']'
END IF;
in IBC_CITEM_ADMIN_GRP.validate_attribute_bundle() API.
Again running the concurrent program it process another 563 records. Can any one help me to fix this issue?
i figured out the exception. When debug the error, i got the actual error message like this
ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
ORA-29532: Java call terminated by uncaught Java exception: java.lang.ArrayIndexOutOfBoundsException: -2048 < 0
for this issue i increased the heap memory size up to 1024MB. Still i have the same issue. Can any one help to fix the issue?ORA-29532: Java call terminated by uncaught Java
exception: java.lang.NullPointerException
ORA-29532: Java call terminated by uncaught Java
exception: java.lang.ArrayIndexOutOfBoundsException:
-2048 < 0Aren't the null pointer and arrayindexoutofbounds, the ones which you get when you are trying to read beyond your array? (example: when your loop tries to access the 563rd element in your array, since your array index starts from 0)?
May be if you can try to write out your elements in the array, you might see what it is croaking about.
Thanks,
Chiru -
Java Concurrent Program - connecting to MS SQL Server
Hi,
I hope this is correct forum to post this question.
I am writing a JCP which will connect to a MS SQL Server DB, pull data from a table and populate this data into a custome table in EBS (R12.1.1) database. But I am facing some issues.
When I run run this concurrent program from EBS, I get following exception message:
Wed Aug 08 01:18:04 GMT 2012: In openConection()
Wed Aug 08 01:18:04 GMT 2012: Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver
Wed Aug 08 01:18:04 GMT 2012: openConection() ClassNotFoundException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
Wed Aug 08 01:18:04 GMT 2012: Before Calling processPrintMachineRecords()
Wed Aug 08 01:18:04 GMT 2012: Exception:: java.lang.NullPointerException
Wed Aug 08 01:18:04 GMT 2012: In closeSQLServerConnection().......closing JDBC Connection
Wed Aug 08 01:18:04 GMT 2012: Connection object was null, hence skipping close
Wed Aug 08 01:18:04 GMT 2012: After Calling processPrintMachineRecords()
The I read somewhere on internet that I should set CLASSPATH in options field of concurrent program definition. So I provided classpath as follows:
-cp /rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/apps.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/sqljdbc_4.0/enu/sqljdbc.jar
In this classpath sqljdbc.jar contains the classes for connecting to MS SQL Server DB. However after giving classpath like this I started getting different error:
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/request/Run
Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.cp.request.Run
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
It appears from the error message that after giving this CLASSPATH, program was not able to find the "Run" method itself. In otherwords, CLASSPATH screwed it further.
Can anybody please point out what am I doing wrong here?
Regards
Java Code:
package oracle.apps.custom.printmachine;
import java.sql.*;
import oracle.apps.fnd.cp.request.* ;
import java.io.*;
import oracle.apps.fnd.util.*;
public class PrintMachineInterface implements JavaConcurrentProgram {
public static final String M_SUCCESS = "SUCCESS";
public static final String M_ERROR = "ERROR";
public static final String M_WARNING = "WARNING";
int mRequestStatus = -1;
int max_number_of_records = 99999999;
private String mSqlServerHost = "mysqlserver.domain.com";
// Application Short Name
private String applName;
CpContext mCtx;
LogFile logFile;
OutFile outFile;
Connection mConn = null;
ReqCompletion lRC;
public PrintMachineInterface(){
// if no parameter value is specified for APPLNAME then use FND
//as default value
applName = "FND";
private void logMessage(String str) {
java.util.Date now = new java.util.Date();
logFile.writeln(now.toString() + ": " + str, LogFile.STATEMENT);
static String mInsertRecord = " Declare " + " BEGIN "
+ " INSERT INTO XXGFN_GBL_CE_PM_STAGE(ID, KEY, FILENAME, PRINTED_AT, CREATED_AT, DOCTYPE, LANGUAGE, OU, TRX_ID, DOC_ID, REQ_ID, TEMPLATE, PAGES, DOC_TEXT, TIMES_RECEIVED)"
+ " VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, substr(:14,2000), :15);"
+ " COMMIT;"
+ " END;";
static Connection con = null;
public void openConection() {
logMessage( "In openConection()");
try {
logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
logMessage( "Attempting to connect to " + mSqlServerHost);
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
} catch (java.lang.ClassNotFoundException e) {
logMessage("openConection() ClassNotFoundException: " + e);
} catch (SQLException ex) {
logMessage("openConection() SQLException: " + ex);
public void closeSQLServerConnection() {
try {
logMessage( "In closeSQLServerConnection().......closing JDBC Connection");
if (con != null)
logMessage( "Con is not null");
con.close();
logMessage( "Con Closed Successfully");
else
logMessage( "Connection object was null, hence skipping close");
} catch (SQLException ex) {
logMessage("SQLException: " + ex);
} catch (Exception ex) {
logMessage("Exception in closeSQLServerConnection() : " + ex);
private void populate_staging_table(
String p_id,
String p_key,
String p_filename,
String p_printed_at,
String p_created_at,
String p_doctype,
String p_language,
String p_ou,
String p_trx_id,
String p_doc_id,
String p_req_id,
String p_template,
String p_pages,
String p_doc_text,
String p_times_received
PreparedStatement lStmt = null;
logMessage("Populating data from PrintMachine history table");
try {
lStmt = mConn.prepareCall(mInsertRecord);
lStmt.setString(1, p_id);
lStmt.setString(2, p_key);
lStmt.setString(3, p_filename);
lStmt.setString(4, p_printed_at);
lStmt.setString(5, p_created_at);
lStmt.setString(6, p_doctype);
lStmt.setString(7, p_language);
lStmt.setString(8, p_ou);
lStmt.setString(9, p_trx_id);
lStmt.setString(10, p_doc_id);
lStmt.setString(11, p_req_id);
lStmt.setString(12, p_template);
lStmt.setString(13, p_pages);
lStmt.setString(14, p_doc_text);
lStmt.setString(15, p_times_received);
lStmt.execute();
lStmt.close();
} catch (SQLException s) {
logMessage("Exception thrown w/ error message: "
+ s.getMessage());
s.printStackTrace();
finally {
try {
if (lStmt != null)
lStmt.close();
} catch (SQLException e) {
logMessage("SQLException: " + e);
private void processPrintMachineRecords() {
int number_of_recs = 0;
try {
PreparedStatement stmt = con.prepareStatement("SELECT TOP 1000 ID, Key, Filename, PrintedAt, CreatedAt, Doctype, Language,OU, TransactionID, DocumentID, RequestID, Template, Pages, Documenttext, TimesReceived FROM PM_DATA.dbo.History" );
ResultSet rst = stmt.executeQuery();
while (rst.next()) {
number_of_recs++;
if (number_of_recs == max_number_of_records) break;
populate_staging_table(
rst.getString(1), rst.getString(2)
,rst.getString(3), rst.getString(4)
,rst.getString(5), rst.getString(6)
,rst.getString(7), rst.getString(8)
,rst.getString(9), rst.getString(10)
,rst.getString(11), rst.getString(12)
,rst.getString(13), rst.getString(14)
,rst.getString(15)
stmt.close();
rst.close();
mConn.commit();
} catch (SQLException ex) {
logMessage("SQLException: " + ex);
catch (Exception ex) {
logMessage("Exception:: " + ex);
closeSQLServerConnection();
public void runProgram(CpContext pCpContext) {
applName = "XXGFN";
String l_file_path = null;
mCtx = pCpContext;
//get handle on request completion object for reporting status
lRC = pCpContext.getReqCompletion();
// assign logfile
logFile = pCpContext.getLogFile();
// assign outfile
outFile = pCpContext.getOutFile();
// get the JDBC connection object
mConn = pCpContext.getJDBCConnection();
l_file_path = ((new File(outFile.getFileName())).getParent() == null ? ""
: (new File(outFile.getFileName())).getParent());
// get parameter list object from CpContext
ParameterList lPara = pCpContext.getParameterList();
while (lPara.hasMoreElements())
NameValueType aNVT = lPara.nextParameter();
if ( aNVT.getName().equals("APPLNAME") )
applName = aNVT.getValue();
/** openConection() Opens the connection to SQL Server Database*/
openConection() ;
logMessage("Before Calling processPrintMachineRecords()");
processPrintMachineRecords();
logMessage("After Calling processPrintMachineRecords()");
try{
setCompletion(ReqCompletion.NORMAL, "Request Completed Normal");
} catch (Exception e) {
setCompletion(ReqCompletion.ERROR, e.toString());
} finally {
pCpContext.releaseJDBCConnection();
* Sets the request completion status based on proper precedence. ERROR >
* WARNING > NORMAL
* @param pStatus
* Status of the request.
* @param pCompletionText
* Request's completion text.
public void setCompletion(int pStatus, String pCompletionText) {
if ((pStatus == ReqCompletion.ERROR)
|| ((pStatus == ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))
|| ((pStatus == ReqCompletion.NORMAL)
&& (mRequestStatus != ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))) {
mRequestStatus = pStatus;
lRC.setCompletion(pStatus, pCompletionText);
}ok
i used Template.java as input
useful MOS:
How To Create a Java Concurrent Program? [ID 827563.1]
Java Concurrent Program FAQ [ID 827575.1]
i used
//goto ms sql server 2008r2
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = java.sql.DriverManager.getConnection(
"jdbc:sqlserver://1.2.3.4:1433;databaseName=test;selectMethod=cursor",
"test", "test");
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
}1.2.3.4 - ip of instance with sqlserver2008r2 :)
in your code
>
try {
logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
logMessage( "Attempting to connect to " + mSqlServerHost);
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
} catch (java.lang.ClassNotFoundException e) {
logMessage("openConection() ClassNotFoundException: " + e);
} catch (SQLException ex) {
logMessage("openConection() SQLException: " + ex);
>
try my case for Driver and Connection
put result .class file to needed directory
put sqljdbc4.jar to /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib
and for concurrent program option
-classpath /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes:/rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib/sqljdbc4.jaralso useful mos:
Classpath Setting of Third Party Jar Files in R12 Java Concurrent Program (JCP) [ID 1292694.1] -
How to call a BPEL process from Oracle Apps Java Concurrent program
Hello,
I need to trigger a BPEL process from Oracle Apps. Can anybody tell me how to do that? I have two triggering option--
1. On button click from a Form 6i screen
2. Using Java Concurrent program.
Thanks in advance.
DebkantaI am not sure how concurrent program works, but may be one of the way might work out, let me know if Java Concurrent Program works a bit different way
- [if async] Through concurrent program, you can insert message token to db or aq, and BPEL can be instantiated from there
or
- If it supports pure java call, then you can look at multiple documents (e.g. http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial7-InvokingBPELProcesses.pdf) to invoke your process
- You can also use oracle db utility to invoke soap operation and get the result back
HTH,
Chintan -
Calling Web service from Java Concurrent Program
Hi,
I created a Java concurrent program and created executable. Here is my code.
public void runProgram(CpContext ctx) {
String value = "Java Concurrent Program Testing";
Hello hell = new Hello();
String returnValue = hell.testURL(value);
if(returnValue.equalsIgnoreCase("TRUE")){
ctx.getLogFile().writeln("-- Java Concurrent Program Testing --", 0);
ctx.getOutFile().writeln("-- Java Concurrent Program Testing --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
else{
ctx.getLogFile().writeln("-- Hello World! --", 0);
ctx.getOutFile().writeln("-- Hello World! --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
}testURL() call the web service and get the response. but when I am selecting View Output option I am always geting out put as
-- Hello World! --I tested the logic of calling web service. It giving me out put "true". Here is my Web service calling code
public String testURL(String Value){
HttpURLConnection httpConn = null;
ByteArrayOutputStream bout = null;
String setWebServiceURLResponse = "";
String responseString="";
String outputString = "";
try{
httpConn = getHttpConnection();
bout = new ByteArrayOutputStream();
String xmlInput = soapBodyStart +
"<ns1:getTestURL>\n" +
" <ns1:URL>"+Value+"</ns1:URL>\n" +
" </ns1:getTestURL>"+
soapBodyEnd;
byte[] buffer = new byte[xmlInput.length()];
buffer = xmlInput.getBytes();
bout.write(buffer);
byte[] b = bout.toByteArray();
httpConn = setHttpConnectionRequest(b,httpConn);
//Read the response.
InputStreamReader isr = new InputStreamReader(httpConn.getInputStream());
BufferedReader in = new BufferedReader(isr);
//Write the SOAP message response to a String.
while ((responseString = in.readLine()) != null) {
outputString = outputString + responseString;
//Parse the String output to a org.w3c.dom.Document and be able to reach every node with the org.w3c.dom API.
Document document = parseXmlFile(outputString);
String formattedSOAPResponse = formatXML(outputString);
System.out.println("Formatted response = \n" +formattedSOAPResponse);
//NodeList nodes = document.getElementsByTagName("setWebServiceURLResponse");
//NodeList nodes = document.getElementsByTagName("getTestURLResponse");
NodeList nodes = document.getElementsByTagName("ns0:getTestURLResponse");
int len = nodes.getLength();
System.out.println("Inside testURL Node Lenght = "+ len);
for(int s=0; s<nodes.getLength() ; s++){
Node authenticateResultNode = nodes.item(s);
if(authenticateResultNode.getNodeType() == Node.ELEMENT_NODE){
Element authenticateResultElement = (Element)authenticateResultNode;
//NodeList authenticateResultValueNode = authenticateResultElement.getElementsByTagName("ns0:return");
//NodeList authenticateResultValueNode = authenticateResultElement.getElementsByTagName("return");
NodeList authenticateResultValueNode = authenticateResultElement.getElementsByTagName("ns0:return");
Element authenticateResultValue = (Element)authenticateResultValueNode.item(0);
NodeList textFNList = authenticateResultValue.getChildNodes();
//System.out.println("Authenticate Result : " + ((Node)textFNList.item(0)).getNodeValue().trim());
setWebServiceURLResponse = ((Node)textFNList.item(0)).getNodeValue();
//System.out.println("Authenticate Response in getAuthenticate method : " + authenticateresponse);
}//end of if clause
}//end of for loop with s var
System.out.println("Inside setWebServcieURLToFile response = " + setWebServiceURLResponse);
catch(Exception e){
e.printStackTrace();
return setWebServiceURLResponse;
}Where I am going wrong ?
Regards,
Ajay Sharmasample code:
static string url = "http://my.webservice.url"; ---------------> The actual web service URL
Call = new Call(url); --------------------------------------------------> The call object used by JAX-RPC
Object[] params = new Object[]{param1, param2};---------> build the call parameters
Boolean/Integer/Whatever result = call.invoke("method name", params);------>call the invoke method to get the result
Maybe you are looking for
-
Upgrade iPhoto from 8.1.2 to 9.6
I need to upgrade iPhoto from 8.1.2 to 9.6 for iCloud use. iLife "11 is no more available, and I am afraid to loose my picts, or the key words and faces, if I install the 9.6 version and if I need to amalgamate or import my picts in the new version.
-
File Content Conversion (.txt to Xml)
Hi, I am new to XI, can any one help me out for file content conversion on the following senario. what should be the RecordSet RecordStructure Parameters Sender File: .txt sender file ======== 1234,IT,Kannan,test,Ramasamy,33/A,test,Bangalore,Karnatak
-
Error 2140: An Internal Windows NT error occured
Has anyone else ever experienced this error? I can't start up the directory server, and I can't even re-install or uninstall. Any suggestions would be highly appreciated.
-
How can i edit a photo to a specific height & with . Using photoshop elements 4.0
how can i edit a photo to be a specific height & width using photo shop elements 4.0
-
I can't download the latest adobe air
I am trying to install the latest update on a piece of software i use on my mac but it cannot download because i don't have the latest Adobe Air 3 update and i cant download that because system requirements don't match Help ?