Fast return from Java Activity Agent
Hello,
long ago I had defined some workflows using the Java Activity Agent. But now I have to create a new flow with a lot of very short activities, and I want to return control to the workflow engine as fast as possible when they complete, without waiting for the next call to background processing. Is there any known best practice to achieve this? I have tried to enqueue calls to the background engine in my java classes, but this doesn't seem a solution.
Thank you in advance,
Antonio
Hello,
I didn't post my solution because it's very hackish, though it has dramatically improved my execution time.
But to answer your curiosity...
I have added a listener to the inbound queue, thus replacing the loop to call the background engine with calls synchronized with inbound messages. Additionally I call the background engine every 30 seconds, just in case, and so that the loop exit condition is checked.
So, here's my basic listener/background handler:
DECLARE
q_agent sys.aq$_agent;
wf_agent sys.aq$_agent := sys.aq$_agent(NULL,'OWF_MGR.WF_INBOUND_QUEUE',0);
v_tab_agents DBMS_AQ.aq$_agent_list_t;
BEGIN
v_tab_agents(1) := wf_agent;
WHILE( < ANY CONDITION TO STOP PROCESSING ... > ) LOOP
dbms_aq.listen(
agent_list => v_tab_agents,
WAIT => 30, /* in seconds, may be DBMS_AQ.FOREVER */
agent => q_agent
owf_mgr.wf_engine.background;
-- DBMS_OUTPUT.PUT_LINE('Date: ' || TO_CHAR(SYSDATE,'yyyy/mm/dd hh24:mi:ss' );
END LOOP;
END;
/Antonio
Similar Messages
-
Problem calling a EJB Java Client from Java Activity Agent
Hi,
We have a wrapper java class that calls to an EJB through a JNDI lookup. The wrapper class is called from a workflow. The problem is that the call fail with the following message error:
Error : getRemoteHome Lugar: ServiceLocator NamingException Mensaje Error: Receive timed out
Mon Jan 09 15:32:13 EST 2006 Enqueuing VIC/97513 com.tallion.tax.workflow.assessment.Update
F_FN_ERROR (MODULE=com.tallion.tax.workflow.assessment.Update) (ITEMTYPE=VIC) (ITEMKEY=97513) (ACTID=10617) (FUNCMODE=RUN) (ERRMESSAGE=getRemoteHome Lugar: ServiceLocator NamingException Mensaje Erro
The wrapper class has in their classpath a jndi.properties as follows:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=69.0.137.120:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
The call just works fine when we restart the Java Activity Agent and then, after a while it fails again with the same error.
Any ideas/workaround?
Thanks.I have a situation that is a bit similar. I have successfully used beans for storing methods used in JSPs and used by other methods in the same class as was suggested above. Now I would like to break some methods into another (utility) class since they are lower level and can be used by lots of things. They are for database operations (given a String query and String dbname, it queries and returns ResultSet for example). I want to have them in a separate class for reusability and OOP.
I am having problems calling those public static methods in the public class from my bean that communicates with the JSP. I can't compile the class that calls the method in the database ops class. I get an error like :
loginHelper.java:45: cannot find symbol
symbol : variable sqlHelper
location: class dbHelperBean.loginHelper
and when I include the package name in the call I get
loginHelper.java:45: cannot find symbol
symbol : class sqlHelper
location: package dbHelperBean
That's strange since the package of both classes is dbHelperBean and the class is indeed called sqlHelper. I tried to compile it in the same directory as sqlHelper as well. What am I doing wrong?
Thanks for any help. -
Oracle Workflow Java Activity Agent not starting up
Hi,
I am trying to start the Java Activity agent of Oracle workflow.
As specified in the installation and setup guid I am running the following script (for NT):
wfjvlsnr user/password@connectString
The activiy agent does start up but then I get a NullPointerException in the main thread of the Java Activity Agent class.
Appreciate you help.
thanks.
Here is the dump.
E:\Ora9idb\wf\admin>rem ******************************************************
E:\Ora9idb\wf\admin>rem $Header: wfjvlsnr.bat 26.5 2001/07/02 09:13:06 smayze
ship $
E:\Ora9idb\wf\admin>rem USAGE:
E:\Ora9idb\wf\admin>rem 1) Workflow Schema User/Password@Database
E:\Ora9idb\wf\admin>rem 2> "Workflow Schema User Password Database [protocol
[charset]
E:\Ora9idb\wf\admin>rem To disable output, use the jrew command instead of jre
E:\Ora9idb\wf\admin>rem ******************************************************
E:\Ora9idb\wf\admin>set WF_UN=workflow/workflow@workflow
E:\Ora9idb\wf\admin>set WF_CHARSET=
E:\Ora9idb\wf\admin>IF "" NEQ "" set WF_CHARSET=-DCHARSET=
E:\Ora9idb\wf\admin>set WF_CLASSPATH=;e:\Ora9idb\wf\java;C:\PROGRA~1\Oracle\jr
1.1.8\lib\rt.jar;e:\Ora9idb\wf\java;e:\Ora9idb\jlib\wfjava.jar;e:\Ora9idb\wf\x
\java\lib\xmlparserv2.jar;e:\Ora9idb\jlib\wfapi.jar;e:\Ora9idb\jdbc\lib\classe
11.zip;e:\Ora9idb\jlib\share.jar;e:\Ora9idb\jlib\ewt3.jar;e:\Ora9idb\jlib\ewt3
ls.jar;e:\Ora9idb\jlib\swingall-1_1_1.jar;
E:\Ora9idb\wf\admin>"C:\PROGRA~1\Oracle\jre\1.1.8\bin\jre" -classpath ";e:\Ora
db\wf\java;C:\PROGRA~1\Oracle\jre\1.1.8\lib\rt.jar;e:\Ora9idb\wf\java;e:\Ora9i
\jlib\wfjava.jar;e:\Ora9idb\wf\xml\java\lib\xmlparserv2.jar;e:\Ora9idb\jlib\wf
i.jar;e:\Ora9idb\jdbc\lib\classes111.zip;e:\Ora9idb\jlib\share.jar;e:\Ora9idb\
ib\ewt3.jar;e:\Ora9idb\jlib\ewt3-nls.jar;e:\Ora9idb\jlib\swingall-1_1_1.jar;"
nojit oracle.apps.fnd.wf.WFFALsnr workflow/workflow@workflow
Oracle Workflow 2.6.0 JAVA Function Activity Agent
Connected to workflow@workflow with character set UTF8
Listening...
Wed Aug 28 12:14:11 GMT+05:30 2002 Executing TEST_REQ/9996 test.SelectApprover
PUT APPROVER_NAME=CDOUGLAS
Wed Aug 28 12:14:11 GMT+05:30 2002 Enqueuing TEST_REQ/9996 test.SelectApprover
Wed Aug 28 12:14:11 GMT+05:30 2002 Executing TEST_REQ/9997 test.SelectApprover
PUT APPROVER_NAME=CDOUGLAS
Wed Aug 28 12:14:11 GMT+05:30 2002 Enqueuing TEST_REQ/9997 test.SelectApprover
Wed Aug 28 12:14:11 GMT+05:30 2002 Executing TEST_REQ/9998 test.SelectApprover
PUT APPROVER_NAME=CDOUGLAS
Wed Aug 28 12:14:11 GMT+05:30 2002 Enqueuing TEST_REQ/9998 test.SelectApprover
Wed Aug 28 12:14:11 GMT+05:30 2002 Executing TEST_REQ/9999 test.SelectApprover
PUT APPROVER_NAME=CDOUGLAS
Wed Aug 28 12:14:11 GMT+05:30 2002 Enqueuing TEST_REQ/9999 test.SelectApprover
Wed Aug 28 12:14:11 GMT+05:30 2002 Executing TEST_REQ/99910 test.SelectApprove
PUT APPROVER_NAME=CDOUGLAS
Wed Aug 28 12:14:12 GMT+05:30 2002 Enqueuing TEST_REQ/99910 test.SelectApprove
T
Wed Aug 28 12:14:12 GMT+05:30 2002 Executing WFEVDEME/PO3435 oracle.apps.fnd.w
XMLGetTagValue
GET ATTR=REQUESTOR
GET EVENT=EVENTMESSAGE
GET TAG=/ORDER/REQUESTOR
PUT REQUESTOR=BLEWIS
Wed Aug 28 12:14:12 GMT+05:30 2002 Enqueuing WFEVDEME/PO3435 oracle.apps.fnd.w
XMLGetTagValue
Wed Aug 28 12:14:12 GMT+05:30 2002 Executing TEAC_IT1/SYSADMIN JayTestFunction
PUT TEST_RESULT=JAVA
Wed Aug 28 12:14:12 GMT+05:30 2002 Enqueuing TEAC_IT1/SYSADMIN JayTestFunction
Wed Aug 28 12:14:12 GMT+05:30 2002 Executing TEST_REQ/9996 test.ApproveRequisi
on
PUT TEST_ATTRIBUTE=This value was set in the Approve Requisition Activity
Wed Aug 28 12:14:12 GMT+05:30 2002 Enqueuing TEST_REQ/9996 test.ApproveRequisi
on
Exception in thread "main" java.lang.NullPointerException:
at oracle.apps.fnd.wf.WFFALsnr.listen(WFFALsnr.java)
at oracle.apps.fnd.wf.WFFALsnr.main(WFFALsnr.java)
E:\Ora9idb\wf\admin>Hi,
I tried to run the same without entering password,but still i am getting error.
The error description is:
Oracle Workflow 2.6.3 JAVA Function Activity Agent
Please Enter Database Password :
ORA-06401: NETCMN: invalid driver designator
Unable to connect to nn0734.nucleussoftware.com:1521:asdb
Accepted arguments:
java <program> <user> <conStr> [oci8]
java <program> <user> <conStr> thin
Where <conStr> is in the form of <host>:<port>:<sid> for thin
and DB Service name for oci8
Please Help. Is there any problem with my tnsnames.ora or something else.
Thanx in advance,
Sarab -
How to catch error codes returned from java
Hi all,
Is there anyway to capture the exit code that is returned by System.exit() from java. I know a batch file's ERRORLEVEL can do this. However, I want to use c/cpp (JNI) to get this functionality. Please help ..
Thanks in advance,
Soujanya.Rhow could you expect me to use JAVA command without compiling it with Javac??
I complied the java code using javac and then called(executed ) it using the Java..
I am using JNI_Create/JavaVM() to create a JVM from CPP file. that works fine. Now, my issue is that I want to capture a couple of exit codes that are returned from the System.exit() of the java code.
now, guys.. is there any way to capture that exit codes returning by Ssytem.exit() in or using JNI ??
if yes, please help me with the code snippets.
Thanks,
Soujanya.R -
Different ways of starting external java activity agent?
Hi All,
Can any one tell me different of ways of starting Oracle Workflow 2.6.4.0.0 JAVA Function Activity Agent in Solaris .
The one option i know is using shell script wfjvlsnr.csh.This option requires connection string to be given.
But according to the user of my application ,im allowed to use only datasource to get the workflow database connection.
Can any one please let me whether there is option to run java activity listner using Workflow database as datasource.
Thanks in advance.
Cheers,
CherryCan any one pls help me out...plsssssss
Cheers,
Sharath -
Unable to run External Java activity getting Null pointerException
Hi All,
Im unable to run external java activity in my workflow on Solaris environment.
My workflow looks like:
start -----> External java activity----> end
External java activity code :
exceute(WFContext ctx) {
System.out.print("im in java activity");//Only this stmt is present in my code
1) I have set the classpath in the environment variables pointing all the workflow jars.
2) Executed wfjvlsnr.csh and it displays the following.
Oracle Workflow 2.6.4.0.0 JAVA Function Activity Agent
Please Enter Database Password : r4v25zx
Connected to owf_mgr@wfSystem:1667:WFUser with character set UTF8
Listening...
Till here it is fine.workflow agent started listening
3) Now i started my client program which triggers the workflow and reaches java activity.
4) Now when i verify console (2) where i run the java activity agent it displays the following errors:
oradev_WFUser> ./wfjvlsnr.csh
Oracle Workflow 2.6.4.0.0 JAVA Function Activity Agent
Please Enter Database Password : owfpswd
Connected to owf_mgr@wfSystem:1667:WFUser with character set UTF8
Listening...
Sat Jun 02 12:18:47 EST 2007 Executing EXTERNAL/002 oracle.apps.fnd.wf.internal
java.lang.NullPointerException
null
Sat Jun 02 12:18:47 EST 2007 Enqueuing EXTERNAL/002 oracle.apps.fnd.wf.internal null
Error executing class oracle.apps.fnd.wf.internal: null
Sat Jun 02 12:18:47 EST 2007 Executing EXTERNAL/002 oracle.apps.fnd.wf.internal
java.lang.NullPointerException
null
Sat Jun 02 12:18:47 EST 2007 Enqueuing EXTERNAL/002 oracle.apps.fnd.wf.internal null
Error executing class oracle.apps.fnd.wf.internal: null
Though i dont have any code in my java activity it says NULL pointer exception.
Im unable find where the mistake is.
Please help me out in running my java activity.
Thanks in Advance,
Cheers,
SharathHi,
I am using integrated web logic server. Do I have to create JDBC connection in Integrated Weblogic Server? If yes, then how come it was working earlier and stopped working suddenly.
Just to try out, I have created JDBC with a name soademo (As mentioned in bc4j.xml) in Integrated Weblogic Server but didn't worked.
I will send you sample java class for your reference.
public class TestClient {
public static void main(String[] args) {
String amDef = "com.moj.model.AM.AppModule";
String config = "AppModuleLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef, config);
ViewObject emplist = am.findViewObject("EmployeesView1");
emplist.setWhereClause("first_name = :p_firstname");
emplist.defineNamedWhereClauseParam("p_firstname", null, null);
emplist.setNamedWhereClauseParam("p_firstname", "Smith");
emplist.executeQuery();
while (emplist.hasNext()) {
Row emp = emplist.next();
System.out.println ("emp " + emp.getAttribute("Empno"));
System.out.println("First Name " + emp.getAttribute("FirstName"));
System.out.println("Last Name " + emp.getAttribute("LastName"));
Configuration.releaseRootApplicationModule(am, true);
Appreciate if you can provide me in more detail as I have started working on very recently.
Parvez -
Error 403 returned from WebSphere running Policy Agent
Hi,
I'm getting an error 403 (forbidden) in my browser when I try to access a URL that I have protected using a Policy that I have setup in SAM.
My configuration is as follows:
Sun Access Manager 6 2005Q1 on Solaris
WebSphere AppServer 5.1.1.5 on Win 2000
WebSphere 5.0 Policy Agent 2.1 on Win 2000
At the moment, all I'm trying to do is protect a URL which is contained in a simple WAR file which I have deployed on WAS.
As per the J2EE Policy Agents guide, I have installed the Agent Filter by adding the following into web.xml
<web-app>
<display-name>...</display-name>
<description>...</description>
<filter>
<filter-name>Agent</filter-name>
<display-name>Agent</display-name>
<description>SunTM ONE Identity Server Policy Agent</description>
<filter-class>com.sun.identity.agents.websphere.AmWAS50AgentFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Agent</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
I've switched on Global Security in WAS and successfully logged back into the WebSphere Console using amldapuser. This confirms that the Agent Realm is working correctly.
In SAM I set up a Policy with a Rule that specified the URL I want to protect. I added a Subject to this Rule of type LDAP User. The user I chose was amadmin (for the moment).
I also configued an Agent with agentRootURL=http://<WAS fully qualified domain name>:9080/
When I try to access the URL of the servlet in the WAR, I am redirected to the SAM's login page
http://<SAM fully qualified domain name>/amserver/UI/Login?goto=http%3A%2F%2F<WAS fully qualified domain name>%3A9080%2FRoamingApp%2FRoaming
However, when I enter the amadmin/ <password> error 403 is returned to the browser.
I've checked the logs on SAM
From amAuthentication.access
"2005-07-28 11:58:15" "Login Success" LDAP dc=acme,dc=com INFO uid=amAdm
in,ou=People,dc=acme,dc=com <WAS IP address> "cn=dsameuser,ou=DSAME Users,dc=acme,
dc=com" <WAS IP address>
From amSSO.access
"2005-07-28 11:58:15" "SESSION CREATE" amSSO.access dc=acme,dc=com I
NFO uid=amAdmin,ou=People,dc=acme,dc=com <WAS IP address> "cn=dsameuser,ou=
DSAME Users,dc=acme,dc=com" <WAS IP address>
From agent.log (Policy Agent on Win 2000)
[Thursday, July 28, 2005 11:58:15 AM BST] [null]
Access to http://<WAS fully qualified domain name>:9080/RoamingApp/Roaming denied for user UNKNOWN
Perhaps I dont have the Policy in SAM configured correctly..... if anyone has come across this kind of problem before, I would greatly appreciate any help they can give me.
Thanks,
JustinThanks for getting back to me Jerry.
I had a look at the role-to-principal mappings you suggested. To do this I added a security constraint to my web.xml file.
Then I reconfigured WebSphere so that the Active User Registry = LDAP instead of Custom. This allowed me to assign the LDAP group (in SAM) to the role (in web.xml). WAR file installed fine with these new bindings and I restarted WAS.
Unfortunately, I'm still getting Error 403 in the browser!
Any ideas as to what I might be doing wrong? Any help you can give me would be much appreciated.
This is the amFilter log file from the Policy Agent...
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: incoming request =>
HttpServletRequest: class => com.ibm.ws.webcontainer.srt.SRTServletRequest@1af52898
Character Encoding : null
Content Lenght : -1
Content Type : null
Locale : en_IE
Accept Locales:
en_IE
Protocol : HTTP/1.1
Remote Address : 172.20.13.96
Remote Host : 172.20.13.96
Scheme : http
Server Name : dubwrk1589.ie.pri.o2.com
Server Port : 9080
Is Secure : false
Auth Type : null
Context Path : /RoamingApp
Cookies:
amFilterParam: AQIC5wM2LY4Sfcx0xX1Z1+1tK4SfLh/aCFlbIGuRNEPcAVc=
amFilterRDParam: AQIC5wM2LY4Sfcwb7v6Sof6MpnvtyR8nae7hiKN7Y11QjCagyWAs9LzbAeB9Q4TP8VjruhK+oYForXxw/qq6TqbMAN1PlT1YOQI3Vy92iAaJ2N9x2bSRaUU7NlwZg8oTti+JOLdiRMTzwO17jIoWwCIx/0CtoQXpkX/meuAoFwf1feyAEp2NvK7AIbE82f/p8o4LxQbhK2NQNec=
WASReqURL: http://dubwrk1589.ie.pri.o2.com:9080/RoamingApp/Roaming
JSESSIONID: 0000HRZTVpt84dvtjaLaKWBnwzu:-1
Headers:
accept:
image/gif
image/x-xbitmap
image/jpeg
image/pjpeg
application/msword
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/x-shockwave-flash
referer:
http://sam.digifone.com/amserver/UI/Login?goto=http%3A%2F%2Fdubwrk1589.ie.pri.o2.com%3A9080%2FRoamingApp%2Flogin.jsp
accept-language:
en-ie
cookie:
amFilterParam=AQIC5wM2LY4Sfcx0xX1Z1+1tK4SfLh/aCFlbIGuRNEPcAVc=; amFilterRDParam=AQIC5wM2LY4Sfcwb7v6Sof6MpnvtyR8nae7hiKN7Y11QjCagyWAs9LzbAeB9Q4TP8VjruhK+oYForXxw/qq6TqbMAN1PlT1YOQI3Vy92iAaJ2N9x2bSRaUU7NlwZg8oTti+JOLdiRMTzwO17jIoWwCIx/0CtoQXpkX/meuAoFwf1feyAEp2NvK7AIbE82f/p8o4LxQbhK2NQNec=; WASReqURL=http://dubwrk1589.ie.pri.o2.com:9080/RoamingApp/Roaming; JSESSIONID=0000HRZTVpt84dvtjaLaKWBnwzu:-1
accept-encoding:
gzip
deflate
user-agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
host:
dubwrk1589.ie.pri.o2.com:9080
connection:
Keep-Alive
cache-control:
no-cache
Method : GET
Path Info : null
Path Trans : null
Query String : null
Remote User : null
Requested Session ID : 0000HRZTVpt84dvtjaLaKWBnwzu:-1
Request URI : /RoamingApp/login.jsp
Servlet Path : /login.jsp
Session : true
User Principal : null
Attributes:
com.ibm.servlet.engine.webapp.dispatch_type: forward
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
FQDNHandler: Incoming Server Name: [dubwrk1589.ie.pri.o2.com] Result: null
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
PatternRule{*/j_security_check}.matchString(/RoamingApp/login.jsp) => false
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
NotEnforcedListManager.isNotEnforced(/RoamingApp/login.jsp) => false
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: Login attempt number: 10
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: SSO Validation failed for null
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: Reseting Cookies in Response
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
WARNING: AmFilter: Login attempt number 10 failed for request URI: /RoamingApp/login.jsp
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
URLFailoverHelper: Checking if http://sam.digifone.com:80/amserver/UI/Login is available
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
URLFailoverHelper: URL http://sam.digifone.com:80/amserver/UI/Login is available
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
URLFailoverHelper: getAvailableURL() => http://sam.digifone.com:80/amserver/UI/Login
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: redirectURL is: http://sam.digifone.com:80/amserver/UI/Login?goto=http%3A%2F%2Fdubwrk1589.ie.pri.o2.com%3A9080%2FRoamingApp%2Flogin.jsp
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
WARNING: AmFilter: redirect attempt limit reached for http://sam.digifone.com:80/amserver/UI/Login?goto=http%3A%2F%2Fdubwrk1589.ie.pri.o2.com%3A9080%2FRoamingApp%2Flogin.jsp, access will be denied
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: Using 403 forbidden to block access
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
getResource: id = 20004
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
AmFilter: result =>
FilterResult:
Status : FORBIDDEN
RedirectURL : null
RequestHelper:
null
Data:
null
07/29/2005 05:48:44:980 PM IST: Thread[Servlet.Engine.Transports : 2,5,main]
getResource: id = 20008 -
Java Function Activity Agent not starting
Hi,
I am facing some problem in starting Java Function Activity Agent on Windows XP.
I hav modified WF_CLASSPATH of wfjavlsnr.bat script to include classes12.jar, ojdbc14.jar & my custom jar files.
But when I run this script from command prompt using following syntax
wfjvlsnr.bat owf_mgr/password@host:portid:sid or
wfjvlsnr.bat owf_mgr/password@sidfollowing messge is thrown...
Oracle Workflow 2.6.0 JAVA Function Activity Agent
t2cCreateState
Connected to owf_mgr@dbserver:1521:ORA10G with character set
UTF8
Unable to connect to dbserver:1521:ORA10G
Can anybody please point out what could be the problem....?
what is this t2cCreateState? I have never see this "t2cCreateState" when we run JFAA in unix box.
Any points will be appreciated..
Regards,
NitinHi,
I tried to run the same without entering password,but still i am getting error.
The error description is:
Oracle Workflow 2.6.3 JAVA Function Activity Agent
Please Enter Database Password :
ORA-06401: NETCMN: invalid driver designator
Unable to connect to nn0734.nucleussoftware.com:1521:asdb
Accepted arguments:
java <program> <user> <conStr> [oci8]
java <program> <user> <conStr> thin
Where <conStr> is in the form of <host>:<port>:<sid> for thin
and DB Service name for oci8
Please Help. Is there any problem with my tnsnames.ora or something else.
Thanx in advance,
Sarab -
What's Java Function Activity Agent?it's wfapi.jar?
pls explain the words below,tks a lot:
You must include the JAR files containing your custom classes in your
CLASSPATH to make the classes accessible to the Java Function
Activity Agent. The custom class files should reside on the same
platform where the Java Function Activity Agent is run. The Java
Function Activity Agent does not need to reside on the same tier as the
database, however.Hi,
I am facing some problem in starting Java Function Activity Agent on Windows XP.
I hav modified WF_CLASSPATH of wfjavlsnr.bat script to include classes12.jar, ojdbc14.jar & my custom jar files.
But when I run this script from command prompt using following syntax
wfjvlsnr.bat owf_mgr/password@host:portid:sid or
wfjvlsnr.bat owf_mgr/password@sidfollowing messge is thrown...
Oracle Workflow 2.6.0 JAVA Function Activity Agent
t2cCreateState
Connected to owf_mgr@dbserver:1521:ORA10G with character set
UTF8
Unable to connect to dbserver:1521:ORA10G
Can anybody please point out what could be the problem....?
what is this t2cCreateState? I have never see this "t2cCreateState" when we run JFAA in unix box.
Any points will be appreciated..
Regards,
Nitin -
How to get return value from java and read by other application?
i want to read return value from java and the other application read it.
for example:
public class test_return {
test_return(){
public int check(){
return 1;
public static void main(String args[]){
new test_return().check();
}from that class i make as jar file. How to read the return value (1) by other application?
thx..If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
Edited by: jverd on Oct 29, 2009 1:27 AM -
Remote Object - not able to get the returned value from java method
Hi ,
I am developing one sample flex aplication that connects to the java code and displays the returned value from the
java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
lastResult is giving null . I am able to see the sysout messages in server console.
I am using flex 3.2 and blazeds server and java 1.5
Here is the code what I have written.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.binding.utils.ChangeWatcher;
import mx.rpc.events.ResultEvent;
import mx.messaging.*;
import mx.messaging.channels.*
public function initApp():void {
var cs:ChannelSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf"); cs.addChannel(customChannel);
remoteObj.channelSet = cs;
public function writeToConsole():void { remoteObj.writeToConsole(
"hello from Flash client");
var returnedVal:String = remoteObj.setName().lastResult; Alert.show(returnedVal);
//[Bindable]
// private var returnedVal:String;
]]>
</mx:Script>
<mx:RemoteObject id="remoteObj" destination="sro" />
<mx:Form width="437" height="281">
<mx:FormItem>
</mx:FormItem>
<mx:Button label="Write To Server Console" click="writeToConsole()"/>
</mx:Form>
</mx:WindowedApplication>
Java code
public
public SimpleRemoteObject(){
super(); }
class SimpleRemoteObject {
public void writeToConsole(String msg) { System.out.println("SimpleRemoteObject.write: " + msg); }
public String setName(){ System.
out.println("Name changed in Java");
return "Name changed in Java";
And I have configured destination in remote-config.xml
<destination id="sro">
<properties>
<source>SimpleRemoteObject</source>
<scope>application</scope>
</properties>
</destination>
Please help me .You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
In this you define what you wish to do.
More importantly in the remote object you need to define which method you wish to call using the method class like this
<mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1" >
<Method name="javaMethodName" result="r2" fault="f2"/>
<mx:RemoteObject>
r2 is the function where you get the result back from java and can use it to send the alert. -
How can I refresh a calling page on return from a TF activity ?
Hi,
I have a (sounds easy) case where a view activity invokes a BTW with fragments. The called BTF has been declared with isolated data control scope. Inside the BTF some updates happen and when the BTF returns the calling view should display the modified data. The BTF should not be opened as a dialog and the above take place inside a region. There are examples in the Internet for how to implement such case but only calling a taskflow with pages from a dialog.
I tried creating first the Taskflow binding definition [19.10.1 How to Associate a Page Definition File with a Task Flow Activity|http://docs.oracle.com/cd/E35521_01/web.111230/e16182/taskflows_activities.htm#sthref539] , then I set the related operations (Execute, setCurrentRowWithKey, ...) in the Page Definition and invoke the operations inside the “After Listener” Listener (<after-listener>) of the taskflow activity but the binding context is not accessible inside the listener, I get NPE accessing the binding.
After some tests I have found that I can call the Operations using “#data.taskflowdefinition..” but I afraid using this technique because of so many papers stating that this is a bad practice.
Additionally I tested using an invokeAction in the calling page definition page and it works but I prefer “refreshing” the model from the activity (there are many pages calling the same activity).
I am wondering if there is a more elegant solution that I haven’t seen yet.
Thanks for any ideas,
Yiannis
Edited by: Tses on Mar 8, 2013 11:15 PMHi Timo and thank you for your reply,
As far as I know any method executed in the BTF has no effect in the calling page because of the isolated data control scope.
Consider the following layout of a very simple TF diagram. The BTF has "Share data controls with calling task flow" unchecked and "Always begin new transaction"
View --> Method Call --> BTF
Now imagine that a user navigates from the View to the BTF, make updates and finally commits the transaction from a taskflow return activity. The updates are executed inside the "private" BTF's data control scope because of the BTF settings.
Returning to the calling View the user sees stale data from the Data Control of the View, until he re-queries the model.
ADF supports execution of code during the call of the BTF (through Method Call) and also sending and returning parameters from the View to the BTF.
Conversely on return from the BTF there is no handler for executing code (something like "Return Method Call") in order to refresh (e.g. re-query and set current row) the View exploiting the return parameters.
The "After Listener" in the taskflow call activity has not access to the bindings context. Using #{data.bindingTFXXX} I guess that has a risk in a high availability environment for NPE where the http call to the BTF might be processed in a different server than the returning http call so the #{data.bindingTFXXX} might not exists.
The other solution I found using invokeAction with RefreshCondition depends on the returning values of the BTF, bloats the View with Bindings that I would prefer to be in a central place.
Am i missing something in the whole flow above ?
Yiannis -
Java.lang.NullPointerException returned from webservice
Hi I have an axis client which sends an image attachment to an axis webservice, however I am returned with a null pointer exception,
this is my client,
package chapter5;
import java.net.URL;
import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
public class AttachmentServiceClient{
public AttachmentServiceClient(){}
public static void main(String args[]){
try{
String filename = "D:\\images\\products\\r.jpg";
//create the data for the attached file
DataHandler dhSource = new DataHandler(new FileDataSource(filename));
String endpointURL = "http://localhost:8080/axis/services/AttachmentService";
String methodName = "addImage";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endpointURL));
call.setOperationName(new QName("AttachmentService",methodName));
call.addParameter("sku",XMLType.XSD_STRING,ParameterMode.PARAM_MODE_IN);
QName qname = new QName("AttachmentService","DataHandler");
call.addParameter("image",qname,ParameterMode.PARAM_MODE_IN);
//register the datahandler
call.registerTypeMapping(dhSource.getClass(),qname,JAFDataHandlerSerializerFactory.class,JAFDataHandlerDeserializerFactory.class);
call.setReturnType(XMLType.XSD_STRING);
Object[] params = new Object[]{"SKU-111",dhSource};
String result = (String)call.invoke(params);
System.out.println("The response: "+result);
; }catch(Exception e){
System.err.println(e.toString());
this is my webservice,
package chapter5;
import javax.activation.DataHandler;
import java.io.FileOutputStream;
import java.io.File;
import java.io.BufferedInputStream;
public class SparePartAttachmentService{
public SparePartAttachmentService(){}
public String addImage(String sku,DataHandler dataHandler){
System.out.println("trying");
try{
String filepath = "c:/wrox-axis/"+sku+"-image.jpg";
FileOutputStream fout = new FileOutputStream(new File(filepath));
BufferedInputStream in = new BufferedInputStream(dataHandler.getInputStream());
while(in.available()!=0){
fout.write(in.read());
}catch(Exception e){
return e.toString();
return "Image: "+sku+" has been added successfully!!";
I did a test by stripping out the attachment being sent by the client and just let it send the string,
then in the webservice I stripped out the lines for the attachment and just returned the string and it worked ok, so it has been deployed correctly.
I have the Java Activation framework both in tomcat commons and my webapps lib dir.
I'm pretty sure the error is being thrown here,
public String addImage(String sku,DataHandler dataHandler){
any help would be greatly appreciated,
thank you,
JP.Ok, I have now successfully got the stack trace to show where the exception bubbled, Im suprised its in the axis client as I assumed it was in the webservice, but this whole exercise has been extremely beneficial,
anyway this is the client code again and the stack trace error, I now think the problem lies within the JAF, possibly, however, im doing something incorrectly,
package chapter5;
import java.net.URL;
import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.namespace.QName;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.activation.DataSource;
import java.io.File;
public class AttachmentServiceClient{
public AttachmentServiceClient(){}
public static void main(String args[]){
try{
String filename = "D:\\javaDev\\utilities\\coldfusionMX\\Java\\javapetstore\\r.jpg";
//create the data for the attached file
DataHandler dhSource = new DataHandler(new FileDataSource(new File(filename)));
String endpointURL = "http://localhost:8080/axis/services/AttachmentService";
String methodName = "addImage";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endpointURL));
call.setOperationName(new QName("AttachmentService",methodName));
call.addParameter("sku",XMLType.XSD_STRING,ParameterMode.PARAM_MODE_IN);
QName qname = new QName("AttachmentService","DataHandler");
call.addParameter("image",qname,ParameterMode.PARAM_MODE_IN);
//register the datahandler
call.registerTypeMapping(dhSource.getClass(),qname,JAFDataHandlerSerializerFactory.class,JAFDataHandlerDeserializerFactory.class);
call.setReturnType(XMLType.XSD_STRING);
Object[] params = new Object[]{"SKU-111",dhSource};
try{
String result = (String)call.invoke(params);
System.out.println("The response: "+result);
}catch(Exception f){
f.getStackTrace();
f.printStackTrace();
}catch(Exception e){
System.err.println("error");
stack trace
C:\wrox-axis>java chapter5.AttachmentServiceClient
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(Unknown Source)
at org.apache.axis.SOAPPart.getAsString(Unknown Source)
at org.apache.axis.SOAPPart.getAsBytes(Unknown Source)
at org.apache.axis.Message.getContentLength(Unknown Source)
at org.apache.axis.transport.http.HTTPSender.invoke(Unknown Source)
at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source)
at org.apache.axis.SimpleChain.doVisiting(Unknown Source)
at org.apache.axis.SimpleChain.invoke(Unknown Source)
at org.apache.axis.client.AxisClient.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at chapter5.AttachmentServiceClient.main(AttachmentServiceClient.java:45
Caused by: java.lang.NullPointerException
at org.apache.axis.encoding.ser.JAFDataHandlerSerializer.serialize(Unkno
wn Source)
at org.apache.axis.encoding.SerializationContextImpl.serializeActual(Unk
nown Source)
at org.apache.axis.encoding.SerializationContextImpl.serialize(Unknown S
ource)
at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(Unk
nown Source)
at org.apache.axis.message.SOAPEnvelope.outputImpl(Unknown Source)
at org.apache.axis.message.MessageElement.output(Unknown Source)
... 13 more -
How to return sdo_geometry from java procedure
How can I return a SDO_GEOMETRY object from a java-stored-procedure to PL/SQL.
I have a java class with methods that creates a specific polygon based on some user values. I want to return this polygon as a SDO_GEOMETRY object to a PL/SQL procedure.
JDeveloper does not accept SDO_GEOMETRY as a return type.
Can this be done?Justin,
I have a PL/SQL package that contains several functions. One of them does selection and filtering of spatial features based on a user's location and preferences. For this purpose a web-application runs this function.
I would like this function to do the following:
1. the function is called, user parameters are passed in
2. a call to a java-stored-procedure is made. This java procedure creates a polygon based on the user's location and preferences.
3. the polygon is returned to the PL/SQL function
4. the funtion uses the returned polygon to query spatial features that intersect, etc.
I can do the call to the java-stored-procedure but where I get stuck is how to get the polygon from java to pl/sql. I can return a String or a number from java but how can I return the polygon (e.g., STRUCT, java object)?
The current solution uses a work-around by storing the polygon in a temporary table. I would like to change this because once the function has run, the polygon is not needed anymore so I would like to do without having to store the polygon.
Markus -
Java function activity agent fails
Hello,
Trying to run workflow java function activity agent ends with dr. Watson. Environment:
OS: NT40 sp 6
DB: 8.1.7.0.0
JRE: 1.1.8
Anybody came across this or is this a known problem? Please share your findings.
Thank you.
AnatoliySorry,
The problem was with the wrong jar file.
Maybe you are looking for
-
How to sent the data reading in labview to excel datasheet
Hi, I have aquire the current input from Cb68LP connector block to the labview.Thank a lot But I not sure how to sent the data to the excel datasheet(with row and column). thank
-
My screen is in zooom mode all the time. how do i get rid of zoom?
my screen on iphone 4 is in zoom mode all the time. how do i get rid of zoom?
-
HT2534 Payment option does not have "NONE" option. I do not want to provide my CC number
How can I get around this? I should not have to provide cc # to iTUNE when downloading frree apps. Seems like I spend $700.00 and cannot even download FREE APPS (for printing). without the Crfedit CardNumber This is my first Apple device, and it am
-
When do I need to incorporate Dispose into my code?
I'm trying to understand (a) if I ever need to implement Dispose in my classes and (b) if I do, when do I? Part of the reason for asking is because I have implemented Dispose in some of my classes, because I wanted to ensure that collections of items
-
Coldfusion MX 7 connection timeout
Hi all, This might not really related to Coldfusion MX 7 itself, however it's worth a try to ask everyone who has encountered the similar problem with our web application setup. Coldfusion MX 7.0.2 Apache 2.2 Using ModelGlue framework Using NLB to sh