How to execute classes that reside in different user's schema

I have to load a class in App1 and need to register a Java Stored Procedure in App2. This procedure refers class loaded in App1. Finally the procedure is to be executed from app1 user.
I am working with oracle database. It has two schemas App1 and App2.
I have a test class:
public class myTest {
     public static void test(int a, long b)
          System.out.println("A : "+a);
          System.out.println("B : "+b);
I have loaded the class in APP1 schema as follow
loadjava -user app1/app1 -oci8 -resolve –grant app2 myTest.class
Login to SQLPLUS by App1
Then created Java Stored procedure in APP2
CREATE OR REPLACE PROCEDURE APP2.Test( a IN NUMBER, b IN NUMBER) IS LANGUAGE JAVA NAME 'myTest.test(int,long)';
Now when I call this procedure, it gives error mentioned below
SQL> Call App2.Test (1, 2);
ERROR at line 1:
ORA-29540: class myTest does not exist
waithing for your input:)
Regards,
Anil

Hi,
Thanks for your suggestion, but I am not able to resolve the issues as yet. So could you please elaborate on it.
Our main concerned is to port an application running on DB2, to Oracle database. This application has multiple schemas, we have to load classes in one schema and refer theses classes from other schema. As explained in the query mentioned above.
As mentioned in your article, to grant permission to others schemas while loading jar. I have tried this also. Following is the command we used to load classes in APP1 and grant permission to APP2.
loadjava -user app1/app1 -oci8 -resolve -grant app2 myTest.class
But when referring theses classes to create java stored procedure in schemas other than APP1, it says class doesn’t exit.
The same things work fine in DB2 but now working in Oracle.
Note: The application uses single jdbc connection, the connection is shared between different modules; this is achieved by making connection static. So we cannot load jar in all the schemas, as if we load jar in all the schemas then we won’t be able to share static variables.
Please elaborate your suggested solution.
Thanks

