JCO properties file Linux..Urgent !!!!
how do i load linux properties..file...
if anyone have download the sapjco connector for linux
inside the folder> demo > Tutorial2Connect & OrderedProperties it gives you how to connect to properties file...
i done in in windows ok...
but when i run in linux..with the following coding...
this is the error message
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:799)
logon:java.io.FileNotFoundException: /home/osbdev/logon.properties (No such file or directory)
mRepository com.sap.mw.jco.JCO$Repository@77387738
createPool
java.io.FileNotFoundException: /home/osbdev/logon.properties (No such file or directory)
if i remark out the gpath for windows..it works for windows...
but it doesnt work for linux..pls advice....
private String connectionPool = "SoccerPool";
private JCO.Repository mRepository = null;
//for linux
public String gpath="/home/osbdev/working/tomcat/webapps/logon.properties";
//public String gpath="C:\tomcat\webapps\\logon.properties"; >>for windows
public JCOConnection(){
JCO.Pool pool = JCO.getClientPoolManager().getPool(connectionPool);
if (pool == null) {
System.out.println("createPool");
OrderedProperties logonProperties;
try {
logonProperties = OrderedProperties.load(gpath); JCO.addClientPool(connectionPool,5,logonProperties);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.err.println("logon:" +e);
}catch(Throwable ex){
ex.printStackTrace();
mRepository = new JCO.Repository("ElectcomsRepository", connectionPool);
System.out.println("mRepository " + mRepository);
//Ordered Properties class
public class OrderedProperties extends java.util.Properties {
ArrayList orderedKeys = new ArrayList();
public OrderedProperties() {
super();
public OrderedProperties(java.util.Properties defaults) {
super(defaults);
public synchronized Iterator getKeysIterator() {
return orderedKeys.iterator();
public static OrderedProperties load(String name)
throws IOException {
OrderedProperties props = null;
//java.io.InputStream is =OrderedProperties.class.getResourceAsStream("/WEB-INF/" +name);
java.io.InputStream is=new FileInputStream(name);
//System.out.println();
if ( is != null ) {
props = new OrderedProperties();
props.load(is);
return props;
} else {
if ( ! name.startsWith("/") ) {
return load("/" + name);
} else {
throw new IOException("Properties could not be loaded.");
public void load(InputStream inputS){
OrderedProperties props=null;
props.load(inputS);
public synchronized Object put(Object key, Object value) {
Object obj = super.put(key, value);
orderedKeys.add(key);
return obj;
public synchronized Object remove(Object key) {
Object obj = super.remove(key);
orderedKeys.remove(key);
return obj;
Message was edited by:
yzme yzme
Message was edited by:
yzme yzme
this is the error message
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:799)
logon:java.io.FileNotFoundException: /home/osbdev/logon.properties (No such file or directory)
mRepository com.sap.mw.jco.JCO$Repository@77387738
createPool
java.io.FileNotFoundException: /home/osbdev/logon.properties (No such file or directory)
this is the error message
Message was edited by:
yzme yzme
Similar Messages
-
How to load a Properties file : Very URGENT
I have properties file ie., SQLProperties.properties
SQLProperties.properties
logdetails = SELECT USERNAME AND PASSWORD FROM USER_TBL
I want to load this file .
I used like this
public static Properties prop = null;
strKey ="logdetails";
FileInputStream fis = new FileInputStream("SQLProperties.properties");
prop.load(fis); // Since load parameter is file input stream
prop.getProperty(strKey);But it is coming error while loadingYou did not initialize prop.
//public static Properties prop = null;
public static Properties prop = new Properties ();
strKey ="logdetails";
FileInputStream fis = new FileInputStream("SQLProperties.properties");
prop.load(fis); // Since load parameter is file input stream
prop.getProperty(strKey);
[/prop] -
Urgent. How may i update a properties file in execution time?
Urgent, please. How may i update a properties file in execution time? I need to update the file by means of a web page and i need the changes be reflected immediately.
ThanksNote the update must be made in memory. But i don�t know how.
-
Where can i find .properties file for jco connection?
For jco connection to SAP, we need .properties file. Is this file already contained in Exchange Profile or somewhere??
If yes, where can i find .properties file for jco connection or what is the path to this file?
OR, do we have to create manually??
Any help is appreciated.
Thanks.
KarmaHi Karma,
Please take a look at these..
Where to set up the JCO connection?
http://help.sap.com/saphelp_nw04/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
http://help.sap.com/saphelp_webas620/helpdata/en/bc/42e13d82fcfb34e10000000a114084/content.htm
cheers,
Prashanth -
Hi there !
I'm running Oracle enterprise edition on NT with oracle http server under apache.
I created a JSP application using jdeveloper
and deployed it to the web server.
Now I'm still getting getting nullPointer exceptions after I have modified the jserv.properties file according to the documentation
Can someone give me a file that is working for her/him under the above described circumstances ?
Many Thanaks in advance
Tony
nulllaredotornado wrote:
Hi,
This might not be a JSF question, but I thought I'd start here as I'm building a JSF application. Upon startup of my Weblogic 9.2.2 server, I see these error messages
log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.StartupServletContextListener).
log4j:WARN Please initialize the log4j system properly.
One complication, my log4j.properties file is actually called "my.properties" (bizarre company reason). Is there somewhere in my faces-config.xml file or an equivalent where I can indicate what log4j properties file I'd like to use?Your company policy is to use non-standard names so that things must be configured manually? Interesting.
In the past people created a servlet those sole purpose was to configure log4j in the initialization sequence and then do nothing. -
How to use .properties files in Webdynpro Java code?
Hi all,
I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
Thans and Best regards
DeyangHi,
1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
2) load property:
final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
final Properties properties = new Properties();
try
properties.load(is);
catch(Exception e)
wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
Regatds Maxim R. -
How to create a properties file for DB connection (BPEL async processes)
Hi,
In BPEL asynchronouns Project, I am trying to create the Database connection. Instead of hardcoding the details, I want to put it in the properties file and then import the connection file in order to create a connection.
I am very new to BPEL and need urgent help. Hoping for a quick reply..
ThanksSo, what would be the practical approach for implemeting this. When I use "Import Connections" option, in help I get this:
"File Name:
Click Browse to locate a file containing the connection descriptor(s) that you want to import. Select the file and click Open. Connection descriptors are saved to XML files. The recommended file extension is .xml. You can import connections from previous versions of JDeveloper by importing connections from IDEConnnections.properties in the earlier installation. You can import connections from other versions of JDeveloper by importing connections from IDEConnnections.xml. "
Please suggest. -
How to read a property file..urgent
Hi ,
This is kinda urgent if you can help! I am a new bee to servlet and java.
My JSP calls a java class file. In the class file i establish my connection to database.
My requirement is to read a property file for the database name, username and password and connet to the database using JDBC(database is oracle).
which class to use. I know something about properties class. Is there any other class which can read my property file.
Or is there any other all together a better way to do it.
thanks in advance
AmitInside your WAR file somewhere under the WEB-INF directory. This space is protected, whereas the ROOT (of course) is not. Unless you would like someone else to read your properties file...
Once you decide where you want it, post the section of code where you load the properties file, we can probably help you figure out where you path is wrong. -
How to use JDBC Appender of log4j using a properties file
Hi,
I am trying to implement the Log4j JDBC Appender to log the messages to Database(oracle).Can anyone provide me with a sample code along with the properties file used.
need urgent help.
Thanks in advanceActually, I konw where my problem in my code is. Use functions
PDDocAcquirePage(), PDPageGetAnnot(),
PDTextAnnotGetContents(),
PDTextAnnotGetContents()
step by step with the logic designed by ourself can finish my task.
But also thanks for your help!
-
Help: Servlet can't read from properties file
I am working on a web application running in Tomcat on Linux.My java source file reads some parameters from a properties file (data.properties)in the same directory. This works well in a simple application. However, if it is used in the Tomcat environment, it can't be read by a servlet file (LoginServlet.java). I put both the "LoginServlet.class" and "data.properties" in the following directory: /webapps/myapp/WEB-INF/classes. When I run the web application in Tomcat, the error is "data.properties not found". What is the problem? Do I need to modify my "web.xml" and/or Tomcat's "server.xml"? If so, how to modify them?
This web application contains a lot of serlets. So I don't want to hardcode the parameters into the servlet codes.
Any info will be appreciated. Thanks in advance!:)Putting the properties file in webapps/myapp may or may not help.
My assumption is that you are trying to open the file by brute force, with something like
InputStream propis = new FileInputStream ("data.properties");
Properties props = new Properties ( );
props.load (propis);
What you want is to have the class loader find a file in the same place as the class file, and give you back an input stream reading from that file, which you can then pass to the Properties.load(InputStream) method. This is called a "resource," and the way to do it is:
InputStream propis = getServletContext().getResourceAsStream("data.properties");
// remaining code as above
This will cause the class loader for the servlet context (a/k/a the Web application) to find the file in the same manner as it might find a class, but instead of treating it as compiled JVM code, and loading it, it simply passes you back an InputStream from which you do whatever you want.
Cheers!
Jerry Oberle
perl -e 'printf "mailto%cg%s%cearthlink%cnet\n", 58, "oberle", 64, 46;' -
SAP-XI, permission of the instance.properties file changes unexpectedly
Hi forum,
I have XI installed in HP-UX,
the permission of the instance.properties file (/usr/sap/<SID>/<instance name>/j2ee/cluster/instance.properties) in my XI system (installed in HP-UX), changes automatically, and hence the server starts giving problem like, JCO error while message-mapping, etc,
can u tell me how the permission changes on the fly,
I mean to say, in proper condition we keep it as rw_rw_rw, but it changes to rw_ ___ ___,
pls help,Hi Sudeep
I just checked on two systems. It looks like the permissions should be:
sidadm > ll j2ee/cluster/instance.properties
-rw-r--r-- 1 sidadm sapsys 3669 Nov 25 12:41 j2ee/cluster/instance.properties
Can you please check if <b>sidadm> umask</b> returns 022?
Regards Michael -
By mistake i deleted the Propertysheet.properties file in VC admin
Hi All,
I have an issue in visual composer, I did the following.. then i got the error when I logged into VC that "Proxy error : Server error : Failed to read models list"
1. Log on to Visual Administrator.
2. In the left panel, make sure the Global Configuration tab is chosen.
3. In the tree, expand the Services node and choose the Configuration Adapter service. In
the main pane, in the Display configuration tab, the Configurations tree is displayed.
4. Expand the development server node to display the client workspaces.
Under client workspaces i have gone to my login name under that by mistake i deleted the Propertysheet.properties file.
Then i refreshed the my model name, then the Propertysheet.properties file came.
Still I am getting the error. Can you help me out... Its very urgent to resolve this.. I will give points for good answers.
Thanks
Suresh.Hi,
does this only happen for your user or for all?
Anja -
Text editor used to type the contents of the properties file
******To all those (expect iainsinclair) who view this message - Sorry for using this forum for my personal contacts **********
Hi iainsinclair
Thanx for explaining ur experience to me for my previous posted topic . U did mentioned a text editor called NETBEANS PROPERTY TEXT EDITOR .
* Can u please explain more about this editor . Is this editor specific to some encodings ....
* U said that as u enter the Japanese characters in ur keyboard the editor saves the characters in the unicode format. Are the characters displayed in their glyphs or as \u????.
* Can u give me a list of languages f or which this text editor can be used . Bcoz u had suggested that it can be used for chinese also .
* I need more info about a Japanese Computer and keyboard. I think we both are in the same level in this topic I18N . Iam working for I18N project in my company. This is my official mail ID- [email protected] .Can u send me ur mail Id so that we make sure that this forum members are not disturbed by our discussion .Hi, I'm happy if I can help.
* Can u please explain more about this editor . Is this editor specific to some encodings ....
It's the netbeans IDE from www.netbeans.org it's a free integrated development environment for java. It includes many editors, for .java files, .properties files and many others. It is designed to accept text in the non-ascii format and convert it for use in properties files.
* U said that as u enter the Japanese characters in ur keyboard the editor saves the characters in the unicode format. Are the characters displayed in their glyphs or as \u????.
They are saved as ascii characters, not glyphs. For example, I entered MSGothic (MSゴシック) in japanese using net beans and it looks like this when I use a normal text editor: MS\u30B4\u30B7\u30C3\u30AF
* Can u give me a list of languages f or which this text editor can be used . Bcoz u had suggested that it can be used for chinese also .
It should work for any language that your windows/linux system has support for (need the right fonts for a start). My system is native japanese, so I have all the required japanese fonts installed. If you want to use (for example) Chinese on an English system, you'll have to get the fonts and probably you will need to modify the jre/lib/font.properties file.
* I need more info about a Japanese Computer and keyboard. I think we both are in the same level in this topic I18N . Iam working for I18N project in my company. This is my official mail ID- [email protected] .Can u send me ur mail Id so that we make sure that this forum members are not disturbed by our discussion .
I don't think it's disturbing anyone. Forums are all about sharing information, and there is a lack of experience of I18N in the broader comminity, I feel. This isn't a busy forum... ;-)
Don't forget to look for the article written by John O'Conner called 'Displaying Text' I don't have the URL handy but it was posted on this forum recently. It's required reading. -
The best way to read properties file
Hi folks,
The best way to read properties file i.e.. using ResourceBundle or FileInputStream . if so how to do it , my properties file is n WEB-INF/classes/myprop.properties.It's urgent.
Thanks & Regards,
Rajeshwar.WEB-INF/classes should be in your classpath. The web container takes care of that.
All you have to do is call ResourceBundle.getBundle("myprop").
It'll append the .properties for you.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String) -
JRE 7 ignores my fontconfig.properties unider Linux
Hello friends.
I use Linux, some time ago i used jre6 and all was fine, now i'm upgrade java to seven version, but now java ignores my fonconfig.properties file. I'm not sure that java read this file, i checked this by "lsof -r" unix util, and i don't see that file was even opened by some process. Please advise how can i manage java to read my fontconfig.properties ?
Thanks.
and sorry for my ENgLisH.This is a new feature in JDK7:
http://download.oracle.com/javase/7/docs/technotes/guides/2d/enhancements70.html
"On various implementations of Linux, there is no assurance of the presence of particular fonts to support particular locales. As of Java SE 7, libfontconfig is used to select fonts to use for the logical fonts for "unrecognized" Linux platforms. See Fontconfig for more information."
I'm trying to find out if there is some systematic way that people can determine how to configure fontconfig to have JDK7 appears as JDK6 did.
David Holmes
SE-Embedded team
Oracle
Maybe you are looking for
-
I have a pc with itunes now i want to synic my iphone and ipad can you?
can i pay someone to fix my iphone and ipad to have the same app on both ?
-
HT201272 Download past purchases
While downloading already purchased music on a MacBookPro7,1 in Yosemite 10.10 with iTunes 12.01.26 many songs got corrupted and could not be downloaded. Supposedly I could go to Store and Check for available downloads, but a pop-up tells me All purc
-
Goods receipt FI doc- wrong plant
Hi gurus We have a situation where a purchase order is created automatically for intercompany stock transfer deliveries. On the PO when we default the plant to be P001. But the plant on FI doc, created by the goods receipt, is different than the on
-
Setting Scratch discs for 3 different projects -- HELP
I have a new mac book pro and I am going to use it for some mobile editing. I have some scratch files from my imac that apparently didnt migrate to the new ext HD that I copied everything to so I am having difficulty finding the media files "media of
-
I cant download software updates. I receive error messages THE UPDATE WAS NOT SUCESSFUL