JNDI environment variables
Is there a way to store variables in a xml application config file and reference those variables in the java program? I can do this with Tomcat, but I have not found a way to do this with 9iAS. Mainly, I found not found which xml file to use.
Thanks.
No there is no such thing in weblogic. You cannot use JNDI as a cache but
you can write your code to register/bind your rmi objects into the jndi
tree. And save your environment variables there.
Try using WebLogic Workshop for your development, you will be able to do all
this without having to write your own code as you can define application
wide properties there.
"Jacques Desmazieres" <[email protected]> wrote in message
news:[email protected]..
>
I think I have a very common problem, that seems to fit with JNDI service:
I need to define applicative variables shared by several applications, andthose
variables need to be defined at deployment time.
On Websphere, it is possible to define, from the App Server console, suchJNDI
entries : sort of Environment variables you access through a JNDI lookupto retrieve
the value.
With Weblogic I did not fine anything similar. Did I miss something ?
I have a constraint: the JNDI configuration must be persistent (stillavailable
after server restart) and must be defined during deployment and ifpossible, manageable
from the server console.
Thanks
Similar Messages
-
Service Locator and JNDI Environment variables
Hi,
I have a class that implements the ServiceLocator pattern running into the container tier (not in a webapp), this class has a method that returns a Connection (java.sql). The problem is that I must hard code the JNDI name of the DataSource (or write it on a properties file), but I want to look for this name like a JNDI environment variable (java:comp/env/jdbc/dataSourceRefName). The class who calls the ServiceLocator is a DAO object, not an EJB. Is there any deployment descriptor tag or similar that let�s me register this name in the JNDI tree?
Thanks.Hi Corujo-h,
You'll need to declare the resource-ref in the environment
section of the standard deployment descriptor of any component
from which you'll invoke this ServiceLocator. So, if it's invoked
from ejbs, you'll need to define the resource-ref for each ejb
in ejb-jar.xml.
--ken -
Oracle OC4J 904 and JNDI environment variable lookup up
Hi all, we are getting this when trying to run our app in Oracle 904:
org.springframework.beans.factory.access.BootstrapException: Define an environment variable [java:comp/env/ejb/BeanFactoryPath] containing the class path locations of XML bean definition files; nested exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:71)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:64)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:117)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63)
at MethodInvokerHome_StatelessSessionHomeWrapper1.callCreate(MethodInvokerHome_StatelessSessionHomeWrapper1.java:115)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:275)
at MethodInvokerRemote_StatelessSessionBeanWrapper0.invoke(MethodInvokerRemote_StatelessSessionBeanWrapper0.java:77)
at java.lang.reflect.Method.invoke(Native Method)
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor
Basically the app server thinks there is no environment entry but I have it declared in ejb-jar.xml descriptor:
<env-entry>
<env-entry-name>ejb/BeanFactoryPath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>applicationContext.prod.xml</env-entry-value>
</env-entry>
Any ideas,
JThat depends of the shell that you use.
If you use the bash than execute:
EXPORT ORACLE_SID=<YOUR_SID>
If you use csh:
setenv ORACLE_SID <YOUR_SID>
Bye, Aron -
Try to get JDNI tree (NoClassDefFoundError: weblogic/jndi/Environment)
hiya,
I try to get access to the jdni tree of a weblogic server (8.1). But I always get the exception:
java.lang.NoClassDefFoundError: weblogic/jndi/Environment
javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: weblogic/jndi/Environment
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
I added the weblogic.jar and the wlclient.jar. Is something still missing?
Here's a part of the Code, where the exception occurres:
private static InitialContext getContext(){
bq. InitialContext ctx = null; \\ Environment environment = new Environment(); /*ERROR*/ \\ environment.setInitialContextFactory(Environment.DEFAULT_INITIAL_CONTEXT_FACTORY); \\ environment.setProviderUrl(url); \\ environment.setSecurityPrincipal(username); \\ environment.setSecurityCredentials(password); \\ try { ctx = (InitialContext) environment.getInitialContext(); \\ } catch (NamingException e) { System.out.println(e.getMessage()); } \\ return ctx;
Hope that somebody can help me...
thanks,
traysahm... I'm not authorised to change something in the script.
is there no other way... ?
Here's the code from the edocs of weblogic 8.1. The Code is trying to retrieve the MBeanHome from an external Client:
public void action() {
MBeanHome home = null;
//domain variables
String url = "t3://xxx";
String username = "xxx";
String password = "xxx";
//Setting an initial context.
try {
Environment env = new Environment();
env.setProviderUrl(url);
env.setSecurityPrincipal(username);
env.setSecurityCredentials(password);
Context ctx = env.getInitialContext();
//Retrieving the Administration MBeanHome interface
home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
result = "Got the Admin MBeanHome: " + home + " from the Admin server";
} catch (Exception e) {
System.out.println("Exception caught: " + e);
here's a short summary of problems I have:
1. Environment
Trying to get the initial context from the environment:
Environment env = new Environment();
env.setProviderUrl(url);
env.setSecurityPrincipal(username);
env.setSecurityCredentials(password);
Context ctx = env.getInitialContext();
exception:
java.lang.NoClassDefFoundError: weblogic/jndi/Environment
2. MBeanHome
instead of Environment, I'm using a Hashstable.
home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
The attempt to get the MBeanHome throws following exception:
java.lang.NoClassDefFoundError: weblogic/management/MBeanHome
I just don't understand why it doesn't work. Have I missed some settings?
I'm using JDK 1.5, Developing in Eclipse, added the libs weblogic.jar, wlclient.jar and rt.jar,...
thx
traysa -
Environment variable and spring
Hi all, we are getting this when trying to run our app in Oracle 904:
org.springframework.beans.factory.access.BootstrapException: Define an environment variable [java:comp/env/ejb/BeanFactoryPath] containing the class path locations of XML bean definition files; nested exception is javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/BeanFactoryPath
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:123)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:71)
at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:64)
at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:117)
at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63)
at MethodInvokerHome_StatelessSessionHomeWrapper1.callCreate(MethodInvokerHome_StatelessSessionHomeWrapper1.java:115)
at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:275)
at MethodInvokerRemote_StatelessSessionBeanWrapper0.invoke(MethodInvokerRemote_StatelessSessionBeanWrapper0.java:77)
at java.lang.reflect.Method.invoke(Native Method)
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor
Basically the app server thinks there is no environment entry but I have it declared in ejb-jar.xml descriptor:
<env-entry>
<env-entry-name>ejb/BeanFactoryPath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>applicationContext.prod.xml</env-entry-value>
</env-entry>
Any ideas,
Ju need display in order to have a graphical env with font, raster and all this information is taken from the ip address to which u have set the DISPLAY
Also make sure xwindows is running. U can check whether DISPLAY has been configured properly by running xclock
Best Regards
Rajesh Alex -
Accessing Tomcat Global Environment Variables
Hello,
I have tried to access Tomcat 5.0 (xx) Global Environment variables.
I have the Integer simpleValue defined in the Tomcat Administrators panel under "Environment Entries"
Here's my code:
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:comp/env");
Integer i = (Integer)e.get("simpleValue");
I have also tried and infiinite variation of this with no success (Accessing the Initialcontext directly)
The Tomcat docs at: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
says:
"<Environment> - Configure names and values for scalar environment entries that will be exposed to the web application through the JNDI InitialContext (equivalent to the inclusion of an <env-entry> element in the web application deployment "
PLEASE HELP !!!
Geir OveThis is a Tomcat bug. See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14228.
-
X11 environment variables on MacBook Pro
Hi
I have just got my new MacBook Pro and have installed Gimp to run using x11 that came on the apple installation disks however I can't seem to get the xterm to configure correctly.
GIMP is installed under /sw/bin but the default PATH for x11 does not include this location so I added PATH=$PATH:/sw/bin:/sw/sbin to a newly created .bash_profile. But x11 did not seem to use this file although terminal worked OK.
After doing a bit of research, I then created a .bashrc file with the PATH defined and changed the .bash_profile to source .bashrc with no other entries.
Again this worked OK for Terminal but now when I type 'echo $Path' in an x11 xterm the PATH displays two entries for /sw/bin & /sw/sbin. i.e.
$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/sw/bin:/sw/sbin:/sw/bin:/sw/sbin
Any ideas why? and how can I correct it?
Macbook Pro 17 Mac OS X (10.4.9)Sorry this was a bit brief; I think I was still asleep when I typed it.
The reasons are these:
1. Many fink programs require environment variables and other settings. When you source that init.sh file, it ensures everything is set up to work out of the box. (Among the things it does is to in turn source every relevant file in /sw/etc/profile.d -- take a look in it to see what, if anything, is in there). There is also some code to keep your path trimmed properly, so you don't get repeats pasted on.
2. Bash is unique in that either .bashrc or .bash_profile, but not both, get sourced. In a rooted X11 environment, everything works properly, but on OS X, where X11 is "rootless," it leads to unexpected behavior like what you saw. As long as you put everything into one file and then tell the other one to source its contents, you should be ok.
You can also run X11 stuff from Apple's terminal, provided you somewhere in a startup file have something to set the DISPLAY variable, usually to .0.
I've put more discussion of these things here -
Error in setting environment variable
hi
Please note JKit is where my jdk1.3 is stored(i.e instead of jdk1.3 folder its JKit folder)... i have gone thru the similar threads but with no success.
SET
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;D:\Jkit\bin;D:\Jkit\lib;D:\Oracle\bin;"C:\PROGRAMFILES\ORACLE\JRE\1.1.7\BIN";D:\JKit\Jre\Bin;
SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
SET CLASSPATH=c:\JavaWebServer2.0\lib\servlet.jar;c:\JKit\lib;
SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29;
SET JAVA_HOME=D:\Jkit;
The error i get after running autoexec.bat and then tomcat/bin/startup is as follows..
The CATALINA_HOME environment variable is not defined
This environment variable is needed to run this program
please HELP!!.THANKSHi
Very many thanks for ur solution.. i actually hadset the environment variables spacce..but when i execute the autoexec.bat file i dont get any error(out of env space)..but when i run the startup.bat file i get from the command prompt, i get the foll error.
This is my Autoexec.bat
SET JAVA_HOME=D:\Jkit\bin
SET CATALINA_HOME=D:\tomcat\jakarta-tomcat-4.1.29\bin
SET PATH=D:\Jkit\bin;C:\WINDOWS;C:\WINDOWS\COMMAND;
SET PATH=%PATH%;C:\PROGRA~1\COMMON~1\AUTODE~1;
THE FOLLOWING IS THE ERROR I GET WHEN I RUN STARTUP.BAT UNDER TOMCAT'S BIN UNDER THE COMMAND PROMPT
D:\tomcat\jakarta-tomcat-4.1.29\bin>startup
Syntax error
Out of environment space
Out of environment space
Out of environment space
Using CATALINA_BASE: D:\tomcat\jakarta-tomcat-4.1.29
Using CATALINA_HOME: D:\tomcat\jakarta-tomcat-4.1.29
Using CATALINA_TMPDIR: D:\tomcat\jakarta-tomcat-4.1.29\temp
Using JAVA_HOME: D:\Jkit
Out of environment space
Out of environment space
Invalid switch - -DJAVA.ENDORSED.DIRS=D:\TOMCAT\JAKARTA-TOMCAT-4.1.29\COMMON\ENDORSED
I even set JAVA_HOME AND CATALINE_HOME to the \bin dir respectively..
still i get the same error
As given under the tomcat installation documentation (RUNNING.txt), i set the space for environment space under the Memory tab, for startup and shutdown.bat files, it creates a shortcut for running the resp .bat files, running startup.bat file i get,CATALINA_HOME VAR HAS NOT BEEN SET PROPERLY, THIS OCCURS FOR BOTH TOP LEVEL DIR SETTING AND /bin DIR SETTING of CATALINE_HOME IN autoexec.bat
PLEASE HEL, I HAVE BEEN TRYING TO CONFIGURE IT FOR THE PAST DAYS BUT WITH NO SUCCESS, DONT KNOW WHERE I AM GOING WRONG..PLEASE HELP -
BKI0008E: The environment variable BI_CALLER is not set correctely. The cur
Hi All,
I have configured backint for backup of maxdb for content server 640. I configured it as per the documents available, created the configuration fiale and the parameter file. Created the backup medium in dbmgui.
Now when i try to run the backup using the pipe am getting the above mentioned error.
Please find below the dbm.ebp log for the same...
more dbm.ebp
2009-10-22 02:06:08
Setting environment variable 'TEMP' for the directory for temporary files and pi
pes to default ''.
Setting environment variable 'TMP' for the directory for temporary files and pip
es to default ''.
Using connection to Backint for MaxDB Interface.
2009-10-22 02:06:08
Checking existence and configuration of Backint for MaxDB.
Using configuration variable 'BSI_ENV' = '/sapdb/CFC/lcbackup/apoatlas.env'
as path of the configuration file of Backint for MaxDB.
Setting environment variable 'BSI_ENV' for the path of the configuration fil
e of Backint for MaxDB to configuration value '/sapdb/CFC/lcbackup/apoatlas.env'
Reading the Backint for MaxDB configuration file '/sapdb/CFC/lcbackup/apoatl
as.env'.
Found keyword 'BACKINT' with value '/sapdb/CFC/db/bin/backint'.
Found keyword 'INPUT' with value '/tmp/backint4sapdbCFC.in'.
Found keyword 'OUTPUT' with value '/tmp/backint4sapdbCFC.out'.
Found keyword 'ERROROUTPUT' with value '/tmp/backint4sapdbCFC.err'.
Found keyword 'PARAMETERFILE' with value '/sapdb/CFC/lcbackup/param.cfg'
Found keyword 'TIMEOUT_SUCCESS' with value '1800'.
Found keyword 'TIMEOUT_FAILURE' with value '1800'.
Finished reading of the Backint for MaxDB configuration file.
Using '/sapdb/CFC/db/bin/backint' as Backint for MaxDB program.
Using '/tmp/backint4sapdbCFC.in' as input file for Backint for MaxDB.
Using '/tmp/backint4sapdbCFC.out' as output file for Backint for MaxDB.
Using '/tmp/backint4sapdbCFC.err' as error output file for Backint for MaxDB
Using '/sapdb/CFC/lcbackup/param.cfg' as parameter file for Backint for MaxD
B.
Using '1800' seconds as timeout for Backint for MaxDB in the case of success
Using '1800' seconds as timeout for Backint for MaxDB in the case of failure
Using '/sapdb/data/wrk/CFC/dbm.knl' as backup history of a database to migra
te.
Using '/sapdb/data/wrk/CFC/dbm.ebf' as external backup history of a database
to migrate.
Checking availability of backups using backint's inquire function.
Check passed successful.
2009-10-22 02:06:08
Checking medium.
Check passed successfully.
2009-10-22 02:06:08
Preparing backup.
Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
Setting environment variable 'BI_REQUEST' to value 'NEW'.
Setting environment variable 'BI_BACKUP' to value 'FULL'.
Constructed Backint for MaxDB call '/sapdb/CFC/db/bin/backint -u CFC -f back
up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c'.
Created temporary file '/tmp/backint4sapdbCFC.out' as output for Backint for
MaxDB.
Created temporary file '/tmp/backint4sapdbCFC.err' as error output for Backi
nt for MaxDB.
Writing '/sapdb/CFC/lcbackup/pipe1 #PIPE' to the input file.
Writing '/sapdb/CFC/lcbackup/pipe2 #PIPE' to the input file.
Prepare passed successfully.
2009-10-22 02:06:08
Creating pipes for data transfer.
Creating pipe '/sapdb/CFC/lcbackup/pipe1' ... Done.
Creating pipe '/sapdb/CFC/lcbackup/pipe2' ... Done.
All data transfer pipes have been created.
2009-10-22 02:06:08
Starting database action for the backup.
Requesting 'SAVE DATA QUICK TO '/sapdb/CFC/lcbackup/pipe1' PIPE,'/sapdb/CFC/
lcbackup/pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKINT_ONLINE1'' from
db-kernel.
The database is working on the request.
2009-10-22 02:06:09
Waiting until database has prepared the backup.
Asking for state of database.
2009-10-22 02:06:09 Database is still preparing the backup.
Waiting 1 second ... Done.
Asking for state of database.
2009-10-22 02:06:10 Database is still preparing the backup.
Waiting 2 seconds ... Done.
Asking for state of database.
2009-10-22 02:06:12 Database has finished preparation of the backup.
The database has prepared the backup successfully.
2009-10-22 02:06:12
Starting Backint for MaxDB.
Starting Backint for MaxDB process '/sapdb/CFC/db/bin/backint -u CFC -f back
up -t file -p /sapdb/CFC/lcbackup/param.cfg -i /tmp/backint4sapdbCFC.in -c >>/tm
p/backint4sapdbCFC.out 2>>/tmp/backint4sapdbCFC.err'.
Process was started successfully.
Backint for MaxDB has been started successfully.
2009-10-22 02:06:12
Waiting for end of the backup operation.
2009-10-22 02:06:12 The backup tool is running.
2009-10-22 02:06:12 The database is working on the request.
2009-10-22 02:06:14 The backup tool process has finished work with return co
de 2.
2009-10-22 02:06:17 The database is working on the request.
2009-10-22 02:06:27 The database is working on the request.
2009-10-22 02:06:42 The database is working on the request.
2009-10-22 02:07:02 The database is working on the request.
2009-10-22 02:07:15 Canceling Utility-task after a timeout of 60 seconds ela
psed ... OK.
2009-10-22 02:07:17 The database has finished work on the request.
Receiving a reply from the database kernel.
Got the following reply from db-kernel:
SQL-Code :-903
The backup operation has ended.
2009-10-22 02:07:17
Filling reply buffer.
Have encountered error -24920:
The backup tool failed with 2 as sum of exit codes. The database request
was canceled and ended with error -903.
Constructed the following reply:
ERR
-24920,ERR_BACKUPOP: backup operation was unsuccessful
The backup tool failed with 2 as sum of exit codes. The database request
was canceled and ended with error -903.
Reply buffer filled.
2009-10-22 02:07:17
Cleaning up.
Removing data transfer pipes.
Removing data transfer pipe /sapdb/CFC/lcbackup/pipe2 ... Done.
Removing data transfer pipe /sapdb/CFC/lcbackup/pipe1 ... Done.
Removed data transfer pipes successfully.
Copying output of Backint for MaxDB to this file.
Begin of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)-
Data Protection for mySAP(R)
Interface between BR*Tools and Tivoli Storage Manager
- Version 5, Release 4, Modification 0.0 for Linux x86_64
Build: 303 compiled on Nov 16 2006
(c) Copyright IBM Corporation, 1996, 2006, All Rights Reserved.
BKI0008E: The environment variable BI_CALLER is not set correctely. The
current value is "DBMSRV"
usage:
backint -p <par_file> [-u <user_id>] [-f <function>]
[-t <type>] [-i <in_file>] [-o <out_file>] [-c]
where:
<user_id> backint utility user
<function> backup | restore | inquire | password | delete
<type> file | file_online
<par_file> parameter file for backup utility
<in_file> name of a text file that defines the objects
default: STDIN
<out_file> Pool for processing messages and the results
of the executed function.
default: STOUT
BKI0020I: End of program at: Thu 22 Oct 2009 02:06:14 AM EDT .
BKI0021I: Elapsed time: 01 sec .
BKI0024I: Return code is: 2.
End of output of Backint for MaxDB (/tmp/backint4sapdbCFC.out)---
Removed Backint for MaxDB's temporary output file '/tmp/backint4sapdbCFC.out
Copying error output of Backint for MaxDB to this file.
Begin of error output of Backint for MaxDB (/tmp/backint4sapdbCFC
.err)----
End of error output of Backint for MaxDB (/tmp/backint4sapdbCFC.e
rr)----
Removed Backint for MaxDB's temporary error output file '/tmp/backint4sapdbC
FC.err'.
Removed the Backint for MaxDB input file '/tmp/backint4sapdbCFC.in'.
Have finished clean up successfully.Also, is there any specification about the user permissions and about how the backup should be run?
-
I am using Flash Builder 4.7 to build an Actionscript AIR project. The project embeds a number of png files from my local directory and I have been using absolute paths which all works fine.
I have a laptop with which I want to start developing the same project - I set up a git repository that both the laptop and main pc can pull from and so I can get the source where I need it and push it back to the central repository.
My problem is that the absolute paths for the embed commands don't work on the laptop as it has a different filesystem setup (Windows 8 with one drive as opposed to Windows 7 with a SSD and a data drive). I thought the solution would be as easy as using an environment variable to specify the path which could then point to a different physical directory on both machines, i.e:
[Embed(source = "DEVELOPER_RESOURCES/graphics/are/here.png"]
I did a bit of research and there was quite a lot mentioned about setting up resource directories using path variables which I worked through but I just can't get it to compile. The Actionscript compiler just won't find the png files however I specify the path. I tried something with a FLEX project and the compiler didn't complain but I think this is because the compiler for FLEX uses a different convention.
[Embed(source ="/Project Name/DEVELOPER_RESOURCES/graphics/are/here.png"] works with FLEX but not Actionscript.
So does anyone have a recipe for using the Embed command referencing assets using an environment variable that works across multiple machines with different file structures?I managed to find a solution on Windows which was to use symlinks and absolute paths. You an basically point one directory to another so I did something like:
mklink c:\developer_resources c:/the/local/path/to/my/resources
and then reference all resources as c:\developer_resources\...
Now as long as a developer machine has the right link (from c:\developer_resources to the place where the resources are kept) then it seems to work.
This doesn't however work for Mac and certainly isn't a solution for passing files between Mac and windows -
Open module for managing property file and environment variables
Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
Any ideas are greatly welcomed.You seem wright, you hit a brick wall here with Air to find the location
of the command console on windows...
So in fact I never build an exe tool, but this little problem was a nice
case to test it and I tried it.:
I downloaded monodevelop
-GTK# for .NET 2.12.10*
-MonoDevelop 2.4.2*
from http://monodevelop.com/Download
created a console project and had an exe in 5 minutes !
You can download the findconsole tool and the projectfiles here:
http://greencollective.nl/temp/dump/findconsole_monoproject.zip
findconsole.exe will reveal the path/location of cmd.exe on a windows system.
Cheers,
Latcho -
Environment variable setting not working in the report
Hi everybody,
Iam facing a problem related to reports10g ids. database is 9i
My basic requirement is ,i want to show a report out put in a BRAZILIAN PORTUGUESE Language.
For this purpose i configured the report_server.conf file like
<environment id="PS">
<envVariable name="NLS_LANG" value="BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252"/>
</environment>
After that i added a entry along with the web.show_documents(using for calling the report)envid=PS
when iam running the report ,report server is only converting one date field in to portuguese ,rest of them are same as in the database.
Actualy i dont know where i did wrong.if anybody know please help meee
Thanks in advance
mathewHello Matthew,
See Note:231051.1, Dynamic Environment Switching In Reports 9i for an example of setting your environment variables at runtime. It uses REPORTS_PATH, there is also an entry for NLS_LANG in the reports.sh file (in UNIX). This setting is causing the conflict when you try to set it at runtime.
I think you have to remove the entry from reports.sh config file and then you will have to pass the parm at runtime everytime.
I hope this helps!
Tony -
Environment variables from ~/.MacOSX/environment.plist not read?
Hello,
I repost this from "Mac OS X 10.5 Leopard > Account and Login" since it was advised to me overthere. Sorry if your already read this one before.
I have a problem defining environment variables that should be visible to all my user processes, not only Terminal. According to the Apple documentation, I need to create a file ~/.MacOSX/environment.plist and define my variables in there.
Below you can see the exact paths and file name, together with the contents of the plist file:
<pre>
/Users/ringods/.MacOSX
AtrisoBook:.MacOSX ringods$ ls -l
total 8
-rw-r--r--@ 1 ringods staff 313 Sep 29 15:35 environment.plist
AtrisoBook:.MacOSX ringods$ cat environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANT_HOME</key>
<string>/opt/local/share/java/apache-ant</string>
</dict>
</plist>
</pre>
I then tried a logout/login sequence, but no ANT_HOME environment variable was defined. Even after completely rebooting, the environment variable was still not defined. I checked in a Terminal window using any of the following 3 commands:
<pre>
env
export
set
</pre>
This is on a MacBook Pro running 10.5.5. Am I missing something here? Does anyone know how to resolve this?
RingoI'm currently experiencing the same issue.
I find however, if I take out the underscore from the name it works. At least the times I've tried.
There is a post about using launchd.conf for configuring environment variables, but I couldn't get that to work either. -
How do you set NLS_LANG environment variable in report builder
How do you set up the reports builder environment to display foreign fonts.
So far what I read makes me think that in report builder I have to set the NLS_LANG environment variable .
If anyone has done this is that true and if so how.
Also the languages I want to use are the following.
Armenian
Cambodian
Chinese
Russian
Tagalog
Vietnamese
How do I find the NLS_LANG environment variables for these.
Where I am at now+
I have to set the DEVELOPER NLS LANG. I see the NLS LANG in the registry and I guess I have to add the DEVELOPER NLS LANG.
Now I am searching for syntax. If anyone knows the syntax for those languages please let me know and how do I set more than 1 at a time.
Howard
Edited by: csphard on Apr 14, 2010 5:17 PM
Edited by: csphard on Apr 14, 2010 5:22 PM
Edited by: csphard on Apr 15, 2010 9:02 AMHello Howard,
Check out the following link here you can find your desired NLS parameters.
http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
And about the NLS_LANG for developer why you want to create for developer. Its is already there in REGISTRY. Just seaching in developer registry you can find there.
how do I set more than 1 at a time.
You can set only one NLS_LANG parameter at a time.
-Ammad
Edited by: Ammad Ahmed on Apr 15, 2010 8:52 PM -
How can I use environment variables in a controller?
Hi all,
How can I use environment variables in a controller?
I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPLTMP.
Is there a method somewhere that would resolve this??
By the way,Did anyone used the class of "oracle.apps.fnd.cp.request.RemoteFile"?
The following is the code.
My EBS server is installed with 2 nodes(one for current,and other is for application and DB).I want to copy the current server's file to the application server's $APPLTMP directory. But the result of "mCtx.getEnvStore().getEnv("APPLTMP")" is current server's $APPLTMP directory.
Can anyone help me on this?
private String getURL()
throws IOException
File locC = null;
File remC = new File(mPath);
String lurl = null;
CpUtil lUtil = new CpUtil();
String exten;
Connection lConn = mCtx.getJDBCConnection();
ErrorStack lES = mCtx.getErrorStack();
LogFile lLF = mCtx.getLogFile();
String gwyuid = mCtx.getEnvStore().getEnv("GWYUID");
String tmpDir = mCtx.getEnvStore().getEnv("APPLTMP");
String twoTask = mCtx.getEnvStore().getEnv("TWO_TASK");
// create temp file
mLPath = lUtil.createTempFile("OF", exten, tmpDir);
lUtil.logTempFile(mLPath, mLNode, mCtx);
Thanks,
binghaoHowever within OAF on the application it doesn't.
what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
No, it is read from the adovars.env file only.Thanks
Tapash
Maybe you are looking for
-
How to schedule one instance at a time consecutively
Hi Everyone, We are at BOXIR3.1 SP5 installed in RHEL and business is looking for below mentioned scheduling option for specific webi reports which are complex and having high volume of data. Lets say the scenario is if the users schedules the specif
-
Change After Effects Default Settings?
Hello Smarties! My output settings from the render que are generally very similar...and completely different from the default settings. Is there a way to CHANGE the default setting permanently? More detail is avaialble if you need it.
-
How can I reset a forgotten password online if I can nor remember the answers to my security questions?
-
I'm having trouble running my forms via the forms builder. Everytime i click "run", a new browser window opens with url like http://127.0.0.1:1917/FYCu0odZTxl42wlbLoQ06rso8zKuYWEVV1TpUq4OddxheEMT The port and uri is new everytime. I have tried with a
-
Camera Raw opener on CS5 for Cannon 5D Mark III, I can not fine page to load this.
Please Help, My lap top can not open Raw files, with massage " Get latest version on Camera Raw opener". I can not fine the place to getting one to load.