JCo Connection using file.properties doesn't work when deployed

Hello Experts,
I'm trying to connect to a SAP backend system using the JCo connection.
I've tyed with the standard connection, crating dinamically the connection and it works fine:
mConnection = JCO.createClient("001", // SAP client
"sap.user", // userid
"********", // password
"IT", // language
"ashost.domain.dom", // application server host name
"06"); // system number
mConnection.connect();
Then I tryed to store the login data in a file 'login.properties' put in the same package of my connection classes.
The code is:
String[] logonStr = new String[5];
Properties properties = new Properties();
try {
InputStream is = getClass().getResourceAsStream("login.properties");
properties.load(is);
} catch (Exception e) {
e.printStackTrace();
logonStr[0] = PropertyManager.getProperty(applicationProperties,"jco.client.client");
logonStr[1] = PropertyManager.getProperty(applicationProperties,"jco.client.user");
logonStr[2] = PropertyManager.getProperty(applicationProperties,"jco.client.passwd");
logonStr[3] = PropertyManager.getProperty(applicationProperties,"jco.client.ashost");
logonStr[4] = PropertyManager.getProperty(applicationProperties,"jco.client.sysnr");
mConnection = JCO.createClient(logonStr[0],      // SAP client
logonStr[1],    // userid
logonStr[2],    // password
"IT",           // language
logonStr[3],    // application server host name
logonStr[4]);   // system number
If I test locally this code it works fine and the login datas are extracted from the 'login.properties' file.
But when I deploy my PAR file in the Portal seems that the 'login.properties' file isn't found by my application...
Which could be the cause??
Could it be a permission problem??
Any Ideas?
Thanks in Advance,
Best Regards

Hi Shyam,
Thanks for your answer!
I could use the string "ashost.domain.dom" instead to extract it from the 'login.properties' but I need also the others login info as username and password.
My problem is that the 'login.properties' file is not found by my application when the PAR file is deployed in the portal...
I need to know if I need to move the 'login.properties' file in another package or something else...
Any ideas??
Have I to declare the .properties file in some configuration file (for example portalapp.xml or somthing similar..) ??
Best Regards...

Similar Messages

  • Merging a fragment file with a MANIFEST.MF file doesn't work when deploying

    Hi all,
    In the deployment process of a JAR file, if you check the option “Include Manifest.mf (META-INF/MANIFEST.MF)” when trying to merge a file with the MANIFEST.MF file (fragment file), without including a Main class, the operation is not done using JDeveloper 10.1.3.3.
    If you analyze the final MANIFEST.MF file within your JAR file generated, you will notice that the MANIFEST.MF contents don’t include the contents of the fragment file used.
    These are the fragment file contents (one blank space between different paths):
    Class-Path: ../jarlibs/Jdom.jar ../jarlibs/Jxl.jar
    This is the final MANIFEST.MF generated:
    Manifest-Version: 1.0
    Created-By: Oracle JDeveloper 10.1.3.3.0
    I hope you will help me a little!
    Best regards,
    user629401.

    hi user629401
    I tried what you describe using JDeveloper 10.1.3.3 and at first I saw the same behaviour you had.
    I checked the help topic "Deployment Profile Properties - JAR Options Page" that says:
    "+*Additional Manifest Files to Merge into MANIFEST.MF*+
    +You can specify additional manifest files that should be merged into the manifest file that is generated by JDeveloper. ...+"
    I searched this forum, and I found this message:
    Re: Deployment profiles
    "+... the merge function works if the file to merge in to MANIFEST.MF ends with an empty line i.e. there is a CR/LF after the last entry ...+"
    So, I tried that, and it worked for me.
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Completed Project Doesn't work When Deployed FilePermission Error

    Hello all,
    I have been slaving away over an applet for the past several weeks, and I have finally gotten it finished. When I tried to upload it to MY web server, it suddenly stopped working. The applet itself reads files from the directory in which it is run, and apparently even when these files are given a 777 permission, the applet still can't read them. I'm baffled as to what's going on.
    For the HTML code, I am using
    <applet code="tempGraph.class" codebase="http://www.michaeljaylissner.com/archive/java/" height=400 width=750>Java Applet</applet>
    The page hosting the applet is here: www.michaeljaylissner.com/pct-temperatures.
    The code for the applet and the data files themselves are here:www.michaeljaylissner.com/archive/java/.
    Any help would be greatly appreciated. I was so happy to have the coding done, I just assumed that putting the thing in a website would be easy. WRONG!!
    The error the java console is giving me is: Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission iButtonResults-MattChurch-2.csv read)
    I can't imagine how to fix this problem!

    Hmm, are you doing something like this to load the file?
            timingProps = new Properties();
            InputStream pis = this.getClass().getResourceAsStream("/timing.properties");
            if (pis != null) {
                try {
                    timingProps.load(pis);
                catch (IOException x) {
                    CCLogger.getLogger().log(Level.SEVERE, "Unable to load the timing.properties configuration file! " + x.getMessage());
                finally {
                    try {
                        pis.close();
                    catch (IOException x) {/* do nothing */}
                CCLogger.getLogger().log(Level.INFO, "Timing properties have been loaded.");
            } else {
                CCLogger.getLogger().log(Level.SEVERE, "Unable to load the timing.properties configuration file!");
            }I think you are right that you shouldn't have to sign the applet if the file is coming from the same web server the applet is deployed on.

  • Captivate 8: audio file doesn't work when I add it to an object slide

    Hi everyone,
    I have problems with the audio in Captivate 8.  This doesn't work when I press an object slide (button) that has an audio file incorporated. This issue doesn't happen when I add sound to an individual slide.
    I have tried to fix the problem by changing the preferences, but nothing
    Any suggestion is welcomed!!
    Evelyn

    An audio file that is attached to an object or a slide, will play when that object or slide become visible. I don't know what you mean by 'has an audio file incorporated'? Do you mean that it is attached to the button in its audio part of the Properties, which is in the Options tab? In that case the audio will just play when that button gets visible, if it is at the start of a slide, audio will play at the start of that slide.
    If you want an audio clip to play only when a button is clicked, you need to use an action 'Play audio', or make an audio object visible.
    Audio Objects: Control them! - Captivate blog
    Beware: if you do this with a simple action triggered by the button, the playhead will be released if that button has a pausing point.

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

  • TS1398 The internet on my Iphone 4 doesn't work when I use the Wifi

    The internet on my Iphone 4 doesn't work when I use the Wifi at home. My Mac works fine. On the Iphone it shows it's connected but it doesn't open any app. Anyone knows what to do? Thanks

    Ÿ. If you tap and hold the "Y" does it appear? If so, just slide your finger up to select.

  • Imessage doesn't work when i connect to my wifi only works on mobile date how do i fix this?

    Imessage doesn't work when i connect to my wifi only works on mobile date how do i fix this?

    1. Did you use Bootcamp Assistant?
    2. Did you build a USB with Windows 7 ISO and Bootcamp drivers?
    3. You should use a USB2.0 disk, not a USB3.0 disk (flash drive).
    4. What year is the Retina MBP?

  • My speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    my speaker doesn't work when I try to listen to music or open up a quick time file, however they seem to work perfectly when I listen to a voice memo (p.s. the volume slider disappears in a song page and even in the multi tasking bar)

    Thanks for your solution, it wasn't quite what solved the problem but i remembered that i had a bit of salt water on my phone recently and spraying the charging port with an anti-oxide spray solved my problem, do you mind if i ask, how is the charging port related with the volume or/and speakers?

  • When i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    when i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    using microsoft word.
    the hyperlink doesn't work in the pdf file (adobe reader).
    adobe reader xi.
    my operating system windows 8.1.
    the attached screen is appeared.

  • Internet connection okay, but safari doesn't work !

    Dear All,
    Internet connection okay, but safari doesn't work ! Version 6.0.2
    Appriciate your support

    hi there Michael
    sorry for the delay was on leave
    when i say download the software from the Apple's website i mean download the software update for mac os x 10.3.9
    as once you reinstall panther again it will revise back to the original version of the OS which came along with the computer when you purchased which will cause safari to be incompatible with
    so once you do a software update for you operating system it will get it compatible with safari
    so to get the update you can download it from the computer you have it burn the update on a CD or DVD and then install it on this computer
    you can get the download from
    http://www.apple.com/support/downloads/macosxcombinedupdate1039.html
    just click on the link above to get to the page then click on the number 117mb on the upper right hand corner
    once you have downloaded it burn it to a disc and install it on your computer
    hey sorry if i did not make myself clear earlier

  • I downloaded a ringtone to my phone and it works when I play it but it doesn't work when I assigned it to a contact. Help. I'm using ios 7.

    I downloaded a ringtone to my phone and it works when I play it but it doesn't work when I assigned it to a contact. Help. I'm using ios 7.

    The following guide gives information on how to sync ringtones from your computer to the phone. The reference section at the bottom of the quide also gives instructions on how to convert a song to a ringtone. https://discussions.apple.com/docs/DOC-3792

  • I have different account ID's with my iphone and computer. I would like to standardise both to just the one. One of the ID's doesn't work, when I tried to list the second email with the preferred one a message telling me that this email is already in

    I have different account ID's with my iphone and computer.
    I would like to standardize both to just the one.
    One of the ID's doesn't work, when I tried to list this second email with the preferred one a message telling me that this email is already in use pops up.. yes it is, with me??
    Is there an easy to fix this please, Fabfitz

    If the email address you want to use is being used as the primary email address on a different ID you have to manage that ID and change it to a different primary email address.  This explains how: Change your Apple ID - Apple Support.
    If it is being used as an alternate or rescue address on a different ID, you manage the ID and either remove it or change it to a different email address.  This explains how: Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support.

  • I have Adobe Acrobat 9.5.4 installed on my computer and it doesn't work when PDFing

    I have Adobe Acrobat 9.5.4 installed on my computer and it doesn't work when PDFing my document using Microft Word 2010. I have tried using the tab add-in, but it doesn't respond either. The only way to convert my document is to save it as a .pdf from the save as drop down box. I need to be able to have the full functionability of creating a PDF document with the tabs and links working.
    Please help!

    From OFFICE 2010 you either have to have AA X or just print to the Adobe PDF printer. You give no information on your operating system or specifically what you mean by PDFing -- there are multiple ways to create a PDF from a WORD document and you have given no information. However, in this case your only choice is to print to the Adobe PDF printer. Otherwise, you need to upgrade Acrobat.

  • [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

    When selecting a menu item I used to click the left mouse button and hold it down, move the pointer to the desired menu item and release the mouse button. Everything works fine in the mine menu, but there's a problem when adding new adjustment layer from the layer panel: when I release the button nothing happens, I have to press the button again. In previous PS version it worked fine. How can I fix this?

    I don't think that is user fixable, meaning you'll have to wait till adobe fixes it with an update.
    Photoshop cc 2014
    windows does not work
    mac does work
    Did you already post over here:
    [Photoshop CC 2014] Click&hold-move-release doesn't work when adding adjustment layer from the layer panel

  • Collapse action doesn't work when several hierarchical columns in a report

    Hello everyone!
    I have an analysis which contains 6 hierarchical columns. And the problem is that for the 5th and 6th columns collapse doesn't work. I can easily expand the column, but I can't collapse it back. The first four columns are collapsing fine. Is there a bug which describes this?
    I'm using OBIEE 11.1.1.6.7. Tried to check this issue in Mozilla and IE - collapse didn't work in neither of them.

    It doesn't work here either. After checking the italicized bit below, I see that it doesn't work when called by an application either. It looks like a bug.
    Here's the fix I found here. Put it in the automator action "run Applescript"
    http://bbs.applescript.net/viewtopic.php?id=15292
    on run {input, parameters}
    --Pop Box
    display dialog "Automator hosed me with a bug, so I'm making you wait for 5 secs with delicious Applescript." giving up after 5
    return input
    end run
    The non-working solution :P
    One suggestion - split the workflow into two (or more) parts.
    1. Open Finder Items with Default Application
    2. Ask for Confirmation
    3. Run Workflow
    4. Wait for User Action
    5. Open Finder Items with Specific Application
    Save the first as an app, the second as a workflow.
    BG3, G4QS, G4ALPB   Mac OS X (10.4.3)  

Maybe you are looking for