Not able to insert data in database via forms
Hi there. i have been trying to insert data into my database, which i am connected to remotely. i have written some sql code for a button.
INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
where the above are the above are textfield items. my code compiles fine, and no errors are displayed on my form, but when i click the button, nothing happens, and the page is busy, and appears to be processing something, but does nothing.
don't write
INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
write
INSERT INTO address_repository (address_id, ....., ....., .....
VALUES('ADD'|| :address.address_id, :address.address_street_num,
:address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
if the same error is still active, then we look further, ok?
Similar Messages
-
Not able to insert data in a table...using MS SQL 2000
Hi guys,
Since this morning, for some reasons that I don't know, I can't insert data into my database. This is piece of my code:
Statement statement1 = connection.createStatement();
String sql = "SELECT PeopleID, LastName FROM People" + " WHERE LastName='" + lastName + "'";
ResultSet resultSet = statement1.executeQuery(sql);
and this is the error message I'm having:
Error executing the SQL statement[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'People'.
Any idea on how to fix that...?? I played around with the database to make sure that I have all the right permissions, still it doesn't work...
Thanks...How do I check to make sure that it has an object.It doesn't. Period. That's what the error message is saying.
I'm able to query that table People and I get a
result back from it.Then whatever tool you're using to query that table, is connected to a different database (and/or connected as a different user) than the one your code is trying to connect to. -
Sql Loader by using shell script, not able to insert data
Hi,
I am trying to dump the data by using shell script.(in shell script i am having sqlldr command)(its a host excutable method cocurrent program)
When i am loading the data, by placing my files(.ctl,.prog,.csv,symbolink file for .prog) in $Custom_top/bin, it is loading exactly. 17000 records inserted.
But if i am loading the data by placing my files in $custom_top/custom_folders. unable to insert total data. only 43 records inserting.
Please any one can help me.
Thanks in advance.
Rama.Srini, Thanks a lot for ur reply,
Oracle Apps version R12,
Microsoft windows XP profissional
Version 2002 service Pack 3
My Control file Script is:
load data
infile '$XADP_TOP/data/CPIU/in/XXOKS_Price_Increase.csv'
append
into table XXOKS_CONTRACT_PRICE_INCR_DTLS
fields terminated BY ',' optionally enclosed by '"'
TRAILING NULLCOLS
(EXCLUSION_FLAG,
LEGACY_NUMBER,
CUSTOMER_NUMBER,
CUSTOMER_NAME,
REQUEST_ID,
CONTRACT_NUMBER,
CONTRACT_START_DATE,
CONTRACT_END,
REQUEST_LINE_ID,
LINE_START_DATE,
LINE_END_DATE,
ITEM_NUMBER,
ITEM_DESCRIPTION,
UNIT_PRICE,
QTY,
NEW_UNIT_PRICE,
LINE_AMOUNT,
NEW_LINE_AMOUNT,
PRICE_INCREASED_DATE,
PERCENTAGE_INCREASED,
ORIGINAL_CONTRACT_AMOUNT,
NEW_CONTRACT_AMOUNT,
PRICE_INCREASE_AMOUNT)
My .prog File is: Please fidn that i created symbolink file also for my .prog.
if [ -z $XADP_TOP ];then
echo "XADP_TOP environment variable is not set!"
exit 1
fi
cd $XADP_TOP/data/CPIU/in
DATE=`date +%y%m%d:%H%M`
i_program_name="$0"
i_ora_pwd="$1"
i_user_id="$2"
i_user_name="$3"
i_request_id="$4"
i_ftp_host_name="$5"
i_ftp_user_name="$6"
i_ftp_user_password="$7"
ftp_prog() {
# FTP Function to reuse the FTP Commands
if [ $# -ne 6 ];then
echo "Usage : ftp_prog <Hostname> <User name> <Password> <Remote Directory> <command> <filename>"
exit 2
fi
l_ftp_host_name="$1"
l_ftp_user_name="$2"
l_ftp_user_password="$3"
l_ftpdir="$4"
l_ftp_command="$5"
l_ftp_filename="$6"
ftp -v -n ${l_ftp_host_name} <<EOF
user ${l_ftp_user_name} ${l_ftp_user_password}
ascii
cd ${l_ftpdir}
${l_ftp_command} ${l_ftp_filename}
quit
EOF
#exit $?
# setting the ftp directory
#ftpdir="/`echo ${TWO_TASK:-$ORACLE_SID}|tr "[A-Z]" "[a-z]"`/CPIU"
##ftpdir="/FinTEST/quoting/PS/ar"
ftpdir="$XADP_TOP/data/CPIU/in"
# setting the in directory and out directory
indir="$XADP_TOP/data/CPIU/in"
outdir="$XADP_TOP/data/CPIU/out"
ftp_prog ${i_ftp_host_name} ${i_ftp_user_name} ${i_ftp_user_password} ${ftpdir} get XXOKS_Price_Increase.csv
echo $ftpdir
echo "Converting the data file into unix mode"
dos2unix XXOKS_Price_Increase.csv XXOKS_Price_Increase.csv
chmod 777 XXOKS_Price_Increase.csv
cd $XADP_TOP/bin
echo "Trying to excute sqlldr and entering into the into control file"
$ORACLE_HOME/bin/sqlldr userid=$i_ora_pwd control=XXOKS_PRICE_INCR_LOAD log=$XADP_TOP/log/XXOKS_PRICE_INCR_LOAD_${DATE}.log;
exit_status=$?
echo "Checking the status and giving permissions to the data file which in in dir"
if [ $exit_status -eq 0 ]; then
cd $XADP_TOP/data/CPIU/in
chmod 777 XXOKS_Price_Increase.csv
echo "try to move data file into out dir"
# Moving the file to out directory
mv XXOKS_Price_Increase.csv ${outdir}/XXOKS_Price_Increase.csv_${DATE}
#echo "ready to zip file in out dir step6"
# Zipping the file
#gzip -f ${outdir}/XXOKS_Price_Increase.csv_${DATE}
echo "deleting the file which is in dir"
# Deleting the file from in directory
/bin/rm -f ${indir}/XXOKS_Price_Increase.csv
# Deleting from the remote directory
ftp_prog ${i_ftp_host_name} ${i_ftp_user_name} ${i_ftp_user_password} ${ftpdir} delete XXOKS_Price_Increase.csv
echo "sqlloader finished successfully."
else
echo "Error in loader"
##echo "Loader error in Price Increase Detials File ${i_file}"
fi
exit $exit_status
And My Log file Comments are
SQL*Loader: Release 10.1.0.5.0 - Production on Thu Dec 3 01:32:08 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: XXOKS_PRICE_INCR_LOAD.ctl
Data File: /oesapp/applmgr/GIS11/apps/apps_st/appl/xadp/12.0.0/data/CPIU/in/XXOKS_Price_Increase.csv
Bad File: XXOKS_Price_Increase.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table XXOKS_CONTRACT_PRICE_INCR_DTLS, loaded from every logical record.
Insert option in effect for this table: APPEND
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
EXCLUSION_FLAG FIRST * , O(") CHARACTER
LEGACY_NUMBER NEXT * , O(") CHARACTER
CUSTOMER_NUMBER NEXT * , O(") CHARACTER
CUSTOMER_NAME NEXT * , O(") CHARACTER
REQUEST_ID NEXT * , O(") CHARACTER
CONTRACT_NUMBER NEXT * , O(") CHARACTER
CONTRACT_START_DATE NEXT * , O(") CHARACTER
CONTRACT_END NEXT * , O(") CHARACTER
REQUEST_LINE_ID NEXT * , O(") CHARACTER
LINE_START_DATE NEXT * , O(") CHARACTER
LINE_END_DATE NEXT * , O(") CHARACTER
ITEM_NUMBER NEXT * , O(") CHARACTER
ITEM_DESCRIPTION NEXT * , O(") CHARACTER
UNIT_PRICE NEXT * , O(") CHARACTER
QTY NEXT * , O(") CHARACTER
NEW_UNIT_PRICE NEXT * , O(") CHARACTER
LINE_AMOUNT NEXT * , O(") CHARACTER
NEW_LINE_AMOUNT NEXT * , O(") CHARACTER
PRICE_INCREASED_DATE NEXT * , O(") CHARACTER
PERCENTAGE_INCREASED NEXT * , O(") CHARACTER
ORIGINAL_CONTRACT_AMOUNT NEXT * , O(") CHARACTER
NEW_CONTRACT_AMOUNT NEXT * , O(") CHARACTER
PRICE_INCREASE_AMOUNT NEXT * , O(") CHARACTER
value used for ROWS parameter changed from 64 to 43
Table XXOKS_CONTRACT_PRICE_INCR_DTLS:
43 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 255162 bytes(43 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 43
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Dec 03 01:32:08 2009
Run ended on Thu Dec 03 01:32:08 2009
Elapsed time was: 00:00:00.19
CPU time was: 00:00:00.04
Plz srini help me.
Thanks in advance
Rama.. -
Not able to retrieve data from database through servlet
Hi friends,
I am trying to open a excel sheet through servlet. In this servlet i am retriving data from mssql database.I am not getting any error but no data is retrived
i m also pasting the code here
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: EmployeeData.java
import java.io.*;
import java.sql.*;
import javax.sql.*;
import javax.servlet.ServletException;
import javax.servlet.http.*;
public class EmployeeData extends HttpServlet
public EmployeeData()
public void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
throws ServletException, IOException
httpservletresponse.setContentType("text/html");
httpservletresponse.setHeader("Content-Type", "application/excel");
httpservletresponse.setHeader("Content-Disposition", "filename=reports.xls");
PrintWriter printwriter = httpservletresponse.getWriter();
try
javax.servlet.http.HttpSession httpsession = httpservletrequest.getSession(true);
int i = 0;
/* Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:3413;DatabaseName=newreportsodbc", "reportuser", "cisco");*/
String url="jdbc:odbc:newreportsodbc";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:odbc:newreportsodbc","reportuser","cisco");
Statement statement = connection.createStatement();
printwriter.println("<b><center><u> Search Results </u></center></b>");
printwriter.print("<table><tr><th color=brown background-color=#fff000> No. </th>");
printwriter.print("<th> DateTime </th></tr></table>");
ResultSet resultset = statement.executeQuery("SELECT * FROM t_Call_Type_Half_Hour");
boolean flag;
for(flag = false; resultset.next(); flag = true)
i++;
SerialNo = resultset.getString(2);
printwriter.print((new StringBuilder()).append("<table><tr><td> ").append(i).append("</td>").toString());
printwriter.print((new StringBuilder()).append("<td> ").append(SerialNo).append("</td></tr></table>").toString());
if(!flag)
printwriter.println("<h1> No records selected </h1>");
catch(Exception exception)
System.out.println((new StringBuilder()).append("SQLException: ").append(exception).toString());
static String empid1;
static String empid;
static String SerialNo;
static String designation;
}thanks in advance. i just feel there is something to be done with connection string.post the table format in SQL
-
Not able to insert the data in JDBC receiver
hi Team,
Please help me i am working on IDOC - JDBC interface i am not able to insert data into the table.
error says that table doesn't exists, but if i check in the database the table exists..
below is the error getting triggered.
could not execute statement for table/stored proc."A_PORDER_REG"(structure " STATEMENT") due to
java.sql.SQLException: ORA - 00942 table does not exist
Thanks & Regards,
Vishnu vardhan.Might be u have given table name is diffarent, table name must be match in table field of jdbc receiver structure and table name of data base tables.both places u must give the same table names . this is one reason another one u might be given jdbc structure is wrong. u must specify jdbc structure like this.
STATEMENT
TEST
action(attribute) (action u specify as INSERT)
TABLE( here u give the table name )
access ( below u write the fields)
and one more is u check the receiver communication channel in that u check properly u have given jdbc drivers, connections , user name and pass word.
check all those things definatly u wil find the error. -
Not able to get data while executing in background for mb52
Dear all,
my requirement is i want to schedule the zreport for every 1 hour.but proble is when iam executing in fore ground iam able to get data.but when iam going to scheduling this iam not able to get data.
my code is
type-pools:slis.
data zbudat type RANGE OF budat.
data wab like line of zbudat.
data zmatkl type RANGE OF MATKL.
data waz like line of zMATKL.
data zwerks type RANGE OF werks.
data wax like line of zwerks.
waz-sign = 'I'.
waz-low = 'CRUDE'.
waz-option = 'EQ'.
append waz to zmatkl.
clear waz.
waz-sign = 'I'.
waz-low = 'SGO'.
waz-option = 'EQ'.
append waz to zmatkl.
clear waz.
*waz-sign = 'I'.
*waz-low = 'FINES'.
*waz-option = 'EQ'.
*append waz to zmatkl.
*clear waz.
*waz-sign = 'I'.
*waz-low = 'LUMPS'.
*waz-option = 'EQ'.
*append waz to zmatkl.
*clear waz.
*waz-sign = 'I'.
*waz-low = 'UFO'.
*waz-option = 'EQ'.
*append waz to zmatkl.
wax-sign = 'I'.
wax-low = 'BIMI'.
wax-option = 'EQ'.
append wax to zwerks.
clear wax.
wax-sign = 'I'.
wax-low = 'BIPL'.
wax-option = 'EQ'.
append wax to zwerks.
*waz-sign = 'I'.
waz-low = 'C'.
*waz-option = 'CP'.
*append waz to zmatnr.
*clear waz.
*waz-sign = 'I'.
waz-low = 'S'.
*waz-option = 'CP'.
*append waz to zmatnr.
*clear waz.
*waz-sign = 'I'.
waz-low = 'UC'.
*waz-option = 'CP'.
*append waz to zmatnr.
*waz-sign = 'I'.
waz-low = 'F'.
*waz-option = 'CP'.
*append waz to zmatnr.
*clear waz.
*waz-sign = 'I'.
waz-low = 'L'.
*waz-option = 'CP'.
*append waz to zmatnr.
types:begin of w_tab,
bwkey type werks_d,
matnr type matnr,
lgort type LGORT_D,
budat type budat,
labst type labst,
endmenge type p decimals 3,
end of w_tab.
DATA : IT_TAB TYPE STANDARD TABLE OF W_TAB WITH HEADER LINE .
FIELD-SYMBOLS: <gt_fieldcat> TYPE slis_fieldcat_alv,
<gt_report_list> TYPE w_tab .
field-symbols <lt_pay_data> type any table.
*FIELD-SYMBOLS : <LT_DATA> LIKE LINE OF IT_TAB .
FIELD-SYMBOLS : <LT_DATA> type any . " i have chaged it
data lr_pay_data type ref to data.
cl_salv_bs_runtime_info=>set( exporting display = abap_false
metadata = abap_false
data = abap_true ).
****SUBMIT ZQM_GR_BARGE_LOADING WITH S_date in zbudat with s_werks in zwerks with p_pend = ' ' AND RETURN .
submit RM07MLBS with MATKLA in zmatkl with werks in zwerks
"with XVBST = 'X'
using selection-SCREEN '1000' and return.
try.
cl_salv_bs_runtime_info=>get_data_ref( importing r_data = lr_pay_data ).
assign lr_pay_data->* to <lt_pay_data>.
catch cx_salv_bs_sc_runtime_info.
message `Unable to retrieve ALV data` type 'E'.
endtry.
cl_salv_bs_runtime_info=>clear_all( ).
data: obj_s type ref to ZKMINCO_MINESTOCKFROM_SAP_OUT.
create OBJECT obj_s.
data : output TYPE ZKMINMINESTOCKFROM_SAP1 ,
record type ZKMINMINESTOCKFROM_SAP_REC_TAB ,
wa_record like line of record.
LOOP AT <lt_pay_data> ASSIGNING <LT_DATA>.
MOVE-CORRESPONDING <LT_DATA> TO IT_TAB .
APPEND IT_TAB .
wa_record-STOCK_AS_ON_DATE = sy-datum .
wa_record-STOCK_AS_ON_TIME = sy-uzeit .
wa_record-PLANT_ID = it_tab-bwkey.
wa_record-STORAGE_LOC_ID = it_tab-lgort .
wa_record-MATERIAL = it_tab-matnr .
wa_record-STOCK_QTY = it_tab-labst.
append wa_record to record.
clear wa_record.
endloop.
output-MINESTOCKFROM_SAP-record = record .
CALL METHOD obj_s->MINESTOCKFROM_SAP_OUT
EXPORTING
output = output .
commit work.
Thanks in advance.Hi,
I assume that in your case you have two program lets say ZFOREGROUND and ZBACKGROUND (Called inside zforeground using submit statement)
zforeground has :
1. a input field to browse excel sheet or some file at the selection screen, and
2. button 'post all' to determine the background processing.
Now your requirement is such that you want zbackground to get scheduled as background job when post all button is clicked.
So, within the event AT USER-Command, check the sy-ucomm as that of post all button, if so write the following code to schedule the job:
DATA: jobname LIKE tbtcjob-jobname.
DATA :jobcount LIKE tbtcjob-jobcount,
host LIKE msxxlist-host.
DATA: BEGIN OF starttime.
INCLUDE STRUCTURE tbtcstrt.
DATA: END OF starttime.
DATA: starttimeimmediate LIKE btch0000-char1.
DATA: gv_job_dt TYPE sy-datum,
gv_job_tm TYPE sy-uzeit.
jobname = 'EXCLUSION_LISTING'.
gv_job_dt = sy-datum.
gv_job_tm = sy-uzeit.
Job open
CALL FUNCTION 'JOB_OPEN'
EXPORTING
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
IF sy-subrc NE 0.
"error processing
ENDIF.
Insert process into job
SUBMIT ZBACKGROUND AND RETURN
WITH p_file1 = gv_file_cust_exc "<----
Parameters which you want to pass to report zbackground from the report
WITH p_file2 = gv_file_win_deal "------zforeground
USER sy-uname
VIA JOB jobname
NUMBER jobcount.
IF sy-subrc ne 0.
"error processing
ENDIF.
Close job
starttime-sdlstrtdt = gv_job_dt.
starttime-sdlstrttm = gv_job_tm.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
EXCEPTIONS
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
OTHERS = 99.
IF sy-subrc EQ 0.
WRITE:/1 'JOB' COLOR 3,
jobname COLOR COL_GROUP,
'Scheduled in Background' COLOR 3. "error processing
gv_time = starttime-sdlstrttm.
gv_date = starttime-sdlstrtdt.
ENDIF.
Above code will schedule the report zbackground in background.
Note:
the program schduled in background will not be able to access any data present on your presentation server. data should be provided either by the program schhedulling it in foreground or it has to be thr in application server.
Regards,
Ravi -
Select data from database via XML
I want to select data for display and insert data to tables via XML, and I want
to do this from a browser.
I am using "Oracle8i Enterprise Edition Release 8.1.7.4.0" on HP-UX server
with "JServer Release 8.1.7.4.0.".
The oracle documentation says I need the following in order to do this.
1. XML-SQL Utility
2. XML Parser for Java, V2
3. JDBC driver
4. JDK
5. A Java compliant web server
6. XSL Servlet
How do I verify, if the above software list is available in my environment.
What are all available within the database and what are other software I need to
install.
Thanks
PushparajIt's a classpath problem. Either you mistyped the class name, or you don't have the class in your classpath. I think Oracle's drivers come in db12.zip or db12.jar or some such. Whatever that jar or zip file is, it has to be in your classpath, but it's not.
Or it is in your classpath, but you're in an appserver context where the classloader that the container provides for your app uses something other than the classpath variable. For instance, in tomcat, the jar file would be uder webapps/yourApplication/WEB-INF/lib I think. -
Not able to download image from database
not able to download image from database am in jdeveloper 11g release 2 am using this example
: http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
hi am not able to down load my image my jsp xml is
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document title="sms4200.jspx" id="d1">
<af:messages id="m1"/>
<af:form id="f1" usesUpload="true">
<af:panelStretchLayout topHeight="211px" id="psl1" inlineStyle="width:1338px; background-color:Navy;">
<f:facet name="top">
<af:panelHeader text="Sms Intergration Sources" id="ph1">
<f:facet name="context"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
<f:facet name="legend"/>
<f:facet name="info"/>
<af:panelStretchLayout id="psl2" inlineStyle="height:178px; width:1018px;" topHeight="22px"
endWidth="589px" startWidth="55px" bottomHeight="33px">
<f:facet name="end">
<af:panelHeader text="Office" id="ph2"
inlineStyle="width:900px; background-color:Navy;">
<f:facet name="context"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
<f:facet name="legend"/>
<f:facet name="info"/>
<af:panelFormLayout id="pfl3" inlineStyle="background-color:Navy;" rows="1">
<f:facet name="footer"/>
<af:inputText label="#{bindings.Name1.hints.label}"
required="#{bindings.Name1.hints.mandatory}"
columns="20"
maximumLength="#{bindings.Name1.hints.precision}"
shortDesc="#{bindings.Name1.hints.tooltip}" id="it2">
<f:validator binding="#{bindings.Name1.validator}"/>
</af:inputText>
<af:inputText
label="#{bindings.LocalUpDirectory1.hints.label}"
required="#{bindings.LocalUpDirectory1.hints.mandatory}"
columns="20"
maximumLength="#{bindings.LocalUpDirectory1.hints.precision}"
shortDesc="#{bindings.LocalUpDirectory1.hints.tooltip}"
id="it3">
<f:validator binding="#{bindings.LocalUpDirectory1.validator}"/>
</af:inputText>
</af:panelFormLayout>
</af:panelHeader>
</f:facet>
<f:facet name="top">
<af:inputText value="#{bindings.IntegrationTypeName1.inputValue}"
label="#{bindings.IntegrationTypeName1.hints.label}"
required="#{bindings.IntegrationTypeName1.hints.mandatory}"
columns="#{bindings.IntegrationTypeName1.hints.displayWidth}"
maximumLength="#{bindings.IntegrationTypeName1.hints.precision}"
shortDesc="#{bindings.IntegrationTypeName1.hints.tooltip}" id="it1">
<f:validator binding="#{bindings.IntegrationTypeName1.validator}"/>
</af:inputText>
</f:facet>
</af:panelStretchLayout>
</af:panelHeader>
</f:facet>
<f:facet name="center">
<!-- id="af_one_column_header_stretched" -->
<af:decorativeBox theme="dark" id="db1" inlineStyle="width:1050px; background-color:Navy;">
<f:facet name="center">
<af:panelGroupLayout layout="scroll" id="pgl3" inlineStyle="background-color:Navy;">
<af:panelStretchLayout id="psl3" inlineStyle="width:1012px; height:502px;"
topHeight="133px" startWidth="0px">
<f:facet name="center">
<af:panelStretchLayout id="psl5" endWidth="659px" startWidth="171px">
<f:facet name="center"/>
<f:facet name="start"/>
<f:facet name="end">
<af:panelGroupLayout layout="scroll" id="pgl2">
<af:inputFile label="Select Image" id="if1" autoSubmit="true"
valueChangeListener="#{ImageBean.uploadFileValueChangeEvent}"/>
<af:commandButton actionListener="#{bindings.CreateInsert.execute}"
text="Restart Load Image Process"
disabled="#{!bindings.CreateInsert.enabled}"
id="cb2"/>
<af:commandButton actionListener="#{bindings.Commit.execute}"
text="Save"
disabled="#{!bindings.Commit.enabled}"
id="cb3"/>
<af:commandButton text="View" id="cb1"
partialSubmit="true"
unsecure="#{ImageBean.downloadButton}"
action="#{image.downloadImage}"
binding="#{image2.downloadButton}"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="top"/>
</af:panelStretchLayout>
</f:facet>
<f:facet name="start"/>
<f:facet name="top">
<af:panelStretchLayout id="psl4" startWidth="232px" endWidth="296px"
bottomHeight="18px" topHeight="11px">
<f:facet name="bottom"/>
<f:facet name="center"/>
<f:facet name="start">
<af:panelFormLayout id="pfl1" labelAlignment="top">
<f:facet name="footer"/>
<af:inputText label="File from PC to be Transfered" id="it4"/>
</af:panelFormLayout>
</f:facet>
<f:facet name="end">
<af:panelFormLayout id="pfl2" labelAlignment="top" maxColumns="10">
<f:facet name="footer">
<af:inputText value="#{bindings.DocumentName.inputValue}"
label="File Transfered to Database"
required="#{bindings.DocumentName.hints.mandatory}"
columns="50"
rows="1"
maximumLength="#{bindings.DocumentName.hints.precision}"
shortDesc="#{bindings.DocumentName.hints.tooltip}"
id="it5" simple="false">
<f:validator binding="#{bindings.DocumentName.validator}"/>
</af:inputText>
</f:facet>
</af:panelFormLayout>
</f:facet>
<f:facet name="top"/>
</af:panelStretchLayout>
</f:facet>
</af:panelStretchLayout>
</af:panelGroupLayout>
</f:facet>
</af:decorativeBox>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
and my log file is
<ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
the method am calling is
public BlobDomain downloadImage() {
FacesContext facesContext = null;
OutputStream outputStream = null;
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
// get an ADF attributevalue from the ADF page definitions
AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Documentimage");
if (attr == null) {
return null;
// the value is a BlobDomain data type
BlobDomain blob = (BlobDomain)attr.getInputValue();
try { // copy hte data from the BlobDomain to the output stream
IOUtils.copy(blob.getInputStream(), outputStream);
// cloase the blob to release the recources
blob.closeInputStream();
// flush the outout stream
outputStream.flush();
} catch (IOException e) {
// handle errors
e.printStackTrace();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
FacesContext.getCurrentInstance().addMessage(null, msg);
return blob;
}i get this error when clicking the button
error when not able to download image
<BeanHandler> <getStructure> Failed to build StructureDefinition for : sms4200.ImageBean
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
Edited by: Tshifhiwa on 2012/06/03 10:53 AM
Edited by: Tshifhiwa on 2012/06/03 10:56 AM
Edited by: Tshifhiwa on 2012/06/03 10:57 AMhi i try to run your sample am geting this error
Error 500--Internal Server Error
oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/HRDS
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1453)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8972)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:487)
at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
at oracle.adf.model.BindingContext.put(BindingContext.java:1318)
at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:247)
at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1020)
at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1645)
at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1514)
at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1474)
at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1150)
at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2748)
at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2796)
at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1478)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1608)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2542)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2477)
at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:3319)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.fetchAttrDefs(JUCtrlValueBinding.java:514)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs(JUCtrlValueBinding.java:465)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:541)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:531)
at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.(JUCtrlValueBinding.java:4104)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeHintsMap(JUCtrlValueBinding.java:4211)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHints(JUCtrlValueBinding.java:2564)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2389)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:275)
at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
at javax.el.MapELResolver.getValue(MapELResolver.java:164)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.getLabel(LabelLayoutRenderer.java:929)
at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:213)
at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.access$400(RegionRenderer.java:50)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:707)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:692)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:297)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:186)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:323)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jdbc.HRDS' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/HRDS'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1439)
... 190 more
my connection.xml is
<?xml version = '1.0' encoding = 'UTF-8'?>
<References xmlns="http://xmlns.oracle.com/adf/jndi">
<Reference name="HRDS" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="HRDS" xmlns="">
<Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
<RefAddresses>
<StringRefAddr addrType="sid">
<Contents>smsdev</Contents>
</StringRefAddr>
<StringRefAddr addrType="subtype">
<Contents>oraJDBC</Contents>
</StringRefAddr>
<StringRefAddr addrType="port">
<Contents>1521</Contents>
</StringRefAddr>
<StringRefAddr addrType="hostname">
<Contents>localhost</Contents>
</StringRefAddr>
<StringRefAddr addrType="user">
<Contents>hr</Contents>
</StringRefAddr>
<SecureRefAddr addrType="password"/>
<StringRefAddr addrType="oraDriverType">
<Contents>thin</Contents>
</StringRefAddr>
</RefAddresses>
</Reference>
</References>
Edited by: Tshifhiwa on 2012/06/04 2:20 PM -
Enterprise Manager is not able to connect to the database instance. The sta
Enterprise Manager is not able to connect to the database instance. The state of the components are listed below.
Listener is shown as unavailable.
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-NOV-2012 11:52:40
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=freds-server.i-surname.co.uk)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 27-NOV-2012 11:50:02
Uptime 0 days 0 hr. 2 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/11g/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/freds-server/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=freds-server)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=freds-server)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "GWORCL.i-surname.co.uk" has 2 instance(s).
Instance "GWORCL", status UNKNOWN, has 1 handler(s) for this service...
Instance "GWORCL", status READY, has 1 handler(s) for this service...
Service "GWORCLXDB.i-status.co.uk" has 1 instance(s).
Instance "GWORCL", status READY, has 1 handler(s) for this service...
The command completed successfully
I suspect that this is not just an OEM issue.
see
Listener working but not working for Enterprise manager oracle 11gr2 Linux.
for configuration files
Edited by: Neill_R on Nov 27, 2012 11:51 AMThis was solved by : Osama_mustafa
in the general questions forum
emca -deconfig dbcontrol db -repos drop
emca -config dbcontrol db -repos create -
Problem: Enterprise Manager is not able to connect to the database instance
Hello,
I've got problem with EM. When I try to connect to it I get the following error:
Enterprise Manager is not able to connect to the database instance. The state of the components are listed below.
Database Instance, Listener and Agent are all green.
Few more information:
OS: Win7 64 bit
-installed loopback adapter. I can ping my computer name (J-PC) without problem and it pings back 10.10.10.10 address.
-I have set the ORACLE_HOME and ORACLE_SID env variables
-I can login to sqlplus with sysman account
-emctl status dbconsole shows that the EM 11g is running
I've been struggling for some time trying to get EM running as it should, but no luck so far.
If you need any more info, do ask. Tnx.Hi,
Regarding causes:
1. This is inside listener.ora file:
SID_LIST_LISTENER =
+(SID_LIST =+
+(SID_DESC =+
+(SID_NAME = CLRExtProc)+
+(ORACLE_HOME = C:\app\J\product\11.2.0\dbhome_1)+
+(PROGRAM = extproc)+
+(ENVS = "EXTPROC_DLLS=ONLY:C:\app\J\product\11.2.0\dbhome_1\bin\oraclr11.dll")+
+)+
+)+
LISTENER =
+(DESCRIPTION_LIST =+
+(DESCRIPTION =+
+(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))+
+(ADDRESS = (PROTOCOL = TCP)(HOST = J-PC)(PORT = 1521))+
+)+
+)+
ADR_BASE_LISTENER = C:\app\J
...and this is examples of errors in emoms.trc:
+2012-05-25 00:29:28,782 [HTTPThreadGroup-49] ERROR conn.ConnectionService verifyRepositoryEx.891 - Invalid Connection Pool. ERROR = Locale not recognized+
+2012-05-25 00:29:28,798 [HTTPThreadGroup-49] ERROR eml.OMSHandshake processFailure.806 - OMSHandshake failed.(AGENT URL = http://J-PC:3938/emd/main)(ERROR = INTERNAL_ERROR)(CAUSE =java.sql.SQLException: Locale not recognized)+
+2012-05-25 00:29:28,860 [HTTPThreadGroup-49] ERROR conn.ConnectionService verifyRepositoryEx.891 - Invalid Connection Pool. ERROR = Locale not recognized+
+2012-05-25 00:29:28,872 [HTTPThreadGroup-49] ERROR eml.OMSHandshake processFailure.806 - OMSHandshake failed.(AGENT URL = http://J-PC:3938/emd/main)(ERROR = INTERNAL_ERROR)(CAUSE =java.sql.SQLException: Locale not recognized)+
+2012-05-25 00:29:40,908 [HTTPThreadGroup-49] ERROR conn.ConnectionService verifyRepositoryEx.891 - Invalid Connection Pool. ERROR = Locale not recognized+
+2012-05-25 00:29:40,924 [HTTPThreadGroup-49] ERROR eml.OMSHandshake processFailure.806 - OMSHandshake failed.(AGENT URL = http://J-PC:3938/emd/main)(ERROR = INTERNAL_ERROR)(CAUSE =java.sql.SQLException: Locale not recognized)+
+2012-05-25 00:29:52,811 [SystemThreadGroup-8] ERROR app.SessionObjectManager sessionDestroyed.128 - java.sql.SQLException: Locale not recognized+
java.sql.SQLException: Locale not recognized
2.
Running lsnrctl status:
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 25-MAY-2012 07:54:17
Uptime 0 days 0 hr. 21 min. 25 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\J\product\11.2.0\dbhome_1\network\admin\listene
r.ora
Listener Log File c:\app\j\diag\tnslsnr\J-PC\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=J-PC)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
Tnx for the help. -
Error inserting data into database
Hello I am having error inserting data into database through a servlet.Please I am very new to Java Technology and need your immediate help. beloww is the codea nd the error
Apache Tomcat/4.0.3
ERROR: Problems with adding new entry
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2525)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at Register.insertIntoDB(Register.java:71)
at Register.doPost(Register.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
COde:
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
public class Register extends HttpServlet
public static Statement statement;
private Connection DBConn;
public void init(ServletConfig config) throws ServletException
super.init(config);
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
DBConn=DriverManager.getConnection("jdbc:odbc:Challenge");
catch(Exception e) {
e.printStackTrace();
DBConn=null;
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
String user_id,FirstName,LastName, Email, Login, Password;
FirstName = req.getParameter("FirstName");
LastName = req.getParameter("LastName");
Email = req.getParameter("Email");
Login = req.getParameter("Login");
Password = req.getParameter("Password");
PrintWriter output = res.getWriter();
res.setContentType("text/html");
if (user_id.equals("")||
FirstName.equals("") ||
LastName.equals("") ||
Email.equals("") ||
Login.equals("") ||
Password.equals(""))
output.println("<H3>Please click back " + "button and fill in all " + "fileds.</H3>");
output.close();
return;
boolean success = insertIntoDB("'" + FirstName + "','" + LastName + "','" + Email + "','" + Login + "','" + Password + "'");
if (success)
output.print("<H2>Thank You " + FirstName + " for registering.</H2>");
res.sendRedirect("file:///Register.html");
else
output.print("<H2>An error occured. " + "Please try again later.</H2>");
output.close();
private boolean insertIntoDB(String stringtoinsert)
try
statement = DBConn.createStatement();
statement.execute("INSERT INTO Users(user_id,FirstName,LastName,Email,Login,Password) values (" + stringtoinsert + ");");
statement.close();
catch (Exception e)
System.err.println("ERROR: Problems with adding new entry");
e.printStackTrace();
return false;
return true;
public void destroy()
try
DBConn.close();
catch(Exception e)
System.err.println("Problem closing the database");
Your Help will be very much appreciate.I am using SQL Server databaseThe error concerns these two lines:
boolean success = insertIntoDB("'" + FirstName + "','" + LastName + "','" + Email + "','" + Login + "','" + Password + "'");
statement.execute("INSERT INTO Users(user_id,FirstName,LastName,Email,Login,Password) values (" + stringtoinsert + ");");
In the first line above, you have a string which represents the VALUES which you are inserting. There are 5 values. However in the second line above this is your actual SQL execution you are specifying 6 columns of data. If the column "user_id" is an identity or auto-incrementing field in the database, just remove it from this line. If not then you need to supply the "UserID" into the VALUES.
This should fix the problem. -
Not able to open data file in a rule file
Hi,
We have a rule file which has 140 columns. We are trying to add two new columns at the end (i.e. 141 & 142). We have added those columns in input text file and opened that text file in rule file. So automatically two columns are added at the end of rule file. Mapping is done properly. After that we saved that rule file.
But next time when we opened that rule file and clicked "Open data file" option nothing is happening. We are not able to open data file in that rule file. But that rule file is working fine when we are running it.
Can you please give any hint why it is not working?
Thanks.Just a thought about your data file -- maybe 142 columns is too much? Yes, I know, if this is loading to a BSO database, and the columns represent a dense dimension, you are super duper efficient, but is the game worth the candle?
What happens if you drop one of the members? Mark the column as Ignore During Data Load? Several columns? And then you need to add in new ones? KABOOM!
FWIW, to keep the process as flexible and maintenance free as possible, I make every record one data value if I have any say in the matter. Yes, it is not efficient. But at least I don't get calls at o-dark-thirty telling me my process blew up and I need to fix it right away.
NB -- I suppose these are two extremes and the right answer is somewhere in middle, but I will note that you likely won't have issues with reading and writing a data load rule with my approach.
Regards,
Cameron Lackpour -
Not able to select data using DB link.
Hi ,
I have created the database link in oracle 8.1.7.0.0 to oracle 8.1.7.4.0
But I am not able to select data using DB link.
The error is = ORA 12154 : TNS: could not resolve service name.
I have created the DB link with the same command in oracle 9.2.0.4.0 to oracle 8.1.7.4.0. I can select data using this link.
Please suggest me the solution.
Thanks,
ShaileshIf the service name is different on the 8i machine than on the 9i machine, you'll need to modify the service name when creating the link from 8i. Can you see the DB link in ALL_DB_LINKS in the 8i database?
-
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH
Hi,
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH?
Thanksemekaco wrote:
Hi,
HOW DO I STOP MY JSP PAGE FROM INSERTING DATA IN DATABASE EACH TIME REFRESH?
ThanksSTOP SHOUTING!
now, while displaying the form generate some random number, or take the current time in millis or whatever. Put that number in a hidden field. Insert that unique number along with the real data into the database, but before you do check if the number already exists. If it does you can be pretty sure this is a resubmit of the same data, so don't allow it. This is one way of many to prevent resubmission of existing data.
A good way to prevent a refresh from resubmitting altogether is to do a redirect to a result page right after you deal with the POST request. When the user presses refresh then, he/she will refresh the redirect and not the form submit. -
Not able to View data in .CSV file
Hi,
I am using some java script to display data conditionall, for color coding purpose but when i try to download the data to an spread sheet i am not able to do that please suggest me how to export fix this bug
select
case
TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2)
= :P15_EV_LCLthen
'<span style="background-color:lightgreen">'|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || '</span>'
else
'<span style="background-color:red">'|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || '</span>'
end "Effort"
from actuals Z
If i try to extract actuals it shows blank not able to extract data please suggest me how to fix this issue.
Thanks
SudhirHi,
I have no problem with item :P15_EV_LCL this is having a value my probem here is i am using java script to display the value in different color based on the condtion case
eg:
select
case
TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2)
= :P15_EV_LCL
then
span style="background-color:lightgreen"
|| TRUNC((
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
else
span style="background-color:yellow"
|| TRUNC(
( (NVL(Z."AEWP",0) - NVL(Z."BEWP_Final",0) ) / DECODE(Z."BEWP_Final",0,NULL,Z."BEWP_Final") ) * 100
),2) || '%' || /span
end "Effort"
from actuals Z
If i dont use this <Span style="Background-color:color"> i am able to generate data in excel sheet if i use this color coding i am not able to get data in spread sheet.
Please suggest
Thanks
Sudhir
Edited by: Sudhir_N on Mar 23, 2009 10:00 PM
Maybe you are looking for
-
How do I add an existing account to a team account?
I subscribed to CreativeCloud as a freelancer. Now I have an empoloyee and I wish to move to a team account and add my existing account into it. Can I do that?
-
ZSD_TABLE is not defined in the ABAP dictionary as a table"
Hello, I created zsd_table and inserted few records When i use this table in program system is giving error message "ZSD_TABLE is not defined in the ABAP dictionary as a table" How can we define this table in ABAP dictionary? Thanks
-
How do I locate RAW files to export from a managed library?
I have a decade's worth of managed Aperture libraries. The majority of the Masters are jpeg files but at least 30% of the originals are raw files. I am wanting to change to a referenced library structure which is accessible from other applications. C
-
I have PSE 7 it has stopped lauching - Why? I've had it for years and no problem with it. I have tried all round about ways to launch it (like rt clicking a jpeg and saying for PSE 7 to edit it) nothing works. I've gone directly to the shortcuts targ
-
Hi All, We have this situation in our project. Our client has already performed an Init and deltas running for it for the past one year or so. Now we have designed objects for the further reports which they needed. We performed an init for that again