Similar Messages

  • How to execute a transaction with a different user from the logged user?

    Hello Experts!
    I'm trying to find out a solution about this scenario: our users need to release a Purchase Order (ME28) and/or a Service Entry Sheet (ML85) in SAP from a WEB based application through TIBCO, but the requirement is to execute this operation with the same SAP User name of the user (with his authorization) and not with the TIBCO user that is logged to SAP.
    Is there someone that could suggest me a real time solution and how to develop it? I really appreciate your contribute and I'm at your disposal for any further information.
    Thank you very much!
    Alessandro

    Hi Rob!
    Thank you for your help, but I can't apply this solution, because we need to execute the transaction with a specific user name and not a generic user, besides our user have different authorization, for example the user Mr. Rossi can release only his Purchase Order but not the PO of another user Mr. Bianchi. Moreover we need to see the PO released/modified from a specif user name. So this is our constraint.
    Bye Ale.

  • General question: How to execute a batch input using different user name?

    Hi everyone,
    I would be very grateful if someone could tell me how to execute a batch input from source code using a differente username so the batch input is executed with different permissions.
    For example, I log on with:
    Username: A
    , but I'd like to execute a batch input using the rights and permissions of user B.
    Thanks in advance and best regards.
    Ben.

    If you are calling the BDC in a program, create a job to run the program and specify the user you want each program to run under.

  • Vis that reside in different location but have a same name und different funktion

    Can i use in LabView 5.01 Vis that reside in different location but have a same name und different funktion?
    How? I don´t wand to rename the VIs.

    Sorry, you can't have homonymous VIs simultaneously in memory. You'll have to rename one of them.
    LabVIEW, C'est LabVIEW

  • Execute process (shell script) under different user

    Hi,
    is it possible to use the ProcessBuilder oder .exec()-method to execute a shell script under a JVM-different user? I need to start shell scripts for different system users and I don't want to use SUDO or a wrapper script to switch to the required user. I would like to define the user at java level. Is this possible?
    Best regards,
    Thomas

    looking for something like this too.
    currently i am relying on a script in which i have to set the user as:
    "su username -c java_program"
    the problem with this approach is that if youre not running as root, then su asks for a password, thereby halting execution. (tried input redirects and here-docs, (some popular linux tricks), they did not work)
    so you have to be root for the script option to work.
    if anyone can suggest a more "java based" way of executing a process as a different user , thatll be awesome.

  • I am getting a message with some songs in my itunes library that has a different user id and says my computer is not authorized to play this song. ***?

    Since transferring my iTunes library to a new computer, my library is just a mess.  There are lots of songs that are duplicated 2, 3 and 4 times although all but one of the songs will get a message saying iTunes cannot find the file.  Now I am getting a messages with some songs that shows a different user id for iTunes and wants the password.  I have spent lots of $$$ and time trying to resolve these issues but really want to know what the heck is going on here?

    Maybe you purchased some of the other songs using a different itunes account.
    Could this be?

  • How to store jsp session data of different user in util.hashmap

    how to store jsp session data of different user in java.util.hashmap
    and access the data of all user on the server side
    The same example is given in professional jsp but its not working.
    I can use getIds() of httpsessioncontext but it's depricated

    Hi
    I'm trying to make an example.
    With the following codes you can get the date from the session.
    request.getSession().getAttribute("sessionname")
    To store it in a hashmap you could do it like this ->
    Hashmap hm = new Hashmap();
    hm.put(Object key, request.getSession().getAttribute("sessionname"));
    I hope you understand it if not just write it!
    Cyrill

  • How to execute a batch file on different remote server using TFS Build

    I have a build server and have 2 web servers. I am deploying using TFS Builds. Now, I have a requirement to execute a batch file which is kept on these 2 web servers. i.e. C:\MyBatch\CreateMe.bat
    After my build is successful, I need to execute this batch from the build server.
    Note, I cannot make any shared folder.

    Hi Sameer, 
    Thanks for your post.
    What’s the version of your TFS?
    How do you deploy solution using TFS Build, run MSBuild deploy command or using Release Management?
    That C:\MyBatch\CreateMe.bat file stay on your two web server machines separately? 
    If you want execute this bat file on your two web server machines separately using build process template, you need configure your web server machine as build agent, then add the InvokeProcess activity in build process template to run the bat file on build
    agent machine after build, please refer to Hari’s answer reply in this post:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/b8bcb19f-1296-441c-8356-e701b949445a/tfs-2010-how-to-execute-a-batch-file-after-build?forum=tfsbuild.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I consolidate all photos from different users on one computer?

    We just enable one computer to be the "Family" computer. I want to be able to consolidate all photos from the different users into one location. That way no matter wich user is login they can see and browse all the family photos. How can I do that? Do I need and external drive?
    Thanks in advance?
    MoMa

    Move the iPhoto Library to the Users/Shared folder, or you can use an external disk formatted Mac OS Extended (Journaled).
    Merge the Libraries as Larry says, with the paid version of Library Manager.
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Each account will have full access to the library, in fact, each account will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • HT3819 How do I share downloaded tracks between different users on same mac?

    Hello.  I bought my new Mac a couple of months ago.  I set it up with three different users, one for myself as admin, one for my wife, and one for our daughter, all on the same Mac. My wife and I both have our own Itunes account.  I spent a couple of days downloading almost all of our CDs into my Itunes library.  Now, I want to know how my wife and daughter can access these songs in their libraries so that they can put tracks on their Ipods.  So far, the only option that I have been able to see is the downloading of the CDs all over again into my wife's library.  Wouldn't this just make duplicate tracks on the Hard Drive?  If anyone can help, or point me in the right direction, it would be much appreciated.
    Thank you.

    It works for "initial sharing" but the described solution includes some drawbacks;
    - songs added under one account don't show "automatically" for other users
    - if added there is a copy of the song-file (* 2.mp3)
    - no "bulk" import withoud re-adding already present songs
    Any workarounds for these problems known? 'caus I'm getting tired to keep the 3 iTune Libs of my girls in synch
    AdvTHANKSance Chris

  • How to access Sharepoint List using a Different user. Access SharePoint List using some Authentication

    Hi,
    SharePoint version 2010
    I am building an application in Java and would want to accesss a SharePoint List through REST. I have been trying to find out how the authentication process would work once i want to deploy it into Production. 
    I am not able to find anything useful to send user detail / authentication. Can you please help me out here.
    Thanks,
    Bhaskar.
    Thanks, Bhaskar

    Hi,
    According to your post, my understanding is that you want to access SharePoint list from Java application through REST.
     In some cases you may need to create a new access token (this is somewhat akin to "running as a different user").
    Essentially, you are using a different user's security context. Typically, you would create an Active Directory account specifically for this purpose and then grant appropriate rights to the user account in SharePoint.
    http://sharepoint.stackexchange.com/questions/83440/authenticate-external-systems-against-sharepoint-rest-services
    There are some articles about this topic, you can have a look at them.
    http://stackoverflow.com/questions/10722215/authenticating-to-sharepoint-with-kerberos-from-a-java-httpclient
    http://ctp-ms.blogspot.com/2012/12/interoperability-between-java-and.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • How to develop software that would assist the user to store and retrieve personal information using c#

    The Personal Assistant software should be designed to meet the following specifications:
    When the application is executed, a menu with the following options should be displayed:
    contact details
    meetings
    On selecting either of the proceeding options, a submenu with the following options should be displayed:
    Add new record
    Delete record
    Edit record
    Search record
    The Contact details option would enable the user to add, edit, delete, and search the contact details of various people. The contact details include information such as name, address, phone number, and email address.
    Similarly, the Meetings/appointment option enable the user to add, edit, delete, and search meetings/appointments details. The meetings/appointment details include information such as date of meeting/appointment, time, and location.
    Note: The address book and the meetings/appointment details should be stored in files.
    When the application is run, reminders for the meetings/appointments scheduled for current date should be displayed on the screen. 

    Hello,
    Depending on your expertise you would design the source files that will contain your data to use followed by writing code to read in the data into containers that are encapsulated into classes where the classes have properties and methods to work the data
    in regards to display, edit, update, add and search/filter. The last bullet, display reminders would work off a trigger i.e. you call the code when the app opens or off a timer.
    Since it appears you are excluding databases which would be best for working this project I would suggest looking at using xml file to store data. From looking at the requirements you will need a relationship model.
    To give you code would almost be writing the app for you hence no code.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How do I access time machine from different user account

    Hi there.
    Last week I had to take my comupter into the local Apple Store because I was having problems with Boot Camp.  The genius at the store had to delete everything from my hard drive and reinstall it from my external hard drive.  As part of the process she created a "Apple" user account.  I now want to restore some files (unrelated to this Boot Camp story) from my time machine archive.  However, all the files prior to this Apple Store encounter are red -- and it says I do not have permission to view them.  When I click "get info" it says that the "Apple" account has the read/write access to them and the option to unlock them is greyed out.  How can I get these files from the archive and get them onto my main user account where they belong?  The "Apple" account does not have a password so I think I can easily log on as that account, but I don't know where to go from there.
    PS The files in question are iTunes libraries.
    Thanks for your help.

    Ok, I fixed it.  Here's what I did.
    I logged into my computer under the Apple account.  Then I went into Time Machine.  I found my old files under Users-->"my main account".  I was able to restore those files to Users-->Shared.  Then I was able to log back into "my main account" and retrieve the files from the shared folder.  It worked!  Hope this helps someone else some time!

  • How to transfer an iPad to a different user I'd.

    I linked an iPad to my user id that my brother bought for his granddaughter and updated the iOS.  Now that the iOS is updated how do I transfer the ipad to his account?

    How did you "link" the iPad to your ID? If you knew how to do that - wouldn't you know how to "link" back to the other ID?
    Settings>iTunes & App Stores>Apple ID. Tap your ID and sign out, sign back in with his or his grandaughter's ID.

  • How to execute a plsql with another db user but not HTMLDB_PUBLIC_USER?

    I have an operastion which is written in plsql and java source in the database and i can run these with sql*plus. I want to use html db for this operation but when i tried to run the same routine from htmldb i got; ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: ORA-01017: invalid username/password; logon denied.
    From log4plsql logs i see that the routine is tried to an with HTMLDB_PUBLIC_USER but bot with TERMINAL which is the schema ser for the workspace ; [Jun 14, 16:20:22:63][FATAL][HTMLDB_PUBLIC_USER][block.FLOWS_010600.WWV_FLOW.FLOWS_010600.WWV_FLOW.FLOWS_010600.WWV_EXECUTE_IMMEDIATE.SYS.DBMS_SYS_SQL.block][SQLCODE:-29532 SQLERRM:ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: ORA-01017: invalid username/password; logon denied]
    How can I tell htmldb to run this plsql with TERMINAL user?
    Thank you very much :)
    H.Tonguc

    Anonymous - If you can put an example on the hosted site, someone might be able to take a look. As is, there is no useful information here.
    Scott

