Access App Modules from same workspace OR from different workspaces
Hello,
1- I want to access an application module methods "application A", from another application module methods "Application B", the two applications are developed under different workspaces, Is this doable
in Oracle ADF, I need a solution other than web services if possible.
2- I tried to access a method in AppModuleA using another method in AppModuleB, the two application modules are in the same work space but in different model project, I followed the link :
http://myadfnotebook.blogspot.com/2010/08/problem-adf-application-with-multiple.html
I used the following code:
public String getQueryMultipleDB(){
getEmpView1().executeQuery();
String DB1 = String.valueOf(getEmpView1().getRowCount());
String DB2 = " ";
ApplicationModule appModuleDB2 =
Configuration.createRootApplicationModule("modelDB2.ApplicationModuleDB2.common.AppModuleDB2","AppModuleDB2Local");
ViewObject viewObjectDB2 = appModuleDB2.findViewObject("EmpView1");
DB2 = String.valueOf(viewObjectDB2.getRowCount());
return "DB1: "+ DB1 + " DB2: "+ DB2;
but I am getting the following error:
(oracle.jbo.ConfigException) JBO-33001: Configuration file /modelDB2/ApplicationModuleDB2/common/common/bc4j.xcfg is not found in the classpath.
Please help if possible...
Thanks in Advance,
MAbuShaera
Depending on your use case have a look at either nested application modules:
http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcservices.htm#sm0229
or packaging an application module in an ADF library:
http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/reusing_components.htm#BABCHHHJ
Similar Messages
-
Nesting App Modules from ADFLibs - jdev 11.1.2.3
Hello:
I have a dashboard application with 6 tabs. On each tab is a bounded task flow from an ADFLib. Note: each BTF has its own App Module.
In the Master DashBoard App, the ADFLibs BTF's are dropped as regions in each tab. The Master App has its own application module and I want to nest each of the BTF App Modules under the single App Module in the Master app. The reason is that each tab of the application currently creates a seperate DB connection. I want the Master App to only create one DB connection for the entire application.
In the resource pallet, I can see the App Modules from the seperate ADFLibs, and I have added these App Modules to the Master Project, but the newly added AM does not display under the Master App Module for me to nest. (in App Module ->- Data Model --> Application Module Instances)
How can I nest multiple AM's from ADFLibs under a single Master App Module? ( the AM from ADFLibs do not display in Application Module Instances in the Master App)
ThanksHave I added the application Modules to the Master Model?
Answer:
In the Master, In the Resource Pallet, I highlighted the Application Module in the ADFLibs (from Subsystem), right clicked and selected Add to Project. But this did not make the App Module display in the Master App Module Application Module Instances. (Note: my subsystem adflibs are deployed from ViewController with dependency on Model. I tried to hightlight App Module above and add to Model Project of Master in above) This caused WebLogic to fail to deploy.
What is the correct way to add an App Module from an ADFLIb subsystem and add the AM to the Master App so it displays in the Master App Module Application Module Instances?
All subsystems should use the same connection and all subsystems are set to No Controller Transaction and Share data controls with calling task flow is checked for all subsystem.
More testing revealed:
One thing to note: each of my subsystem, a deployment profile was created on the ViewController with dependency on its Model project. When I added the subsystem project above to add the AM, I adding the App Module from the adflib to the Model project of the master. This caused WebLogic to fail during deploy.
So I tried another test. In the subsystem, I created another deployment profile, on just the Model project and created an adflib. I added this new adflib to the Model project of the Master. The App Module from the subsystem now shows up in the Application Module Instances. (which I selected and moved over to the right to nest under Master App Module. This time the application ran, but still have one connection per tab.)
Do you create ADFLibs with a deployment profile on the VC with dependancy to the Model Project? Or do you create two seperate ADFLibs for subsystems, one for VC project only and one for Model project only?
Thanks for the help. -
Loading modules from different domain
when I load modules from the same location where is main application, everything is fine. But when modules are loaded from different adrress i got following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.utils::LoaderUtil$/isRSLLoaded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\uti ls\LoaderUtil.as:525]
at mx.utils::LoaderUtil$/http://www.adobe.com/2006/flex/mx/internal::processRequiredRSLs()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\utils\LoaderUtil.as:259]
at mx.core::FlexModuleFactory/getRSLInfo()[E:\dev\4.5.1\frameworks\projects\framework\src\mx \core\FlexModuleFactory.as:582]
at mx.core::FlexModuleFactory/update()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:470]
at mx.core::FlexModuleFactory/moduleInitHandler()[E:\dev\4.5.1\frameworks\projects\framework \src\mx\core\FlexModuleFactory.as:819]
any ideas what might be wrong?
thanks for any help in advanceThis is a link to testing application:
http://michalnpe.homeip.net:55001/bin-release/LoadModuleApp.html
you can see source code of this app.
Let's say we want to run module from different domain.
so insert following address for crossdomain.xml and module (into TextInput in the applicataion above) .
http://a2s.pl/crossdomain.xml
http://www.a2s.pl/npe/softmgr/Michal/wymiana/TestModule.swf
here is the code that loads the module:
protected function loadModule(event:MouseEvent):void
testloader.url = moduleAddress.text;
//testloader.loadModule();
public function setup():void { // run before loading modules
Security.allowDomain("*");
Security.loadPolicyFile(crossdomain.text);
var request:URLRequest = new URLRequest(crossdomain.text);
var loader:URLLoader = new URLLoader();
loader.load(request); -
How to access form objects from different class?
Hello, I am new to java and i started with netbeans 6 beta,
when i create java form application from template i get 2 classes one ends with APP and one with VIEW,
i put for example jTextField1 with the form designer to the form and i can manipulate it's contents easily from within it's class (let's say it is MyAppView).
Question>
How can i access jTextField1 value from different class that i created in the same project?
please help. and sorry for such newbie question.
Thanks Mikehmm now it says
non static variable jTree1 can not be referenced from static context
My code in ClasWithFormObjects is
public static void setTreeModel (DefaultMutableTreeNode treemodel){
jTree1.setModel(new DefaultTreeModel(treemodel));
and in Class2 it is
ClasWithFormObjects.setTreeModel(model); -
How to access application module from ActionForm Execute?
I've got a very simple ADF/UIX/Struts application where I'm trying to create a simple Login function. I have a /loginAction data action pointing to a login.uix page forward. The login.uix page has a <struts:form> on it with a user and a password field. There is a LoginBean with the corresponding get/set values. I have an ADF model created with a boolean login(String username, String password) function exposed as a client method.
Eventually, when I have this basic part working, then I'll actually be using an ActionForward mapping to dispatch to different home pages, based on the particular login account (the name of the forward will be stored in the authentication table).
I've tried overriding Execute(), since that is where you can return the appropriate ActionForward mapping, but that does not have a DataActionContext passed in -- so I can't get to the application module.
I've also looked at processComponentEvents, but that doesn't have any ActionForward results nor a way to pass back ActionErrors (in case the login fails).
How do I call my login client method when a user has entered a username/password and pressed the Submit button?Here is another solution as provided by Oracle Support in response to a TAR that I opened:
I had described my need to access a login() function defined in my Application Module, returning true/false if the login succeeds/fails. Here is the reply, posted with permission:
I have gotten the following information back from one of the development folks pertaining to the question you asked.
His suggestions are as follows:
1) Expose the method as a client method on the App module
2) On the pageflow create a new DataAction
3) Drag and drop the logon method from the AppModule operations node and drop it onto the new data Action
3) Edit the set-property values that are created in the Struts metadata for this new DataAction to use the correct expressions to get the logon info to pass to the middle tier.
e.g.
<action path="/authenticateUser" className="oracle.adf.controller.struts.actions.DataActionMapping" type="AuthenticateUserAction" name="DataForm"
unknown="false">
<set-property property="modelReference" value="authenticateUserUIModel"/>
<set-property property="methodName" value="authenticateUserUIModel.authenticateUser"/>
<set-property property="resultLocation" value="${requestScope.methodResult}"/>
<set-property property="numParams" value="2"/>
<set-property property="paramNames[0]" value="${param.logonUsername}"/>
<set-property property="paramNames[1]" value="${param.logonPassword}"/>
<forward name="fail" path="/logon.do"/>
<forward name="success" path="/menu.do"/>
</action>
So in this case the values of the logonUsername and logonPassword fields in the form that submitted to this DataAction are passed as the two parameters that my authenticateUser method on the AppModule requires.
I have also overriden the data action class to customise the findForward() method to route the user depending on if the method call worked or not.
And here's the code for the customized FindForward in the DataAction:
protected void findForward(DataActionContext actionContext) throws Exception
HttpServletRequest request = actionContext.getHttpServletRequest();
HttpSession session = request.getSession();
String target = "fail";
//Get the result of the Model Method call
JUCtrlActionBinding method = actionContext.getCustomMethod();
boolean successfulLogon = ((Boolean)method.getResult()).booleanValue();
if (!successfulLogon)
// If the logon fails we need to do the following
// 1. Increament the counter once this exceeds 3 any logon will fail
// 2. Create an error message to display on the logon screen
// note this is a non specific error to prevent hackers from
// knowing that they at least got the username right or from
// knowing that there is a Max attempts value if they are trying
// an automated attack
Integer attempts = (Integer)session.getAttribute("logonAttempts");
int intAttempts = 0;
if (attempts != null)
intAttempts = attempts.intValue();
session.setAttribute("logonAttempts", new Integer(++intAttempts));
//The error message comes out of the ApplicationResources.properties file.
actionContext.getActionErrors().add("general",new ActionError("logon.error.logonFailed"));
this.saveErrors(actionContext.getHttpServletRequest(),
actionContext.getActionErrors());
else
//If connection was OK do we need to save the username in a cookie?
String remember = (String)request.getParameter("logonRemember");
int cookieLife = 0; //Expire
if ( remember != null && remember.length()>0 )
cookieLife = 2592000;
String name = (String)request.getParameter("logonUsername");
Cookie userCookie = new Cookie("CARA_USER_COOKIE",name);
userCookie.setMaxAge(cookieLife);
actionContext.getHttpServletResponse().addCookie(userCookie);
target = "success";
actionContext.setActionForward(target);
I hope this helps anyone looking to implement something similar. It also illustrates the "preferred" way of executing a client method and working with the result. -
How to call an App Module from another App Module?
Here are the settings for my project.
MyApplication (Application)
Model1 (Project) : Has connection settings to connect to schema1
Model2 (Project) : Has connection settings to connect to schema2
ViewController (Project) : View project
How do I call Model2 from Model1 ? I tried calling findApplicationModule but that did not work.
Can I get access to the AppModule from JNDI tree? How else can I get access to Model2 from Model1?
ThanksThis is the code that is getting called from App Module 1. The first method, test1, throws an error where as test2 is successful. Do you see any obvious errors in the code?
public String test1() {
System.out.println("This is test1");
String amDef = "org.model.service.HrService";
String config = "HrServiceLocal";
ApplicationModule am2 = (ApplicationModule ) Configuration.createRootApplicationModule(amDef,config);
HrServiceImpl am3 = (HrServiceImpl)am2;
am3.test123();
Configuration.releaseRootApplicationModule(am2, true);
//return am2;
return "test1";
Error:
Internal Server Error (Caught exception while handling request: oracle.jbo.ConfigException: JBO-33005: Configuration HrServiceLocal not found)
public String test2() {
String AMDefName = "org.model.service.HrService";
Hashtable env = new Hashtable(2);
env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
HrService am = null;
try {
InitialContext ic = new InitialContext(env);
ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(AMDefName);
am = (HrService)home.create();
String retString = am.test123();
System.out.println("Value from the first application module=" + retString);
catch (NamingException nex) { /* Handle the error here if you don't find it */
System.out.println("Naming exception " + nex);
Configuration.releaseRootApplicationModule(am, true);
return "test2";
successful
Thanks
Mike -
Is it possible to call a custom method in App Module from a backing bean?
I would like to know if a custom method in App Module can be called from inside a backing bean.
I am not sure if it is logically right to call, from a backing bean, a custom method in App Module. But would like to know if that makes sense or if it is possible.Hi..
Yes it is possible.You have to add that method for client interface of AppModule.Now you can see that method in Data Controls(Refresh the data control). To call this method using bean it should add as method action to bindings(Click Bindings>+>methodAction>and Create action binding).
Now you can call this method in bean class.
Check following example use this concept to execute view criteria
http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html -
Discovering someone has accessed app store from my computer..?
Hi,
I just went on to the apple store to update some programs. When I clicked update, the window asking for my app store password popped up. Usually my email address is already filled in. Only this time there was some one elses email address there. You'll say it's not a problem, all i need to do is replace it. But how come someone else has connected to the app store from my macbook. No one has had access to my macbook, it's password protected. In addition the email address is (...)@mail.ru which is a russian website, everyone I know has nothing to do with Russia and can't speak russian.
Could someone have pirated my computer? What is going on?
Thanks,
Petehttps://discussions.apple.com/docs/DOC-5261
-
Cannot Access Application Module from View Project (Swing)
I recently started a new application workspace as a Swing project with Business Components. Jdev created 2 projects by default, a Model and a View. The model works fine, all the business components are funtctioning and the DB connection is good. When i try to create a reference to the application module in my View project i constantly get 'Class Not Found' exceptions no matter what i do. I am using the jbo.client.Configuration.getRootApplicationModule('amName', 'amConfig') method.
What am i missing? How do i instantiate my application module from my View project?
Thanks a lot.Just had to add the Model to the classpath...
-
Can't update apps bought from different stores efficiently any more, why?
After the latest update of iTune 11, I found I can not any more update iOS Apps efficiently in iTunes. I have three different iTunes Store accounts for different country stores and they are all active.
Before this iTunes update, I had been able to update apps by store - which means when I am in a certain App Store, iTunes shows all apps need-to-update in that store only. I could press 'Update All" and sign-off so as to switch to another App Store while the updating running by itselfs and do the same in another store. This has been quite an effective way when there are more than 10 apps to update.
The new iTunes has a category "Update", which is good. However, it doesn't further categorize the apps by Store. The problem now is that I had 300+ updates waiting there and they belong to 3 stores. When I start updating with Store A, I can't sign-off (so no way to switch) until the apps update in Store A completes. Then it comes another big problem - when app No 22 to 26 were bought through Store B, 27 to 30 from Store A, 30-31 from Store C, etc, the udpate will stop when app 22 is detected and iTunes pops up a dialogue saying something like "this app was from another store, you have to switch to that store". If I don't switch, the udpate will not continue; if I do, it will stop the updating of app 20 and 21 (if haven't finished by then).
Once I switch, the same thing will repeat when app 27 is detected, then app 30, then app 32, then... then it is a total catastrophy.
On iOS devices, I don't have to switch to update apps from multiple stores, except when some apps were for certain store only, such as China Sore. Even the latter, I don't have to switch "BACK and FORTH".
Why can't iTunes on Mac do the same? At least, iTunes should continue to allow app update by Store and allow updating continues when the accounts is signed off.
Has anyone had the same problem? Is this a bug or not?Just updated to iTunes 11 two days ago and am also seeing
the same behavior. The only way to find out if there is an update
to an app in iTunes is to enable the side bar, click on Apps. Then in
the lower right corner, click check for updates. If you are already logged
into the iTunes Store, I believe it will show the updates automatically.
But yes, it should show that an update is available in the store, as it used to. -
Accessing a variable from different application instance in fmis
Hello everyone i like to know how to declare a global variable in FMS, so that i can access it from different application instance of a same application.
Thank.Hi,
In such a use case you can use persistent shared object to keep track of all connected users and the instances they are connected to. then when a user connects in application.xml you can check whether that user name and password is valid for a instance. This doc should help you get this achieved http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d3 7a-7fff.html
Thanks,
Abhishek -
How to access Excel files from different locations?
Hello,
I have successfully tested the Excel sample on WLS 7, and trying to run it on
the WLS 8.1.
Anyways, the common question for both is, how to access an excel files from different
locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
\\domain2\accounts\vouchers.xls)?
From example i can see that it picks from a specific path under repository.
Thanks
Ashok GuptaThe custom function sets the MS-Excel default directory to System.getProperty("user.dir")+"/excel"
(the domain directory), then opens the filename passed as a parameter. I assume
that if you pass in the fully specified path for the excel file ( like d:\MyDir\data\test.xls),
that it would open that file.
- Mike
"Ashok Gupta" <[email protected]> wrote:
>
Hello,
I have successfully tested the Excel sample on WLS 7, and trying to run
it on
the WLS 8.1.
Anyways, the common question for both is, how to access an excel files
from different
locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
\\domain2\accounts\vouchers.xls)?
From example i can see that it picks from a specific path under repository.
Thanks
Ashok Gupta -
Referring Application Module from different Project
I have two projects. a.jpr and b.jpr
I need to refer an Application Module from b.jpr in the first project a.jpr
In the Application Module edit Wizard, in the "available" list it shows all the Application Modules from the current project only.
What do I have to do to see the Application Modules of the other project.
In the "Project Settings" option, under "Dependencies" I have referred to the other project "b.jpr"
But it didn't help.
Any help is greatly appreciated.I have a similar problem as follows.
I have two projects: a web WAR and an EJB3 EAR. On deployment all the EJB class files are generated into the WAR file and the contents of the EAR file only has the XML configuration and dependant jar files.
How can I build the deployment EAR with the EJB classes within the jar? Why are they ending up in with the WAR WEB-INF/classes directory?
This a significant problem and any help / advice would be appreciated. -
Re:Can't able to access shared folders from different VLANs in SG300 series switches
Hi All,
I supplied 3 numbers of SG300 series switches for the sole reason to have inter-vlan routing. I created 4 VLANs in the switches and made one switch as Layer 3 switch and other 2 as Layer 2 switch. Inter-Vlan routing is working fine. I am able to ping PCs from different VLANs. But I am not to access shared folders. Customer has installed Window 2003 server installed and it is in VLAN 1. There are some folders created in this server and it is very important for users to have access to the folders.Also, I am not able to access shared folders in other VLANs. I have created a case with Cisco small business and I got a reply saying that the switches will not support shared folder feature, which I think is not real. I am getting a very time to implement this solution in the network. I have a Sonicwall firewall after Core switch which is connected to ISP.
ISP<----->Sonicwall FW<----->Core Switch<------>Layer 2 switch<------>Layer 2 switch
Kindly help me out to resolve this issue.
Regards,
Prashant KHi Prashant,
I think you're running into a Windows firewall issue. SMB file sharing, by default I believe, is only allowed on your local subnet. Please try disabling windows firewall on the computer hosting the shared folder, then see if you can access the shared file.
Best,
David
PS: It looks like this post got published twice. You can delete the other one using the task bar on the right.
Please remember to rate helpful resonses and identify correct answers. -
RFC Error while trying to access function module from business connector
Hi,
I am getting the following RFc exceptions in BC server when we invoke the service pub.sap.client:invoke fail as a flow step in Idoc_Status_Add(this service is calling a function module in sap namely ZYBC_IDOC_STATUS_ADD_FROM_BC which Adds status to Idoc (from Business Connector).But no trace of failures are recorded in sap side
except 1: rfc_failure in BC trace files under monitoring.I need to know the root cause of these errors as the same services have run finely later and IDOCs were also processed successfully without any problem.
com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: See RFC trace file or SAP system log for more details
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1217)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3684)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3129)
at com.wm.pkg.sap.rfc.SAPSession.invoke(SAPSession.java:437)
at pub.sap.client.invoke(client.java:297)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:709)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:140)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:292)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:559)
at com.wm.lang.flow.FlowState.step(FlowState.java:430)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:400)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1786)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:709)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:140)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:292)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:559)
at com.wm.lang.flow.FlowState.step(FlowState.java:430)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:400)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1786)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:709)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:496)
at wm.server.net.EmailTransaction$RunService.write(EmailTransaction.java:1375)
at wm.server.net.EmailTransaction$RunService.run(EmailTransaction.java:1218)
at com.wm.util.pool.PooledThread.run(C:/NT/Perforce/basis/4.1.0-terra/module/core/source/com/wm/util/pool/PooledThread.java:103)
at java.lang.Thread.run(Unknown Source)
could anyone throw light on how this kind of error can be resolved and why it occured?
Thanks.What does the RFC trace file and log say? Has there been any dump on the SAP server? Check the logs and transaction st22 in your SAP system to see if the RFC-module has dumped.
My guess is the problem is in the RFC-module, I think you should start looking there.
regards,
Dionisios
Maybe you are looking for
-
My music is all in a folder in D drive and the folder is called I tunes Music. When I open the I Tunes program it gives me the option to go to library and then to add files. I want to add the entire folder as there are too many individual files(son
-
I thought I would throw this question out there before I did anything drastic: Yesterday my AppleTV remote stopped working. No indication that it was a battery problem. Our iPhone remote apps still work. I bought a new battery. Still nothing. Like I
-
Report - shares of more than one landlord
Dear experts, I have got a requirement for a report from RE-FX that would give me information about shares (in % or in absolute amount) when more than one landlord, but when we do pay only to one of the owners(landlords). We need such a report, becau
-
It was pre-installed on the phone, so I can't uninstall and reinstall. I used to use this app all the time, so I really miss it. Did a factory reset...not help. Got a new phone, using my insurance. Still no luck Anyone have a tip???
-
I need help diagnosing why my Macbook pro is crashing my internet?
Hi, I need help diagnosing a problem with my macbook pro early 2011. For the past two weeks all of a sudden my internet was crashing and really slow. Finally I was getting so fed up I called my internet provider and we ruled out that it isnt the cab