Create external file ........
my system config: windows 7 and Oracle sql developer 11g.......
I can not create any kind of external file ........
pls help me with an example ,with below complete steps
1.create directory
2.grant directory
3.create with external file location
923746 wrote:
my system config: windows 7 and Oracle sql developer 11g.......Are you describing the configuration of the client machine? The server machine? Or are you running both the client and the database server on one machine?
1.create directory To create a directory object in Oracle
CREATE DIRECTORY directory_name
AS '<<path on server to a directory that exists on the server>>'That assumes that the path you specify in the DDL already exists on the database server
2.grant directory
GRANT read ON directory_name TO user_name;
GRANT write ON directory_name TO user_name;
3.create with external file location
DECLARE
l_file utl_file.file_type;
BEGIN
l_file := utl_file.fopen( directory_name, file_name, 'w', 32767 );
utl_file.put_line( l_file, 'Some text' );
utl_file.fclose( l_file );
END;Justin
Similar Messages
-
Creating external files (.txt, .json, etc)
Hello everyone,
I'm currently trying to find out how to create external files from a SWF/exe/app file created in Flash. Essentially I'm building a program to create templates for levels in a game. The SWF will be run locally (e.g. not online) and will allow the user to add/remove objects to a level of their design. They then need to be able to save the level template (ideally I need to be able to save as a JSON* file, but I'm sure I could get away with just a simple txt file) somewhere on their computer. These templates will them be imported by the game itself (not written in Flash, hence why I need to save the data as a json or txt file), which will then re-create the levels from the data contained in the save file.
I had assumed this would be something that was really simple to do, but I cannot seem to find any tutorials or information on how to create external files. I can find plenty on reading from existing external files, but nothing about actually writing a new file entirely. I have read a few people complaining that non-local Flash SWFs cannot access the user's hard drive for security reasons, but cannot find any information on local SWFs.
If anyone could tell me even roughly what I'm looking for, it would be greatly appreciated. I'm a bit stuck just now haha
*I have downloaded the corelib files which allow me to work with JSON filesFlash is not able to write any type of text file on user system.
U have to use air or zinc to intract with file system.
Yes u can use shared objects also. Which stores value to user computer and browser stores cookies on user system -
Error while Creating External definition with WSDL file
Hi ALL,
I need to create a External defination with a WSDL file in PI 7.1.so i selected the Option WSDL & From all available message defination while creating External defination & imported the WSDL file.
I am getting an error
javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sap.aii.utilxi.wsdl.api.WsdlHandler.parseWsdlWithOrderRearrange(Lcom/sap/aii/utilxi/xml/xdom/XElement;Z)Lcom/sap/aii/utilxi/wsdl/api/Wsdl; java.lang.RuntimeException: java.lang.NoSuchMethodError:
Note : i checked the WSDl file in altova its no error's ,i know there is no problem with the WSDL file ,i tried importing the same in other XI 3.0 system it has no problem.
help me in solving this ..
Regards
ShakeifHi Tony,
Somehow I solved this issue. I dont remember what exactly I did, as it was sometime back in December. I think I used the Wizard initially to do the configurations in Solution Manager and again i tried to do the same manually as the earlier one threw some errors.
It seems the wizard proceeded half-way through and hence the entry was made in the database already and hence that error.
Anyways thank you for replying me.
best regds,
Alagammai. -
Creating Target Group from External File
Hello Experts
We need to create target group from external file. (That is to say we will have let's say txt file containing BP that belongs to specific target group and we need to assign these BPs to to specific target group in SAP CRM)
I have searched for it on sdn and found something benefical. I have found BAPI_TARGETGROUP_CREATE, I have checked it but I don't understand how should we use it becuase as far as we understand it just creates target group, we cannot see anything related with Business Partner. How can we relate BPs with the target group we create by this BAPI.
What should we do, is anyone have previous experience about it? or is there a way to do it without using BAPI.
thanks it advance
M.
Edited by: Mehmet Ergul on Jan 22, 2009 11:19 AMHi,
You can do this from within the standard Web UI. It's straight out of the box.
Create a profile set and in there create a target group in the target group assignment block just by entering the description of the target group. Then enter edit mode of this target group and click the button "Import Members". Remeber to mark "Change selected target group" unless you want to create a new target group.
/Anders -
Hello
I'm new to Adobe CS software and would like some advice please.
My company uses a CD with a flash interface that opens via an .exe or .app file. The original designer is on maternity leave at the moment but we need some content updates before she gets back and I’m deciding whether to redo the CD myself or to source a new designer.
So far I've been able to replicate most of the CD in Catalyst using the trial version but there is one thing stopping me from buying the software. I can't find a way to link external files (specifically pdf's) via the flash content. The CD is for instruction manuals so once the interface has been navigated the user needs to click on a button to open the desired pdf manual.
Is this possible in Catalyst or am I looking at the wrong software?
I can't write code and my experience is limited so I would appreciate help from someone who knows what they're talking about please and any software recommendation would also be great
If I need to outsource please tell me but bear in mind that I have been able to do all the design work and it's just linking the pdf's that I'm struggling with
Thanks in advance and for any helpHi Bear,
Thanks for your quick answer.
Flash Catalyst currently prefixes all links with "http://", so you would need to save your FXP in Catalyst, open the FXP in builder, and remove the "http" so that you're just loading the local pdfs.
I tried your suggestion but couldn't get it working so I'm probably doing something wrong since I'm not very familiar with Flash Builder.
I created the button > on click > go to url interaction in Catalyst and saved the project (tried it using a PDF saved on our server and also my PC).
I imported the FXP and opened to "project name / src / (default package) / main.mxml / button name"
After deleting "http" I selected "export release build" and opened the new SWF and also tried the HTML; the new button just opened to my homepage instead of the PDF
I also tried deleting "http:" and "http://" which deactivated the button completely (I expect some coders will laugh at that but I am a noob )
Unfortunately linking to online files isn't an option for me so do you see what I'm doing wrong please?
Thanks for your help -
Create a cursor from a PL/SQL variable or an external file
Dear friends,
is there a way for me to make Oracle Forms read a cursor from a PL/SQL variable, or an external file? Let's suppose we have the code below:
DECLARE
cursor c_values is select * from my_table;
r_values c_values%ROWTYPE;
BEGIN
for r_values in c_values loop
do_something;
end loop;
END;
In the situation described above, could I create "select * from my_table" from a PL/SQL variable (it could be something like p_cursor = 'select * from my_table'), or an external file - for example, make my form read the contents of c:\my_select.sql , where we see the "select * from my table" text?
My question comes because I need to export data from select instructions that were dinamically created inside the form - that is, via PL/SQL -, and I don't want to rewrite it, but I'll have to do it if I have no choice. Your help will be greatly appreciated.
Best regards,
Franklin
Edited by: franklinbrasil on 12/03/2009 11:33
Edited by: franklinbrasil on 12/03/2009 11:35Dear friends,
I am using DBMS_SQL package, which solved my problem. Please let me explain it better, if it's not clear.
I have some PL/SQL blocks inside my form, which creates SQL queries dinamically, and a dinamically created SQL is stored into a VARCHAR2 variable. These SQL queries are exported for use in Oracle Graphics, but since OG is not being developed by Oracle anymore then I am trying to find a substitute for it.
So I thought about creating an option for the final user: he/she can choose exporting data into Microsoft Excel, and user does what he/she wants, creating a customized graphic. Exporting into Excel works finely, with no problems at all - I could find a routine by searching on the web.
My goal was to use the same queries created above to export data dinamically to Microsoft Excel, and I absolutely don't want to rewrite all these dinamically created queries - one which works dinamically, other with no flexibility inside my form. Worse than it, I have many other dinamically created queries, and I obviously don't want to rewrite them all - any maintenance in this form would be terrible, with each SQL instruction written twice.
Since all dinamically created SQL instructions are stored inside a VARCHAR2 variable, I thought about reusing the same SQL, as explained above - and here we have your suggestions about using a ref cursor, execute immediate, and so on. And (answering Andreas) query structure is always based on the same table, but its structure changes a lot, depending on what the final user chooses in a drop-down list (it's a list of graphics options, where final user chooses one option, and form must mount SQL dinamically, based on user's choice).
By using your explanations, I could find DBMS_SQL solution here: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg09dyn.htm#26799
. Please notice that I had to change DBMS_SQL.native into 1 for it to work in my form. I'll mark all your answers as helpful because I can use them both for database and form purposes.
If my message was not clear enough, please tell me and I'll try to make it more clear.
Best regards,
Franklin -
Is it possible to build a flash programme that will create
new files that can be accessed or edited. I would like to know all
the possible ways.This is a multi-part message in MIME format.
------=_NextPart_000_0019_01C68ADA.8B87E340
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
1. You could place the XML or raw data in the Flash movie or
in external =
Flash movies. In the latter case the main Flash movie would
then load =
the=20
external Flash movie and use the data. Again only a skilled
ambitious =
person=20
would attempt the decompiling and analysis process. If the
external =
movie is=20
played they would see nothing since it only has code.
For desktop Flash implemented application you could deliver
new quizzes =
via=20
updated external Flash movies containing the quiz data.
2. You could use a server side script that gets an XML
structure from =
Flash=20
that has a unlock value and then the script returns the XML.
If the =
script=20
does not get the correct lock value it returns a blank web
page or a web =
page with whatever. You Flash movie XML would then use
sendAndLoad to=20
connect to the script and other than the send XML value(s)
your =
Actionscript=20
would be the same.
Still a real ambitious person could get the unlock code from
decompiling =
the=20
Flash movie with third party tools. If that is an issue, then
you could=20
request the unlock code in your Flash movie and change it
from time to =
time=20
in the server side script.
--=20
Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples: =
http://flashexamples.hosfordusa.com
May many happy bits flow your way!
"Flash Dhana" <[email protected]> wrote in
message =
news:[email protected]...
Hi all,
I have one issue. I have many xml files with my lesson, when
i am =
delivering=20
to the client, i use to give all the files. But the xml file
contains =
questions=20
and answers, so user can open the xml file and know the
answer. is there =
anyway=20
to protect the xml file? also i need to get the content to
flash from =
the same=20
file.
(I am not writing anything in the xml file, just reading
content from =
xml file)
Please suggest.
------=_NextPart_000_0019_01C68ADA.8B87E340
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2900.2873"
name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#008000 size=3D2><FONT
color=3D#000000 size=3D3>1. =
You could place=20
the XML or raw data in the Flash movie or in external
<BR>Flash movies. =
In the=20
latter case the main Flash movie would then load the
<BR>external Flash =
movie=20
and use the data. Again only a skilled ambitious person
<BR>would =
attempt the=20
decompiling and analysis process. If the external movie is
<BR>played =
they would=20
see nothing since it only has code.<BR><BR>For
desktop Flash implemented =
application you could deliver new quizzes via
<BR>updated external Flash =
movies=20
containing the quiz data.<BR><BR><BR>2. You
could use a server side =
script that=20
gets an XML structure from Flash <BR>that has a unlock
value and then =
the script=20
returns the XML. If the script <BR>does not get the
correct lock value =
it=20
returns a blank web page or a web <BR>page with
whatever. You Flash =
movie XML=20
would then use sendAndLoad to <BR>connect to the script
and other than =
the send=20
XML value(s) your Actionscript <BR>would be the
same.<BR><BR>Still a =
real=20
ambitious person could get the unlock code from decompiling
the =
<BR>Flash movie=20
with third party tools. If that is an issue, then you could
<BR>request =
the=20
unlock code in your Flash movie and change it from time to
time <BR>in =
the=20
server side
script.</FONT><BR><BR></FONT></DIV>
<DIV><BR>-- <BR>Lon
Hosford<BR><A=20
href=3D"
http://www.lonhosford.com">www.lonhosford.com</A><BR>Flash,
=
Actionscript=20
and Flash Media Server examples: <A=20
href=3D"
usa.com</A><BR>May=20
many happy bits flow your way!</DIV>
<DIV>"Flash Dhana" <<A=20
href=3D"mailto:[email protected]">[email protected]=
</A>>=20
wrote in message <A=20
href=3D"news:[email protected]">news:e689nv$fvn$1@forums=
.macromedia.com</A>...</DIV>Hi=20
all,<BR><BR> I have one issue. I have
many xml files with my =
lesson, when i=20
am delivering <BR>to the client, i use to give all the
files. But the =
xml file=20
contains questions <BR>and answers, so user can open
the xml file and =
know the=20
answer. is there anyway <BR>to protect the xml file?
also i need to get =
the=20
content to flash from the same
<BR>file.<BR><BR> (I am not writing =
anything=20
in the xml file, just reading content from xml
file)<BR><BR> Please =
suggest.<BR></BODY></HTML>
------=_NextPart_000_0019_01C68ADA.8B87E340-- -
Error while creating external table
Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
In the temp directory i've a text file countries1.txt
the text file has the below information
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.The creation of external table query is
CREATE TABLE countries_ext (
country_code VARCHAR2(5),
country_name VARCHAR2(50),
country_language VARCHAR2(50)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY ext_tables
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
country_code CHAR(5),
country_name CHAR(50),
country_language CHAR(50)
LOCATION ('Countries1.txt')
PARALLEL 5
REJECT LIMIT UNLIMITED;And the error is
SQL> select *from countries_ext;
select *from countries_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Countries1.txt in EXT_TABLES not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
SQL> Please help me in thisYou are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
Step1: Check the file is actually there.
C:\oracle\product\10.2.0>mkdir temp
C:\oracle\product\10.2.0>cd temp
C:\oracle\product\10.2.0\temp>dir
Volume in drive C is C_Drive
Volume Serial Number is 8A93-1441
Directory of C:\oracle\product\10.2.0\temp
07/30/2011 12:00 PM <DIR> .
07/30/2011 12:00 PM <DIR> ..
07/30/2011 12:00 PM 79 countries1.txt
1 File(s) 79 bytes
2 Dir(s) 50,110,582,784 bytes free
C:\oracle\product\10.2.0\temp>type countries1.txt
ENG,England,English
SCO,Scotland,English
IRE,Ireland,English
WAL,Wales,Welsh
C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
SQL> show user
USER is "SYS"
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
Directory created.
SQL> grant read,write on directory ext_tables to scott;
Grant succeeded.
SQL>Step 3: Table definition.
C:\>sqlplus scott@orclsb/tiger
SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE countries_ext (
2 country_code VARCHAR2(5),
3 country_name VARCHAR2(50),
4 country_language VARCHAR2(50)
5 )
6 ORGANIZATION EXTERNAL (
7 TYPE ORACLE_LOADER
8 DEFAULT DIRECTORY ext_tables
9 ACCESS PARAMETERS (
10 RECORDS DELIMITED BY NEWLINE
11 FIELDS TERMINATED BY ','
12 MISSING FIELD VALUES ARE NULL
13 (
14 country_code CHAR(5),
15 country_name CHAR(50),
16 country_language CHAR(50)
17 )
18 )
19 LOCATION ('Countries1.txt')
20 )
21 PARALLEL 5
22 REJECT LIMIT UNLIMITED;
Table created.
SQL> SELECT * FROM countries_ext;
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
ENG England
English
SCO Scotland
English
IRE Ireland
English
COUNT COUNTRY_NAME
COUNTRY_LANGUAGE
WAL Wales
Welsh -
Reading the Blob and writing it to an external file in an xml tree format
Hi,
We have a table by name clarity_response_log and content of the column(Response_file) is BLOB and we have xml file or xml content in that column. Most probably the column or table may be having more than 5 records and hence we need to read the corresponding blob content and write to an external file.
CREATE TABLE CLARITY_RESPONSE_LOG
REQUEST_CODE NUMBER,
RESPONSE_FILE BLOB,
DATE_CRATED DATE NOT NULL,
CREATED_BY NUMBER NOT NULL,
UPDATED_BY NUMBER DEFAULT 1,
DATE_UPDATED VARCHAR2(20 BYTE) DEFAULT SYSDATE
)The xml content in the insert statement is very small because of some reason and cannot be made public and indeed we have a very big xml file stored in the BLOB column or Response_File column
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(5, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(6, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(7, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(8, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');
Insert into CLARITY_RESPONSE_LOG
(REQUEST_CODE, RESPONSE_FILE, DATE_CRATED, CREATED_BY, UPDATED_BY, DATE_UPDATED)
Values
(9, '<?xml version="1.0" encoding="UTF-8"?><xml-response><phone-number>1212121212</tracking-number></xml-response>', TO_DATE('09/23/2010 09:01:34', 'MM/DD/YYYY HH24:MI:SS'), 1, 1, '23-SEP-10');THe corresponding proc for reading the data and writing the data to an external file goes something like this
SET serveroutput ON
DECLARE
vstart NUMBER := 1;
bytelen NUMBER := 32000;
len NUMBER;
my_vr RAW (32000);
x NUMBER;
l_output UTL_FILE.FILE_TYPE;
BEGIN
-- define output directory
l_output :=
UTL_FILE.FOPEN ('CWFSTORE_RESPONCE_XML', 'extract500.txt', 'wb', 32760);
vstart := 1;
bytelen := 32000;
---get the Blob locator
FOR rec IN (SELECT response_file vblob
FROM clarity_response_log
WHERE TRUNC (date_crated) = TRUNC (SYSDATE - 1))
LOOP
--get length of the blob
len := DBMS_LOB.getlength (rec.vblob);
DBMS_OUTPUT.PUT_LINE (len);
x := len;
---- If small enough for a single write
IF len < 32760
THEN
UTL_FILE.put_raw (l_output, rec.vblob);
UTL_FILE.FFLUSH (l_output);
ELSE
-------- write in pieces
vstart := 1;
WHILE vstart < len AND bytelen > 0
LOOP
DBMS_LOB.READ (rec.vblob, bytelen, vstart, my_vr);
UTL_FILE.put_raw (l_output, my_vr);
UTL_FILE.FFLUSH (l_output);
---------------- set the start position for the next cut
vstart := vstart + bytelen;
---------- set the end position if less than 32000 bytes
x := x - bytelen;
IF x < 32000
THEN
bytelen := x;
END IF;
UTL_FILE.NEW_LINE (l_output);
END LOOP;
----------------- --- UTL_FILE.NEW_LINE(l_output);
END IF;
END LOOP;
UTL_FILE.FCLOSE (l_output);
END;The above code works well and all the records or xml contents are being written simultaneously adjacent to each other but we each records must be written to a new line or there must be a line gap or a blank line between any two records
the code which I get is as follow all all xml data comes on a single line
<?xml version="1.0" encoding="ISO-8859-1"?><emp><empno>7369</empno><ename>James</ename><job>Manager</job><salary>1000</salary></emp><?xml version="1.0" encoding="ISO-8859-1"?><emp><empno>7370</empno><ename>charles</ename><job>President</job><salary>500</salary></emp>But the code written to an external file has to be something like this.
<?xml version="1.0" encoding="ISO-8859-1"?>
<emp>
<empno>7369</empno>
<ename>James</ename>
<job>Manager</job>
<salary>1000</salary>
</emp>
<?xml version="1.0" encoding="ISO-8859-1"?>
<emp>
<empno>7370</empno>
<ename>charles</ename>
<job>President</job>
<salary>500</salary>
</emp>Please adviceWhat was wrong with the previous answers given on your other thread:
Export Blob data to text file(-29285-ORA-29285: file write error)
If there's a continuing issue, stay with the same thread, don't just ask the same question again and again, it's really Pi**es people off and causes confusion as not everyone will be familiar with what answers you've already had. You're just wasting people's time by doing that.
As already mentioned before, convert your BLOB to a CLOB and then to XMLTYPE where it can be treated as XML and written out to file in a variety of ways including the way I showed you on the other thread.
You really seem to be struggling to get the worst possible way to work. -
Creating A File Resource Using Tomcat JNDI
Hi guys,
My problem is that I am creating a web service and I cannot get to a properties file without creating an absolute reference to that file. If I was creating a servlet I would simple use getServletContext() method to get a relative reference to it. However since it is an axis web service i have to deploy my applications in the WEB-INF/services directory, and because it does not interact with the axis servlet I cannot use getServletContext(). So i thought I could create a JNDI file resource reference in the tomcatHome/conf/context.xml file, similar to how I created a JNDI connection pool. The resouce definition looks like this;
<Resource name="resource/dialogueEngineConfig" auth="Container"
type="java.io.File"
url="file:/Applications/apache-tomcat-5.5.1/webapps/axis2/META-INF/DialogueEngine.properties">
</Resource>now I tried to access the resource in my code like this;
// Obtain our environment naming
Context envCtx = (Context) new InitialContext().lookup("java:comp/env");
// Look up our file
File f = (File) envCtx.lookup("resource/dialogueEngineConfig");However I get a NamingException; 'Cannot create resource instance'
I don't understand why I cant create a file resource in JNDI, it seems like a simple enough thing to do. Am I doing something wrong or missing something? Any help would be greatly appreciated.
ThanksHello xalien,
I have the same problem. I need to access external xml config file via JNDI from my servlet, running on Tomcat 5.0.28. Have you manage to define an URL resource? If so, please provide an example how to do it. Many thanx. -
Create Outbound File in a Different System
Hi All,
I have developed an ABAP outbound interface which is suppose to download a CSV file to application server. I have a selection screen field for file location .This program will be scheduled in background and variable will be saved with the file location. I am using open data set and close data set statements to create the file.
We have other outbound ABAP interfaces where we download files to application server but in all those interfaces files are downloaded to our own application server but for this new interface the file location is on our business partner's server.
Can anybody please tell me if I can download file to a location on our business partner's server using open data set statement and if yes what are the additional things I need to do for the program to download a file in that location?
Like.
1. Who should have authorization to that location when the program is scheduled to run in background.
2. Does the SAP system itself need to get some access to that external system and if yes how do we get it ? I mean do we have to do anything on our side or should the partner do something on their side?
3. And any other additional setting.
Please help me by providing your valuable inputs.
Thanks,
JhansiHi
Open dataset statament can work for Application Server only, so you can't use it for downloading a file in another server.
One solution can be to send the file from your server to the partner one via ftp: that means you need to create the file in your application (by open dataset) and then to send it via ftp.
So you need to change your interface program in order to add the abap code to manage ftp (see the program RSFTP00*):
1. Who should have authorization to that location when the program is scheduled to run in background.
The authorization should have the same of the other interface
2. Does the SAP system itself ....
Your SAP system has to allow to send a file via ftp, but this is a standard function, probably is just active in your system
Partner Server has to allow to receive a file via ftp: you need to get an agreement with your partner
3. And any other additional setting.
Just to active ftp: ask your basis (If i remember one of reports RSFTP00* generates the RFC connection for ftp, if it's missing)
Max -
External table: How to load data from a fixed format UTF8 external file
Hi Experts,
I am trying to read data from a fixed format UTF8 external file in to a external table. The file has non-ascii characters, and the presence of the non-ascii characters causes the data to be positioned incorrectly in the external table.
The following is the content's of the file:
20100423094529000000I1 ABÄCDE 1 000004
20100423094529000000I2 OMS Crew 2 2 000004
20100423094529000000I3 OMS Crew 3 3 000004
20100423094529000000I4 OMS Crew 4 4 000004
20100423094529000000I5 OMS Crew 5 5 000004
20100423094529000000I6 OMS Crew 6 6 000004
20100423094529000000I7 Mobile Crew 7 7 000004
20100423094529000000I8 Mobile Crew 8 8 000004
The structure of the data is as follows:
Name Type Start End Length
UPDATE_DTTM CHAR 1 20 20
CHANGE_TYPE_CD CHAR 21 21 1
CREW_CD CHAR 22 37 16
CREW_DESCR CHAR 38 97 60
CREW_ID CHAR 98 113 16
UDF1_CD CHAR 114 143 30
UDF1_DESCR CHAR 144 203 60
UDF2_CD CHAR 204 233 30
DATA_SOURCE_IND CHAR 294 299 6
UDF2_DESCR CHAR 234 293 60
I create the external table as follows:
CREATE TABLE "D_CREW_EXT"
"UPDATE_DTTM" CHAR(20 BYTE),
"CHANGE_TYPE_CD" CHAR(1 BYTE),
"CREW_CD" CHAR(16 BYTE),
"CREW_DESCR" CHAR(60 BYTE),
"CREW_ID" CHAR(16 BYTE),
"UDF1_CD" CHAR(30 BYTE),
"UDF1_DESCR" CHAR(60 BYTE),
"UDF2_CD" CHAR(30 BYTE),
"DATA_SOURCE_IND" CHAR(6 BYTE),
"UDF2_DESCR" CHAR(60 BYTE)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER DEFAULT DIRECTORY "TMP"
ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE
CHARACTERSET UTF8
STRING SIZES ARE IN BYTES
NOBADFILE NODISCARDFILE NOLOGFILE FIELDS NOTRIM
( "UPDATE_DTTM" POSITION (1:20) CHAR(20),
"CHANGE_TYPE_CD" POSITION (21:21) CHAR(1),
"CREW_CD" POSITION (22:37) CHAR(16),
"CREW_DESCR" POSITION (38:97) CHAR(60),
"CREW_ID" POSITION (98:113) CHAR(16),
"UDF1_CD" POSITION (114:143) CHAR(30),
"UDF1_DESCR" POSITION (144:203) CHAR(60),
"UDF2_CD" POSITION (204:233) CHAR(30),
"DATA_SOURCE_IND" POSITION (294:299) CHAR(6),
"UDF2_DESCR" POSITION (234:293) CHAR(60) )
) LOCATION ( 'D_CREW_EXT.DAT' )
REJECT LIMIT UNLIMITED;
Check the result in database:
select * from D_CREW_EXT;
I found the first row is incorrect. For each non-ascii character,the fields to the right of the non-ascii character are off by 1 character,meaning that the data is moved 1 character to the right.
Then I tried to use the option STRING SIZES ARE IN CHARACTERS instead of STRING SIZES ARE IN BYTES, it doesn't work either.
The database version is 11.1.0.6.
Edited by: yuan on May 21, 2010 2:43 AMHi,
I changed the BYTE in the create table part to CHAR, it still doesn't work. The result is the same. I think the problem is in ACCESS PARAMETERS.
Any other suggestion? -
How to use many external files?
Hi,
for a single onetime load of a .csv file ,I create a file module,then use the flatfile wizard to specify my file.
Now If I have to automatically load all files which are in certain location on Windows Server,how do i achieve this ?
All my .csv files have the same structure of 3 columns and the filenames are named as details_ddmmyyyy.csv
everyday I will receive such files and want to automatically use them in my mapping which loads the data from flatfile to table.
Please suggest.
rgds
sI think that cannot be done Purelly in OWB, But the way around is loop through all the file in the Directory using OWB (for or While loop)
then Create dynamically the External tables ) and load them in OWB.
Cheers
Nawneet -
Problem in creating a file on Application Server
Hi,
I am facing an issue while creating a file on the application server.
I am creating a file with sales data from SAP and saving it on the application server.
At the end of this operation, I am calling a Unix script to push this file from SAP to an external system.
The issue I am facing is - at every month end, when I run a job for creating the file (its a custom program which is scheduled to run periodically), I get a strange scenario where a BLANK FILE gets created on the application server even though the data tables are not blank.
Also the user id gets changed to UID = 1400 when I run this job for the first time when a BLANK FILE gets created.
When I delete this file and run the job again, though, the file gets created WITH DATA.
The user name remains DEVADM (Dev Admin), as it should be for the scheduled jobs.
What could be the possible reasons for this?
Please help me in this direction.
Thank you.
Regards,
KeerthiHi,
You are using OPEN DATASET ? And what is the sy-subrc ?
Can you post some lines of your code?
Best regards,
Leandro Mengue -
I am new to Creative Cloud, but have been using Adobe software for many years.
Now we are considering sharing an Indesign file with my project group using CC.
The Indesign file contains links to external files (one Illustrator and multiple .txt files); and we export the approved version to an Hi-Res PDF.
These .txt files are currently hosted on our internal server but have not been linked directly: we first copy them over to local desktop and update the links in Indesign before creating a new PDF.
Since these file can be update by different people we would like to keep them outside the Indesign and Illustrator files.
Is it still possible with CC to link directly to the files on our server in Indesign and see if there have been updated?
Or can they also be stored in the CC cloud? Or is there another method?
Thanks in advance for any help or suggestions
RonaldThis will work if you all use the file syncing of the Creative Cloud desktop application and then you use the Collaborate option for the folder containing all the files. Then it will work on each of your desktops.
Links to files will not work in the browser when viewing the InDesign document from https://creative.adobe.com/files.
Maybe you are looking for
-
Hello SDN Community..!! I have some theoritical doubts in XI objects. <b>Question 1:</b> what i know about Integration Process is: Integration Processes are defined in integration Repository. Processes defined in Integration Repository are used as se
-
Multiple Nanos in Family one Nano update download?
When ever a new version of the nano software comes up each sync takes awhile because it has to download the 54MB updater for each of my families memeber nano. Is there a way to have the download happen only once and yet update each individual nano wh
-
Is a controller really necessary?
I just got Logic Express 8. I have an m-audio 61es that stopped working as soon as I bought it. If I get it fixed, could it work as a controller? I'm on a budget, so I fell like m-audio's iControl may be the only one I can afford otherwise. I'm a sin
-
Being charged £22.50 for BT Sport HD
For the last 2 months (1st July and 4th August) £22.50 has been taken from my bank account for BT Sport HD when I should only be charged £15. I phoned BT after the first payment of £22.50 was taken and the woman I spoke to said she put it on the syst
-
CRM BP relationship not visible in tcode BP in ECC
I replicated the Sold to party and created Relationship HAS scn with another partner . The Partner is visible as Partner function in sales area data as partner function but cannot see it in BP tcode in relations tab in ECC. What we need to do to get