Maybe you are looking for

  • Purchased a TV show in itunes...can only hear audio, will not display video

    at 1st.... Purchased a TV show in itunes...can only hear audio, will not display video now... shows the show is 48 min but then is only 30 seconds once opened

  • IPhone says iTunes Match is on, but it is not

    I turned off iTunes Match so that I can copy songs to a playlist on my iPhone. But the iPhone still shows iTunes Match is on. Any help is appreciated. Why can't Apple make iTunes easier to use?

  • Trace File -- Urgent

    Hi all, I am working oracle 9i in NT, my control file size is 5mb, i want to take a backup of my controlfile so i typed this command. ALTER DATABASE BACKUP CONTROLFILE TO 'E:\ORACLE|CONTROL.CTL'; its working, but i check the path E:\oracle\control.ct

  • Menubar dataprovider in Flex2 Beta 3

    am using following code:- <mx:MenuBar height="100%" labelField="@label" showRoot="true" iconField="Icon" > <mx:XMLList> <menuitem label="AWB"> <menuitem label="New AWB" Icon="@Embed(source='images/menu/create.jpg')"/> </menuitem> </mx:XMLList> </mx:M

  • Original File Could Not be Found error

    Hi, I'm sure that I'm missing something obvious here, but seem to be stumped. I recently bought a new iMac and migrated my Itunes folder and other stuff to the new iMac from my old ibook and external drive (location of old itunes folder). Everything