How to configure Java Properties File location in WLW

How do we tell Workshop 7.0 where to look for Java properties files (loaded by
PropertyResouceBundle in code) ?
Thanks,
Ray

Ray,
The build number indicates that you have not upgraded to Service Pack 2 of
version 7.0. I will strongly recommend you to do so. That will shield you
from the issues which were fixed in the 2 service packs.
Regards,
Anurag
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
>
Raj,
We are using WebLogic Workshop Build 7.0.1.0.0829.0 on Windows 2000.
We shut down the WebLogic Server on Solaris 2.6, log off, log back on,startWebLogic
in production nodebug mode, and re-run jwsCompile on the same source code.The
error does not occur anymore. Everything seems to be fine now.
Thanks,
Ray
"Raj Alagumalai" <[email protected]> wrote:
Hello Ray,
Can you let me know if you are using the GA version of WebLogic Workshop
or
if you have the latest Service Pack.
Thank You,
Raj Alagumalai
WebLogic Workshop Support
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
Anurag:
Thanks for your response!
By moving the property files to WEB-INF/classes from WEB-INF, we arealmost there.
But we have a follow up problem. We use a static initializer to loadthe
log4j
property file like this:
static {
try {
ClassLoader cl= (new Log()).getClass().getClassLoader();
InputStream is = cl.getResourceAsStream(logfile);
Properties props = new Properties();
props.load(is);
PropertyConfigurator.configure(props);
} catch (Exception e) {
e.printStackTrace();
When we run jwsCompile, we keep getting this:
Compiling: com/****/TestWS.jws
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[weblogic.management.Admin
may only be used on the Server ]
at weblogic.management.Admin.getInstance(Admin.java:104)
at
weblogic.security.internal.ServerPrincipalValidatorImpl.getSecret(ServerPrin
cipalValidatorImpl.java:79)
at
weblogic.security.internal.ServerPrincipalValidatorImpl.sign(ServerPrincipal
ValidatorImpl.java:59)
at
weblogic.security.service.PrivilegedActions$SignPrincipalAction.run(Privileg
edActions.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at
weblogic.security.service.SecurityServiceManager.createServerID(SecurityServ
iceManager.java:1826)
at
weblogic.security.service.SecurityServiceManager.getServerID(SecurityService
Manager.java:1839)
at
weblogic.security.service.SecurityServiceManager.sendASToWire(SecurityServic
eManager.java:538)
at
weblogic.security.service.SecurityServiceManager.getCurrentSubjectForWire(Se
curityServiceManager.java:1737)
at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:434)
at
weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:
88)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:255)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:230)
at
weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
Source)
atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at weblogic.knex.bean.EJBGenerator$1.run(EJBGenerator.java:101)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
atweblogic.knex.bean.EJBGenerator.lookupAdminHome(EJBGenerator.java:84)
atweblogic.knex.bean.EJBGenerator.ensureAdminHome(EJBGenerator.java:122)
at weblogic.knex.bean.EJBGenerator$6.run(EJBGenerator.java:660)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
atweblogic.knex.bean.EJBGenerator.generateJar(EJBGenerator.java:482)
at
weblogic.knex.dispatcher.DispJar.generateJar(DispJar.java:401)
atweblogic.knex.dispatcher.DispCache.ensureDispUnit(DispCache.java:695)
atweblogic.knex.compiler.JwsCompile.compileJws(JwsCompile.java:872)
at
weblogic.knex.compiler.JwsCompile.compile(JwsCompile.java:619)
at weblogic.knex.compiler.JwsCompile.main(JwsCompile.java:109)
ejbc successful.
Generating EAR ...
The EAR was generated and we can even deploy it on Solaris. But whatdoes
the
AssertionError mean?
Thanks,
Ray
"Anurag Pareek" <[email protected]> wrote:
Ray,
ResourceBundle looks for the properties file in the current thread's
classpath.
Since a Workshop webservice's project is nothing but a webapp, the
properties files can be kept in the WEB-INF/classes directory, which
is part
of the webapp classpath.
You can also use
Thread.currentThread().getContextClassLoader().getResourceAsStream("MyProp
s
properties"); to get access to the properties file.
Thanks,
Anurag
"Ray Yan" <[email protected]> wrote in message
news:[email protected]...
How do we tell Workshop 7.0 where to look for Java properties files(loaded by
PropertyResouceBundle in code) ?
Thanks,
Ray

Similar Messages

  • How to configure java.security file to run j2ee programs

    Hi,
    I am using Sun one application server to run my j2ee programs.
    plz tell me how to configure java.security file inside my appserver so that i can run my servlet program that is using jsse API to create SSL sockets.
    I am not able to follow whats there in java.security file.Kindly tell how to configure it.
    Waiting for ur replies!
    Thanks,
    Akshatha

    Hi,
    I am using Sun one application server to run my j2ee programs.
    plz tell me how to configure java.security file inside my appserver so that i can run my servlet program that is using jsse API to create SSL sockets.
    I am not able to follow whats there in java.security file.Kindly tell how to configure it.
    Waiting for ur replies!
    Thanks,
    Akshatha

  • How to load Java properties file dynamically using weblogic server

    Hi,
    We are using Java properties file in Java code. Properties in java properties file are frequently modified. If I keep these properties file in project classpath or as part of war, I will have to redeploy application after each change.
    We are using Weblogic Server.
    Can you please suggest me how can this properties file be loaded at weblogic server startup. Then in that case, how to refer property file in Java code?
    What is the best practice for this?
    Thanks,
    Parshant

    Another alternative is, keep the property file in any pre-defined location. Write a class which reads the properties from the file and returns the one which is requested by caller and deploy this class. Whenever you have to change the properties just update the property file on server and next call to fetch the property should return the updated one.
    Downside of this approach is file I/O everytime. To overcome that you can actually "cache" the properties in a hashmap. Basically when any property if requested, first check the hashmap, if not found then only read from property file and also update in hash map. Next time same property will be returned from hash map itself. The hash map will be cleared at every server restart since its in the memory. You will also need to build a method to clear the hashmap when you update the values in the property file on server.
    This solution would be suitable for small size files and when network overhead of calling a DB needs to be avoided.

  • How to configure boe.properties file in ACTool for SAP BO Distributed environment

    Hi ,
    I am trying to configure the ACTool for SAP BO distributed environment (dedicated BOE Server, Tomcat and Explorer) servers. I have installed SMD Agent, Host Agent and ACTool without any issues in the BOE server(CMS), but I am unable to run the ACTool in Tomcat Server(Web Tier)  and Explorer servers.
    1. How can we configure the boe.properties file for Tomcat Server and Explorer ser to run ACTool?
    2. Is it required to install SMD_Agent and Host_Agent  in Tomcat Server and Explorer server (in my case i have already installed).
    3. What all parameters need to be set in boe.properties file so that ACTool will run correctly in Tomcat server and Explorer server correctly.
    Regards
    Pramod

    Hi ,
    I am trying to configure the ACTool for SAP BO distributed environment (dedicated BOE Server, Tomcat and Explorer) servers. I have installed SMD Agent, Host Agent and ACTool without any issues in the BOE server(CMS), but I am unable to run the ACTool in Tomcat Server(Web Tier)  and Explorer servers.
    1. How can we configure the boe.properties file for Tomcat Server and Explorer ser to run ACTool?
    2. Is it required to install SMD_Agent and Host_Agent  in Tomcat Server and Explorer server (in my case i have already installed).
    3. What all parameters need to be set in boe.properties file so that ACTool will run correctly in Tomcat server and Explorer server correctly.
    Regards
    Pramod

  • Need help for how to putting arabic content in java properties file

    Hi all,
    we have to support arabic in Java application.
    For that we are using java propeties file where key and value pair is used.
    In the Microsoft excel sheet arabic content is coming properly from right to left direction.
    When same thing is copied and paste in java properties file contents direction is reversed that is it is coming from left to right as in english.
    Please help how to put the arabic contents in propeties file
    Regards
    Vidya

    So in terms discussion.
    First I would suggest that you get a hex editor and validate exactly what is in the properties file. It appears to me that you are using one or more editors that are adjusting the display for you and thus that makes it hard to determine where the problem is. A hex editor should not adjust the display. Although even then you might want to right a simple java app and have it read bytes and print them just to validate that the hex editor isn't doing something.
    Only after you are exactly sure how the bytes appear in the file then proceed with other steps.
    For the java GUI only test the following.
    1. Properties file has it left to right then the java GUI displays it correctly right to left or not?
    2. Properties file has it right to left then the java GUI displays it correctly right to left or not?
    Myself I would expect that 2 should be the correct way to implement this. However that is dependent upon you correctly invoking the api as well. So if 2 is not working then you might want to look at the api. It might also have something to do with GUI display properties (of which I know even less.)

  • OWB 10gR2 : How to configure ctl and log locations for Sql*Loader mappings?

    Hi all,
    I'm using OWB 10gR2 to load data in tables with Sql*Loader mappings.
    In my project I have a datafile module and an Oracle module.
    When creating an sql*loader mapping in the oracle module, there is two properties for this mappings that I want to modify. The first is Control File Location and the second is Log File Location. Values for those properties are equal to the data file module location. When trying to change those values I can only chose "Use module configuration location".
    Somebody knows how to configure those properties with different locations as the one of the flat file module?
    What I want to do is to store the data file in one directory, and control file and log file in other directories.
    Thank you for your help.
    Bernard

    Hi,
    You're right, my problem is that the dropdown only show the location associated with the flat file location even if I have other file locations created in the design repository.
    The good news is that I have found the solution to solve the problem :
    1) Edit the file module and in tab "Data locations", add the locations you want to use for control file and log file.
    2) Open configuration window of the mapping and then the dropdown for properties Control File Location and Log File Location show new locations
    I have tested my mapping after changing those properties and it's working.
    Bernard

  • How to read the properties file available in Server File structure in webdy

    hi all,
    I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
    Can i have code  how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by  maintain the iP addresses and users in  properties file based on the key i want to read like below.
    servername="abcServer"
    username="john"
    password="test123"
    Please send me the code how to read this properties file from the file structure and how to read this values by key  in webdynpro application
    Regards
    Vijay

    Hi Vijay,
    You can try this piece of code too:
    Properties props = new Properties();
    //try retrieve data from file
    //catch exception in case properties file does not exist
    try {
             props.load(new FileInputStream("c:\property\Test.properties")); //File location
             String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
             if(serverName==null)
               //....do appropriate handling
         }     catch(IOException e)
                   e.printStackTrace();
    Regards,
    Alka.

  • How to configure Java Plug-In to use Firefox keystore

    Does any one know how to configure Java Plugin 1.5.0 to use the Firefox kesystore either in Windows or in Linux environments?
    I installed and configured 'JSS' based on the information available at http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/keystores .html.
    but still the plugin is not using the keys from Firefox keystore.
    I noticed the following messages in Java Console.
    security: Accessing keys and certificate in Mozilla user profile: null
    security: JSS is not configured
    Thanks

    I was having this same issue prior to installing the JSS on my machine.
    I did not compile my own version of the code, but rather I took the jss34.jar file and put it in a 'jss' directory.
    I also copied the jss3.dll and jss3.lib files into the directory where Firefox was installed.
    That was all I had to do to get JSS to work for Firefox 1.0.4 and Mozilla 1.7.8.
    If that still does not work for you, you always have the option to use the Java Plugin keystore instead of using the browser cache to authenticate certificates.
    You can do that by doing the following on the Java Control Panel:
    1. Click the 'Certificates' button on the Security tab
    2. Import the certificate as a 'User' certificate (Make sure you select the appropriate certificate type)
    3. Disable the 'Use certificates and keys in browser keystore' option under the 'Security' section of the 'Advanced' tab.
    I hope that helps.

  • How to configure Java Card 3 in eclipse ?

    How to configure Java Card 3 in eclipse ? I have already configured Java Card2.2.2 by following
    1) http://eclipse-jcde.sourceforge.net/user-guide.htm
    And
    2)http://eclipse-jcde.sourceforge.net/
    the above two links.B ut for Java Card 3 when i am configuring window->preference->Java Card Home I am getting error as "Converter.jar" not found. i checked the lib and i didnt found these jar. I copied 2.2.2 converter.jar , then that jar file not matching. So please tell me how to configure this.
    Thanks in advance
    Anoop Michael

    there are many changes between 2.2.2 and 3.0.1. Folders and files are not same. EclipseJCDE is not going to work with JCDk3.0.1. Some one needs to update that plugin :).
    There is a NetBeans plugin in progress and you can try downloading latest NetBeans 6.7.1
    Some intro about the plugin can be found here http://weblogs.java.net/blog/2009/05/10/sneak-preview-java-card-tools-netbeans-67
    You can try Netbeans 6.8 nightly builds for latest changes, but it may be a while until the plugin is stable.
    -Anki.N

  • How to read from properties file

    Hi,
    I am using JSR 168.
    while creating a new portlet, a folder gets created with the name as "portlet". Under which is resource package and <PortletName>Bundle.java.
    pls tell me how to read from .properties file.
    waiting eagerly for some reply
    Thanks & Regards,
    HP
    Edited by: user9003827 on Apr 13, 2010 3:42 AM

    I think i have mixed it up :)
    I have looked at it again and believe you are using regular JSP portlets.
    Can you tell what you want to achieve by reading .properties file. Are you meaning the preferences of the portlet or what exactly are you trying to do?
    Reading propertie files is easy:
    // Read properties file.
    Properties properties = new Properties();
    try {
        properties.load(new FileInputStream("filename.properties"));
        String myKey = properties.getProperty("yourKey");
    } catch (IOException e) {
    }Edited by: Yannick.O on 13-Apr-2010 05:52

  • How do I convert a file located in my e-mail from PDF to Word.  I can't seem to save it in my word files.

    How do I convert a file located in my e-mail (that is secured) from PDF to Word.  I can't seem to save the PDF file anywhere.

    Hi williamf,
    For starters, please try triple-clicking in the Word document where you want to edit the text (sometimes, that's what it takes to select text in Word). If that doesn't work, I'd be interested in hearing more about the PDF file that you converted and the method that you used to convert it. For example, how was the PDF created (and by what app)? Did you convert via Adobe Reader (what version) or via the ExportPDF website?
    If you can tell us more about the file, we should be able to get to the bottom of things.
    Best,
    Sara

  • Static lookup lists:read data from a Java *.properties file

    Hi
    i need to make static lookup lists i am using read data from a Java *.properties file
    i am using the Class "PropertyFileBasedLookupViewObjectImpl" that wrote by Steve Muench in ToyStore.
    but i need to use the default language for that i update the loadDataFromPropertiesFile()
    method to find the correct properties file
    String temp=Locale.getDefault().getLanguage();
    String propertyFile =
    getViewDef().getFullName().replace('.', '/')+"_"+temp+ ".properties";
    the problem:
    For English(TEST_en.properties) it is good and working
    For Arabic(TEST_ar.properties) read from correct file _ar.properties
    but the dispaly character is wrong
    When Debug
    In the File 1=&#1583;&#1605;&#1588;&#1602;
    In debug 1=/u32423

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • How to play a FLV file located in a second FMS?

    How to play a FLV file located in a second FMS not directly accessible by the flash client?
    - I am publishing an audio stream from the flash client to a FMS;
    - This FMS then publishes the stream to a second FMS, which records the stream to a FLV;
    How can I play in the client the FLV audio file that I recorded in the second FMS?
    - The first FMS is accessible by the flash client, but the second FMS is only accessible by the first FMS.
    thanks in advance
    fabio

    Answer in http://www.flashcomguru.com/forum/forum_posts.asp?TID=4276&PN=1&TPN=1

  • How to configure the .ini file with applet

    hai
    i am using native methods in that methods they use some ip addresses. when i am using that native methods in applet run the applet using appletviewer tool it works fine but when i am open that applet using html page browser not configure that .ini file data .how to configure that .ini file with browser

    Hi Jay SenSharma,
    Thanks for your immediate response.
    I saw your URL links, But in your link give the recursive deployment using wlst. But my question is how to configure the oracle weblogic library files into Admin server & Managed Servers by using the wls.jar file through wlst script to create the new domain.
    But if create the new domain by using GUI mode then we manually give the admin server port number & managed servers port number and name.
    By default the library files are configured with the Admin server in GUI mode. But the Managed server the Library files are not configured with the Managed servers. Then we manually select all the library files to the corresponding managed servers. Then only the applications are deployed into the corresponding managed server.
    Regards,
    S.vinoth Babu

  • How to decode  java class file to java file

    hi
    how to decode java class file into java file
    regards
    kedar

    Its really.......... really BAD.
    Write ur own code... or use open source code..
    Its a bad practice...
    however i am telling u ..there is DJ java decompiler.
    but mind it there are Obfuscator also....like codeshield and others
    take care...
    Alok

Maybe you are looking for