Problem on uploading blob file to database using KUBA's example
I tried running KUBAS's example found on this thread [Solved]How to upload / download BLOB images ADF - JSF
but a lot of exceptions occured...
I'm using jdev 10.1.3.2.0(i put my jdev's libraries) and oracle database 10g as i wrote in the other thread.
any help would be more than appreciated
07/05/05 13:48:14 javax.faces.el.EvaluationException: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool (zilp.testcase.model.service.BlobAMLocal) failed to checkout an application module due to the following exception:
07/05/05 13:48:14 at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)
07/05/05 13:48:14 at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
07/05/05 13:48:14 at zilp.testcase.view.util.JSFUtils.resolveExpression(JSFUtils.java:163)
07/05/05 13:48:14 oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool (zilp.testcase.model.service.BlobAMLocal) failed to checkout an application module due to the following exception:
07/05/05 13:48:14 at zilp.testcase.view.util.ADFUtils.getApplicationModule(ADFUtils.java:26)
07/05/05 13:48:14 at zilp.testcase.view.backing.Uploading.uploadAction(Uploading.java:58)
07/05/05 13:48:14 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07/05/05 13:48:14 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
07/05/05 13:48:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
07/05/05 13:48:14 at java.lang.reflect.Method.invoke(Method.java:585)
07/05/05 13:48:14 at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
07/05/05 13:48:14 at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
07/05/05 13:48:14 at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
07/05/05 13:48:14 at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
07/05/05 13:48:14 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
07/05/05 13:48:14 at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
07/05/05 13:48:14 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
07/05/05 13:48:14 at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
07/05/05 13:48:14 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
07/05/05 13:48:14 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
07/05/05 13:48:14 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
07/05/05 13:48:14 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
07/05/05 13:48:14 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:171)
07/05/05 13:48:14 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
07/05/05 13:48:14 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
07/05/05 13:48:14 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
07/05/05 13:48:14 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
07/05/05 13:48:14 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
07/05/05 13:48:14 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
07/05/05 13:48:14 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
07/05/05 13:48:14 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
07/05/05 13:48:14 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
07/05/05 13:48:14 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
07/05/05 13:48:14 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
07/05/05 13:48:14 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
07/05/05 13:48:14 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
07/05/05 13:48:14 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
07/05/05 13:48:14 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
07/05/05 13:48:14 at java.lang.Thread.run(Thread.java:595)
07/05/05 13:48:14 Caused by: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool (zilp.testcase.model.service.BlobAMLocal) failed to checkout an application module due to the following exception:
07/05/05 13:48:14 at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
07/05/05 13:48:14 at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
07/05/05 13:48:14 at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
07/05/05 13:48:14 at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)
07/05/05 13:48:14 at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
07/05/05 13:48:14 at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
07/05/05 13:48:14 at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1536)
07/05/05 13:48:14 at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1396)
07/05/05 13:48:14 at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:99)
07/05/05 13:48:14 at oracle.adf.model.BindingContext.get(BindingContext.java:457)
07/05/05 13:48:14 at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
07/05/05 13:48:14 at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)
07/05/05 13:48:14 at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
07/05/05 13:48:14 at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
07/05/05 13:48:14 at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
07/05/05 13:48:14 at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
07/05/05 13:48:14 ... 37 more
Hi,
I don't know where is the problem - it works for me. Check precisely database connection (about JBO-30003 see: http://blogs.oracle.com/jheadstart/newsItems/departments/adfBusinessComponents/2006/08/18).
Also note, what kind of file you are uploading. In MimeTypes class there are definitions for mime types.
Kuba
Similar Messages
-
Uploading csv file into database using apex
Dear all
I am using apex 4 and oracle express 10g, i need to upload .csv file into the database for one of my appls, i have referred discussion forum for solutions, i found also, but some how its not working for me.
below mentioned is error and the code
ERROR:
ORA-06550: line 38, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 38, column 8: PL/SQL: Statement ignored ORA-06550: line 39, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 39, column 8: PL/SQL: Statement ignored ORA-06550: line 40, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 40, column 8: PL/SQL: Statement ignored ORA-06550: line 41, column 8: PLS-00221: 'V_DATA_ARRAY' is not a proc
Error
OK
CODE:
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
BEGIN
-- Read data from wwv_flow_files
select blob_content into v_blob_data
from wwv_flow_files where filename = 'DDNEW.csv';
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities
v_line := REPLACE (v_line, ',', ':');
-- Convert each column separated by : into array of data
v_data_array := wwv_flow_utilities.string_to_table (v_line);
-- Insert data into target table
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4);
v_data_array(5);
v_data_array(6);
v_data_array(7);
v_data_array(8);
v_data_array(9);
v_data_array(10);
v_data_array(11);
-- Clear out
v_line := NULL;
END IF;
END LOOP;
END;
what i understand from this is system does not identify v_data_array as array for some reasons, please help me.
initially system was giving error for hex_to_decimal, but i managed to get this function on discussion forum and now it seems to be ok. but v_data_array problem is still there.
thanks in advance
regards
UdayHi,
Mistakes in your sample I did correct
Problem 1
select blob_content into v_blob_data
from wwv_flow_files where filename = 'DDNEW.csv'; to
select blob_content into v_blob_data
from wwv_flow_files where name = :P1_FILE;Problem 2
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4);
v_data_array(5);
v_data_array(6);
v_data_array(7);
v_data_array(8);
v_data_array(9);
v_data_array(10);
v_data_array(11); to
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4),
v_data_array(5),
v_data_array(6),
v_data_array(7),
v_data_array(8),
v_data_array(9),
v_data_array(10),
v_data_array(11); And I did create missing table
CREATE TABLE TABLE_X
v1 VARCHAR2(255),
v2 VARCHAR2(255),
v3 VARCHAR2(255),
v4 VARCHAR2(255),
v5 VARCHAR2(255),
v6 VARCHAR2(255),
v7 VARCHAR2(255),
v8 VARCHAR2(255),
v9 VARCHAR2(255),
v10 VARCHAR2(255),
v11 VARCHAR2(255)
);Regards,
Jari
Edited by: jarola on Nov 19, 2010 3:03 PM -
How to upload pdf file to DataBase using webdynpro abap.
Hi Experts,
how can i upload a pdf file in document server using webdynpro abap and display the same pdf file on the view using webdynpro abap.
Please Provide requried information .
Thanks & Regards.
Bhushan.NB - the "data" that is returned by these classes is the data as defined in an adobe form - it doesn't return the content of non-form PDF documents.
The PDF must be an interactive form ( although that doesn't restrict you to using the SAP process for creating the form is my understanding - but I could be wrong. )
Edit - I was wrong! ONLY PDF documents that have been created by the ADS can have data extracted using these classes. So unless you are using Adobe interactive forms - then you will get no value from this functionality - and if you're using AIF then you're probably just use the standard UI element
Edited by: Chris Paine on Oct 26, 2010 6:04 PM -
How to upload binary file in database?
Using servlets..how to upload binary file into database...
How to get the data of file in servlet...
Please reply...i'm unable to find exact code...that i want..You need to do two separate parts: accept the file from a HTTP multi-part POST and then stream it into a BLOB on the database. To do the former, download Jakarta Commons FileUpload. There is extensive documentation on how to write a simple handler for the upload. You then need to send the data to a BLOB. The specifics vary from database to database but generally you will insert or update a row with an empty blob, get a reference to the blob, pipe the data and then commit.
If you do a quick forum search, this question has been asked (and answered) dozens of times. Some of the replies may even have code for you. Best of luck.
- Saish -
Problem in Uploading a File by Applet
Hi Members,
* I have faced problem while uploading a file from client to server by ftp protocol using APPLET(No JSP) only
* I am getting exception while running....
* My source code is as follows,
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
public class UploadAndDownload extends Applet implements ActionListener {
Button upload;
Button browse;
TextField filename;
File source = null;
Label name;
StringBuffer sb;
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
public void init() {
setLayout(new FlowLayout());
upload = new Button("Upload");
browse = new Button("Browse");
name = new Label("Filename");
filename = new TextField("", 45);
add(name);
add(filename);
add(upload);
add(browse);
upload.addActionListener(this);
browse.addActionListener(this);
public void actionPerformed(ActionEvent evt) {
// Code for browsing a file
String input_file_name = "";
if (evt.getSource() == browse)
Frame parent = new Frame();
FileDialog fd = new FileDialog(parent, "Select a file", FileDialog.LOAD);
fd.setVisible(true);
input_file_name = fd.getFile();
filename.setText(input_file_name);
// Gets the file from the file dialog and assign it to the source
source = new File(input_file_name);
repaint();
// Code for Uploading a file to the server
if (evt.getSource() == upload) {
// Appending the server pathname in string buffer
sb = new StringBuffer("ftp://");
sb.append("2847");
sb.append(':');
sb.append("Websphere25");
sb.append("@");
sb.append("172.16.1.111");
sb.append('/');
sb.append(input_file_name);
sb.append(";type=i");
try {
URL url = new URL(sb.toString());
URLConnection urlc = url.openConnection();
bos = new BufferedOutputStream(urlc.getOutputStream());
bis = new BufferedInputStream(new FileInputStream(source));
int i;
// Read from the inputstream and write it to the outputstream
while ((i = bis.read()) != -1) {
bos.write(i);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (bis != null)
try {
bis.close();
} catch (IOException ioe) {
ioe.printStackTrace();
if (bos != null)
try {
bos.close();
} catch (IOException ioe) {
ioe.printStackTrace();
MY EXCEPTION IS,
Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.net.SocketPermission 172.16.1.111:80 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.getOutputStream(Unknown Source)
at UploadAndDownload.actionPerformed(UploadAndDownload.java:68)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)* Please let me know what problem in my code....
* Thanks in advance....* Thanks for your reply....
* I have signed my policy file by giving AllPermission and mentioned in java.security file in bin folder....
* My question is , by giving AllPermission , can we access and do all permissions like ( SecurityPermission, AWTPermission, SocketPermission, NetPermission, FilePermission, SecurityPermission etc )...
* My policy file is looks like follow,
/* AUTOMATICALLY GENERATED ON Tue Apr 16 17:20:59 EDT 2002*/
/* DO NOT EDIT */
grant {
permission java.security.AllPermission;
};* If i signed the policy like above, and when i run the applet file in InternetExplorer now , it thorws the following exception on my console,
java.net.ProtocolException: cannot write to a URLConnection if doOutput=false - call setDoOutput(true)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.getOutputStream(Unknown Source)
at UploadAndDownload.actionPerformed(UploadAndDownload.java:68)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)* Please let me know , how to solve this and give me your suggestion on the above process...
* Thanks in advance...
Regards,
JavaImran -
Problem with uploading a file in Clustered Environment
Hi,
I have a problem with uploading a file in a clustered environment. I have an iview component which facilitates an upload action of an xml config file. The problem is that the upload of the modified XML file is reflected only in the central instance of the cluster and not in the dialog instances. The dialog instances hold the old config file.
Is there any solution to upload the file to all the nodes in the cluster.
Thanks
KiranHi,
This is a known problem with clustered environment. Remember that your portal component runs on just on dialog instance and it doesn't automatically have access to the other nodes. However, there are some ways to get around this
1. Use KM to store files. KM is a common repository for all application servers and therefore you needn't worry more
2. Use an external batch oriented product (suresync/robocopy) to synch folders on the different DIs. You basically use your existing portal component, but there is a batch job which makes sure the upload folder is identical on all DIs (however, there is a slight delay depending on how often you run the batch job)
3. Store the files on a shared disk directly from the portal component.
Cheers
Dagfinn -
GUI_UPLOAD - Problem in uploading xml file
Hi,
I have problem in uploading xml file into itab.
Here is the code
begin of GS_STRING,
STR(72) type C,
end of GS_STRING,
GT_STRING like standard table of GS_STRING,
call function 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE_NAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = GT_STRING
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
others = 17.
if SY-SUBRC <> 0.
message I499(SY) with 'File upload failed'.
stop.
endif.
endif.
In debuggin mode, i can see the itab uploaded with xml payload. But in that same place, the hexadecimal format has double zeros 00 after each character.
XML message : <?xml
Correct Hexadecimal : 3C3F786D6C
Hexadecimal in itab : 3C003F0078006D006C00
This makes the resultant xml invalid.
can anyone help me to solve this?
Thanks,
Uma
Edited by: Uma Maheswari on May 30, 2008 4:15 PMwhat do you want to do with the uploaded XML?
i use the following
constants: line_size type i value 255.
data: begin of xml_tab occurs 0,
raw(line_size) type x,
end of xml_tab,
file type string,
size type i.
call function 'GUI_UPLOAD'
exporting
filename = filename
filetype = 'BIN'
has_field_separator = ' '
header_length = 0
importing
filelength = size
tables
data_tab = xml_tab
exceptions
others = 1. -
How to upload a file to database in Apex 4.2.2?
How to upload a file to database in Apex 4.2.2 in Existing Application? Also How to view the uploaded file within this application?
Any help to his question is very appreciated?
Thanks,
Prak.980835 wrote:
Please update your forum profile with a real handle instead of "980835".
Actually we want to upload the file to our own table and retrive from it as well. Is it possible to see the file of person whom we are pulling?
This is covered in the documentation: About BLOB Support in Forms and Reports. There's also a tutorial in the Oracle Learning Library. -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
Uploading a file in KM using KM API
Hi,
How to upload a file into KM using KM API.
Regards
MQHi,
Pls go thru the below code.
public static final String uptoKm(com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource resource){
try {
ResourceContext contex= new ResourceContext(WPUMFactory.getUserFactory( ).getEP5User(req.getUser( )); );
IResourceFactory factory = ResourceFactory.getInstance();
RID rid = RID.getRID(PATH);
ICollection folder = (ICollection)factory.getResource(rid,contex);
Content content = new Content(resource.read(true),"byte",-1);
folder.createResource(resource.getResourceName(),null,content);
return resource.getResourceName();
} catch (NotSupportedException e) {
e.printStackTrace();
} catch (AccessDeniedException e) {
e.printStackTrace();
} catch (ResourceException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
Above method accept parameter of resource and return file name on sucessfully uploaded.
best regards
Hari. -
Uploading a file to server using servlet (Without using Jakarta Commons)
Hi,
I was trying to upload a file to server using servlet, but i need to do that without the help of anyother API packages like Jakarta Commons Upload. If any class for retrieval is necessary, how can i write my own code to upload from client machine?.
From
Velu<p>Why put such a restriction on the solution? Whats wrong about using that library?
The uploading bit is easy - you put a <input type="file"> component on the form, and set it to be method="post" and enctype="multipart/form-data"
Reading the input stream at the other end - thats harder - which is why they wrote a library for it. </p>
why i gave the restriction is that, i have a question that <code>'can't we implement the same upload'</code>
I was with the view that the same can be implemented by our own code right? -
How to upload a file into server using j2ee jsp and servlet with bean?
How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
Anyone help me please!u don't need j2ee and struts to do file uploading. An example is as such
in JSP. u use the <input> file tag like
<input type="file"....>You need a bean to capture the file contents like
class FileUploadObj {
private FormFile srcFile;
private byte[] fileContent;
// all the getter and setter methods
}Then in the servlet, you process the file for uploading
* The following loads the uploaded binary data into a byte Array.
FileUploadObj form = new FileUploadObj();
byte[] byteArr = null;
if (form.signFile != null) {
int filesize = form.srcFile.getFileSize();
byteArr = new byte[filesize];
ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
bytein.read(byteArr);
bytein.close();
form.setFileContent(byteArr);
// Write file content using Writer class into the destination file in the server.
... -
Hi All,
I am trying to do one of the End-To-End scenarios which are described in the following document published by Mukeshlal Parida https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
I followed the steps described for the File to Database Using BPM.
I created a software component File Workshop and DB Workshop and created the respective products. I created the appropriate namespaces under the specified products. However, when I go to create the container elements in the Integration Process, I am only able to view and add the Abstract interfaces created in the specific software component where I am creating the integration process.
The instructions are not clear. I am on XI 3.0 (SP16). Any help would be appreciated.
Thanks
SandeepHi,
U can use the abstract interfaces in BPM.
U have to define all the Interfaces as Abstract and use in BPM transformations. The Container elements are specific to the Software component.
From...
Yallabandi. -
Is It Possible to store an entire file in database using java?
Hi All,
I am new to Programming. please help he out Is It Possible to store an entire file in database using java? is possible, can u tell me the way to make this success? Thank you in advance.Thanks PhHein
i got that application. i stored one file in db, and i displayed that in browser. thank u very much. -
Problems with uploading file to database using FND_GFM
Hi
I'm having some problems uploading files to the database in apps 11.5.9
As various sources/documents tell me, using the standard FND_GFM / FND_FILE_UPLOAD packages of APPS should transfer an uploaded file into the FND_LOBS table, but some reason it doesn't work. I copied and altered the FND_GFM.upload_confirm function to try and figure out why it doesn;t work and it looks like the file to be uploaded does not appear in the defined table (FND_LOBS_DOCUMENT).
The following DAD is defined (with hidden password and servername to prevent abuse ;)):
[DAD_oes_s]
connect_string = oes_s
password = ****
username = APPS
default_page = fnd_web.ping
document_table = APPS.fnd_lobs_document
document_path = docs
document_proc =
upload_as_long_raw =
upload_as_blob = *
reuse = Yes
connmax = 10
pathalias = fndgfm
pathaliasproc = fnd_gfm.dispatch
enablesso = No
cgi_env_list=SERVER_NAME=***,REQUEST_PROTOCOL=http,SERVER_P
ORT=***,HOST=***
input_filtering = Yes
stateful=STATELESS_RESET
And I'm using the following code to generate the upload-file page
CREATE OR REPLACE PROCEDURE XX_ITRIS_HelloWorld AS--(file IN VARCHAR2) AS
access_id_v varchar2(1000);
BEGIN
htp.htmlOpen;
htp.bodyOpen;
htp.formOpen('http://***/pls/oes_s/fnd_file_upload.uploadcompletemessage', 'GET', null, 'multipart/form-data');
htp.formFile('file');
access_id_v := fnd_gfm.authorize(null);
htp.formHidden('access_id', access_id_v);
htp.formSubmit();
htp.formClose;
htp.line;
htp.bodyClose;
htp.htmlClose;
END XX_ITRIS_HelloWorld;
Can anybody point out what is going wrong?You said you are uploading XML file whereas in the TSQL you have assign as text file i.e @SourceFile = 'test.txt'. Are you sure that you are copying XML file ? What is the size of the source file "test.txt" ? I am sure it is 0 KB. That is what you
have found in FTP site.
Regards, RSingh
Maybe you are looking for
-
XML Publisher Report with PL/SQL
Hi Like to know how to develop the XML Publisher Report with PL/SQL, i did the following 1. created a pkg like as below CREATE OR REPLACE PACKAGE BODY APPS.TEST_XMLTAG_PKG AS PROCEDURE main (errbuf OUT VARCHAR2, retcode OUT NUMBER ) IS BEGIN DECLARE
-
I"ve reset my password from my laptop thinking the password was the problem, but the imac mail just keeps asking for the password. It keeps saying The MobileMe IMAP server "mail.me.com" rejected the password for user. Am abit confused as maybe the m
-
USING A PCI CARD TO RUN A 320GIG ATA/IDE HD IN A QUICKSILVER G4
I didn't realise that my model did not support HD's over 120gb. After much reading I found out that I would need a PCI ata 133 card. On checking on ebay it was confusing as to which one. What do I specifically need? There is a range in prices also fo
-
Problems with embedded font on spark RichText control
« Hide I have an embedded font that appears correctly when used with Halo components, but when associated with the spark RichText component, it is not recognized. The embedded font is defined in css file, my css file @namespace s "library://ns.adobe.
-
I've decided that it's time for me to leave OS9 behind and start making music in OSX. I bought a Logic 8 as it's now super cheap and at the weekend tried to install it on my Mac. My MDD 1.25 G4 is right at the bottom end of the minimum system require