Exception in fiel
hi ,
am getting a null pointer exception in the code,
actually i have a large set of data in my file as
18.0909 1
19.0872 2
i am reading the file and tryin to extract the data in two arrays as float and integer,
am getting exception
caan you help me to solve that ....
try{
FileReader fread = new FileReader("DIS.txt");
BufferedReader bread = new BufferedReader(fread);
int i=0;
int k=0;
do{
text = bread.readLine();
value = text.split("\\s"); // null pointer exception @ this line
fvalue[i] = Float.parseFloat(value[0]);
System.out.println("float value :"+fvalue);
ivalue[k] = Integer.parseInt(value[1]);
System.out.println("int value :"+ivalue[k]);
i++;
k++;
}while(text !=null);
am getting a null pointer exception in the codeThis is because text , thatis the result of bread.readLine();, is null.
You must test if text is null immediately after the bread.readLine() or anyway before text is used, and if null, exit the do loop. Some rewriting of the code might do good.
Message was edited by: java_knight
Similar Messages
-
SEM BSC - Exception while mapping value fiels to datasource
Hi All,
I am facing an Exception error while trying to get the value field mapped with Datasource by clicking the "Refresh Data Sources" in Value field tab of Measure definition of the Balance scorecard.
The Exception is :
An exception with the type
CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was
neither handled locally, nor declared in a RAISING
clause
The SEM used is in Netweaver 2004s.
This exception is not allowing me to restrict values for perticular Characterstics values.Hi Marta,
Your Answer gives some idea about the Exception.
My SEM-BW release is 600 with no support package.
Whereas the BW is 700 with SP 14.
In SEM the Balance scorecard runs fine in SEM-BW release 400 but while dual coding the same in upgraded systemSEM-BW 600 this exceptions occures.
This doesn't allow me to mapp the value field with the Datsource which is query, checked to act as datasource.
Please help me out . -
Hi all,
I am new to ABAP Development. I need to upload a .DAT file (the file doesn#t have any proper structure-- Please find the .DAT file in the attachment). After uploading the DATA (.DAT) fiel I need to split in into different columns. Refering the attached .DAT fiel the fields in bracets like:
[Arbeitstag], [Pecunia], [Mita], [Kunde], [Auftrag] and [Position] are different fields that need to be arranged in columns in an internal table. this .DAT fiel which I want to upload and then SPLIT it into various fields will will treated as MASTER DATA table for further programming. The program that I had written is as below. Also please refer the attached .DAT table.
Please if any one could help me. i searched a lot in different forums but couldn't find me a solution. Also note that the attached fiel is in text (.txt) format here but in real situation the same fiel is in DATA (.DAT) format.
*& Report ZDEMO_ZEITERFASSUNG9
REPORT ZDEMO_ZEITERFASSUNG9.
Types: Begin of ttab,
Rec(1000) type c,
End of ttab.
DATA: itab type table of ttab.
DATA: wa_tab type ttab.
DATA: file_str type string.
Parameters: p_file type localfile.
At selection-screen on value-request for p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
* PROGRAM_NAME = SYST-REPID
* DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
STATIC = 'X'
* MASK = ' '
CHANGING
file_name = p_file.
* EXCEPTIONS
* MASK_TOO_LONG = 1
* OTHERS = 2
Start-of-Selection.
file_str = P_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\BUP_ZEIT.DAT' " This the file source address
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = ';'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
tables
data_tab = itab
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP at itab into wa_tab.
WRITE: / wa_tab.
ENDLOOP.
I will be grateful to all you experts for ur inputs
regards
Chandan SinghFor every Auftrag, there are multiple Position entries.
Rest of the blocks don't seems to have any relation.
So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
Try out this snippet.
DATA lt_data TYPE TABLE OF string.
DATA lv_data TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'C:\temp\test.txt'
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 19.
CHECK sy-subrc EQ 0.
TYPES:
BEGIN OF ty_str,
a1 TYPE string,
a2 TYPE string,
a3 TYPE string,
p1 TYPE string,
p2 TYPE string,
p3 TYPE string,
END OF ty_str.
DATA: lt_str TYPE TABLE OF ty_str,
ls_str TYPE ty_str,
lv_block TYPE string,
lv_flag TYPE boolean.
LOOP AT lt_data INTO lv_data.
CASE lv_data.
WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
lv_block = lv_data.
lv_flag = abap_false.
WHEN OTHERS.
lv_flag = abap_true.
ENDCASE.
CHECK lv_flag EQ abap_true.
CASE lv_block.
WHEN '[Auftrag]'.
SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
WHEN '[Position]'.
SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
APPEND ls_str TO lt_str.
ENDCASE.
ENDLOOP. -
How to get a fiel name structure ...
I have an internel table, which I read it through loop at it ... endloop.
Let us suppose that estrucutra is composing of the following fields:
data begin of ti,
field1,
field2,
end of ti.
And then, when I process the loop at ti ...: I need to get the fiel name of stucture it in process ( ex. field1, or field2),
but not the content. I need the fiel name of ti, because it is the key for to read another table internal.
the certain thing, is that I have that structure ti defined in se11.-
Can somebody help me, please !!!
Thank you so much,
Esther.Hi
You can use the FM 'REUSE_ALV_FIELDCATALOG_MERGE'.
Pass your internal table structure.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME =
I_STRUCTURE_NAME = 'KKB_PLANWERTE'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
CHANGING
CT_FIELDCAT = RT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
Catalog will be populated with the attributes of the internal table.
Loop at rt_fieldcat.
write:/ tr_fieldcat-fieldname .
Endloop.
Regards
Navneet
Message was edited by:
Navneet Saraogi -
0x80020009 Exception occured? ASP/VB and MSSQL
Hi. I have a two-menu form on an asp page that posts to a
second page. On
the second page I have a form.
Within this form are a set of blank form fields for a user to
complete.
These fields should be displayed (Show if Empty) if the user
chooses "New"
from either, or both, of the menus on my initial page. The
value of "new",
being passed to the second page, is blank:
<option value="" selected>New</option>
Also within this form, are a set of pre-filled (from
recordset) form fields,
identical to the blank form fields, but only displayed (Show
if Not Empty)
if the user makes a selection other than "New" from either,
or both, of the
menus on my intial page.
<option
value="<%=(rsRecordset.Fields.Item("orderID").Value)%>">Order
ID -
Name - City</option>
If I make a selection, other than "New", in BOTH of the menus
on my first
page, and submit the form, my second page form fields are
correctly filled -
no problem!
If, however, I select "New" from either of the menus, or
both, I get the
following:
Error Type:
(0x80020009)
Exception occurred.
/my2ndpage.asp, line 230
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
Page:
POST 42 bytes to /mypage.asp
POST Data:
orderIDpick=&orderIDdel=&Submit=Continue
I've tried inserting a "dummy" value in my "New" value (an
order ID I know
doesn't, or won't exist):
<option value="999" selected>New</option>
My thoughts being that, because I wasn't passing any value,
that was what
was causing the error, however this just gives me the
following:
Error Type:
(0x80020009)
Exception occurred.
/my2ndpage.asp, line 230
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322)
Page:
POST 42 bytes to /mypage.asp
POST Data:
orderIDpick=999&orderIDdel=999&Submit=Continue
Line 230 on my second page is:
<%
Dim rsOtherRecordset__MMColParam
rsOtherRecordset__MMColParam = "1"
230>>>>If
(rsOtherRecordset2.Fields.Item("pickupregion") <> "") Then
rsOtherRecordset__MMColParam =
rsOtherRecordset2.Fields.Item("pickupregion")
End If
%>
...this recordset is completely unrelated to the problem, I
feel, so I am
wondering if this is, really, my line 230 as is being
reported by the error
in IE?
Can anyone see what might be causing this? Would really
appreciate the
assistance. Thanks.
Regards
Nath.Hi.
If a non-existent value is passed, isn't the Recordset empty?
To me, this is just passing a form value to a results page.
If the
recordset is empty, the Show If Empty is displayed (a blank
form). If the
recordset is not empty, the Show If Not Empty is displayed (a
pre-filled
form with data taken from the recordset).
I don't understand what you're saying about setting the
values for recordset
parameters based on other recordsets?
Hoping you can help me out Lionstone as I still can't get
past the Exception
Occurred error.
Could you describe the pattern you've described in bit more
detail? I don't
fully understand what DIM does.
Hope to hear from you,
Regards
Nathon.
"Lionstone" <[email protected]> wrote in
message
news:[email protected]...
> What's happening is that you're setting the values for
recordset
> parameters based on other recordsets. If those
recordsets don't exist,
> you have a problem. When you pass a blank (or
nonexistent, like 999)
> value, the recordset is empty (closed), which is just as
good as not
> existing in the first place. What happens down on the
page with the "show
> if empty" doesn't affect what happens at the top when
the parameters
> attempt to verify against a closed recordset.
>
> Your general pattern should be:
>
> Dim Menu1ID, Menu2ID
>
> Menu1ID = Request.QueryString("Menu1")
> Menu2ID = Request.QueryString("Menu2")
>
> Get Recordset for Menu1
> Get Recordset for Menu2
>
> If NOT Menu1.EOF Then
> set menu1 parameter for third recordset
> Else
> set menu1 parameter to some default value
> End If
>
> Repeat for Menu2
>
> Get third recordset
>
>
> "Nathon Jones" <[email protected]> wrote
in message
> news:[email protected]...
>> Absolutely. Thing is though, this error is occuring
when I'm submitting
>> a value that I know doesn't exist, therefore
triggering the Show If Empty
>> on the 2nd page. Well, that was the theory anyway!
:o)
>>
>> When I make a selection from the menus, other than
"New", then it works
>> (only if I've made a selection from BOTH menu's
though! - if I make a
>> selection from one menu, and leave the other one as
"New", the "Exception
>> occured" message appears again).
>>
>> This is the form on my first page:
>>
>> <form action="my2ndpage.asp" method="post"
name="formchooseaddress">
>> <select name="orderIDpick"
class="textformfields">
>> <option value="" selected>Enter New
Address</option>
>> <%
>> While (NOT rsCustPickUps.EOF)
>> %>
>> <option
>>
value="<%=(rsCustPickUps.Fields.Item("MinorderID").Value)%>"><%=(rsCustPickUps.Fields.Ite m("pickupname").Value)%>
>> -
<%=(rsCustPickUps.Fields.Item("pickupcity").Value)%>,
>>
<%=(rsCustPickUps.Fields.Item("pickuppostcode").Value)%></option>
>> <%
>> rsCustPickUps.MoveNext()
>> Wend
>> If (rsCustPickUps.CursorType > 0) Then
>> rsCustPickUps.MoveFirst
>> Else
>> rsCustPickUps.Requery
>> End If
>> %>
>> </select>
>> <select name="orderIDdel" class="textformfields"
>
>> <option value="" selected>Enter New
Address</option>
>> <%
>> While (NOT rsCustDeliverAdd.EOF)
>> %>
>> <option
>>
value="<%=(rsCustDeliverAdd.Fields.Item("MinorderID").Value)%>"><%=(rsCustDeliverAdd.Fiel ds.Item("delivername").Value)%>
>> -
<%=(rsCustDeliverAdd.Fields.Item("delivercity").Value)%>,
>>
<%=(rsCustDeliverAdd.Fields.Item("deliverpostcode").Value)%></option>
>> <%
>> rsCustDeliverAdd.MoveNext()
>> Wend
>> If (rsCustDeliverAdd.CursorType > 0) Then
>> rsCustDeliverAdd.MoveFirst
>> Else
>> rsCustDeliverAdd.Requery
>> End If
>> %>
>> </select>
>> <input name="Submit" type="submit"
value="Continue" />
>>
>> Seems pretty straightforward to me, AND it works if
I make two
>> selections.
>> Like I say though, I've tried entering this:
>> <option value="999" selected>Enter New
Address</option>
>> and also:
>> <option selected>Enter New
Address</option>
>>
>> ..to try to trigger the Show If Empty (because I
know there is no order
>> 999 or blank order ID).
>>
>> Considering that it works when selections are made,
would I be safe to
>> assume that the problem is most likely to be on the
2nd page, not in what
>> is being passed by the first?
>>
>> The code on my second page is HUGE, but if it would
help I am happy to
>> e-mail it to you.
>>
>> Really appreciate this again Lionstone. Thanks also
for the links to the
>> SQL tutorials.
>> Regards
>> Nath.
>>
>>
>>
>>
>>
>> "Lionstone" <[email protected]>
wrote in message
>> news:[email protected]...
>>> Are you certain that the other recordset exists
and has records?
>>>
>>> "Nathon Jones"
<[email protected]> wrote in message
>>> news:[email protected]...
>>>> Hi. I have a two-menu form on an asp page
that posts to a second page.
>>>> On the second page I have a form.
>>>> Within this form are a set of blank form
fields for a user to complete.
>>>> These fields should be displayed (Show if
Empty) if the user chooses
>>>> "New" from either, or both, of the menus on
my initial page. The value
>>>> of "new", being passed to the second page,
is blank:
>>>> <option value=""
selected>New</option>
>>>>
>>>> Also within this form, are a set of
pre-filled (from recordset) form
>>>> fields, identical to the blank form fields,
but only displayed (Show if
>>>> Not Empty) if the user makes a selection
other than "New" from either,
>>>> or both, of the menus on my intial page.
>>>> <option
value="<%=(rsRecordset.Fields.Item("orderID").Value)%>">Order
>>>> ID - Name - City</option>
>>>>
>>>> If I make a selection, other than "New", in
BOTH of the menus on my
>>>> first page, and submit the form, my second
page form fields are
>>>> correctly filled - no problem!
>>>> If, however, I select "New" from either of
the menus, or both, I get
>>>> the following:
>>>>
>>>> Error Type:
>>>> (0x80020009)
>>>> Exception occurred.
>>>> /my2ndpage.asp, line 230
>>>>
>>>> Browser Type:
>>>> Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; SV1; .NET CLR
>>>> 1.1.4322)
>>>> Page:
>>>> POST 42 bytes to /mypage.asp
>>>>
>>>> POST Data:
>>>>
orderIDpick=&orderIDdel=&Submit=Continue
>>>>
>>>> I've tried inserting a "dummy" value in my
"New" value (an order ID I
>>>> know doesn't, or won't exist):
>>>> <option value="999"
selected>New</option>
>>>>
>>>> My thoughts being that, because I wasn't
passing any value, that was
>>>> what was causing the error, however this
just gives me the following:
>>>>
>>>> Error Type:
>>>> (0x80020009)
>>>> Exception occurred.
>>>> /my2ndpage.asp, line 230
>>>>
>>>> Browser Type:
>>>> Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; SV1; .NET CLR
>>>> 1.1.4322)
>>>> Page:
>>>> POST 42 bytes to /mypage.asp
>>>>
>>>> POST Data:
>>>>
orderIDpick=999&orderIDdel=999&Submit=Continue
>>>>
>>>> Line 230 on my second page is:
>>>>
>>>> <%
>>>> Dim rsOtherRecordset__MMColParam
>>>> rsOtherRecordset__MMColParam = "1"
>>>> 230>>>>If
(rsOtherRecordset2.Fields.Item("pickupregion") <> "") Then
>>>> rsOtherRecordset__MMColParam =
>>>>
rsOtherRecordset2.Fields.Item("pickupregion")
>>>> End If
>>>> %>
>>>>
>>>> ...this recordset is completely unrelated to
the problem, I feel, so I
>>>> am wondering if this is, really, my line 230
as is being reported by
>>>> the error in IE?
>>>>
>>>> Can anyone see what might be causing this?
Would really appreciate the
>>>> assistance. Thanks.
>>>> Regards
>>>> Nath.
>>>>
>>>
>>>
>>
>>
>
> -
Exception in thread "main" java.lang.NoClassDefFoundError: TestInstallCreat
I am working width demo's under sqlj in Oracle 8.1.7
under windows 2000.
Here is an example of my problem:
C:\orawinnt\sqlj\demo>java TestInstallCreateTable
Exception in thread "main" java.lang.NoClassDefFoundError: TestInstallCreateTable
The program:
C:\orawinnt\sqlj\demo>type TestInstallCreateTable.java
import java.sql.*;
import oracle.sqlj.runtime.Oracle;
import sqlj.runtime.ref.DefaultContext;
class TestInstallCreateTable {
public static void main (String args[]) throws SQLException
Connection conn=null;;
PreparedStatement ps=null;
/* if you're using a non-Oracle JDBC Driver, add a call here to
DriverManager.registerDriver() to register your Driver
// set the default connection to the URL, user, and password
// specified in your connect.properties file
Oracle.connect(TestInstallCreateTable.class, "connect.properties");
conn = DefaultContext.getDefaultContext().getConnection();
try {
ps = conn.prepareStatement("DROP TABLE SALES");
ps.executeUpdate();
} catch (SQLException e) {
// it'll throw an error of the table doesn't exist in many JDBC drivers
try {
ps = conn.prepareStatement(
"CREATE TABLE SALES (" +
"ITEM_NUMBER NUMBER, " +
"ITEM_NAME CHAR(30), " +
"SALES_DATE DATE, " +
"COST NUMBER, " +
"SALES_REP_NUMBER NUMBER, " +
"SALES_REP_NAME CHAR(20))");
ps.executeUpdate();
System.out.println("SALES table created");
} catch (SQLException se) {
System.out.println("oops! can't create the sales table. error is:");
se.printStackTrace();
C:\orawinnt\sqlj\demo>
C:\orawinnt\sqlj\demo>type connect.properties
# Users should uncomment one of the following URLs or add their own.
# (If using Thin, edit as appropriate.)
sqlj.url=jdbc:oracle:thin:@172.22.50.117:1521:kemner
#sqlj.url=jdbc:oracle:oci8:@
#sqlj.url=jdbc:oracle:oci7:@
#sqlj.url=kemner
# User name and password here (edit to use different user/password)
sqlj.user=scott
sqlj.password=tiger
Here comes my CLASSPATH:
c:\jdk1.2.2\lib;c:\egneklasser;c:\orawinnt\bin;c:\orawinnt\sqlj\lib\translator.zip;c:\orawinnt\sqlj\lib\runtime12.zip;c:\orawinnt\jdbc\lib\classes12.zip;c:\orawinnt\jdbc\lib\nls_charset12.zip;c:\orawinnt\jdbc\lib\jndi.zip;c:\orawinnt\jdbc\lib\jta.zip
Have anybody solutions of my problem?Sorry to steal this thread but I'm new here and don't know yet how to open new thread. I'm getting this error too. I'm at the very start of a book titled "Teach Yourself Java" and I'm trying execute the first example. I downloaded and installed Java at
C:\Program Files\Java\jdk1.6.0_11\bin.
I set up folder C:\Java Applications and put my first fiel in there titeld Example1.java
Based an another thread here I went into Start | Control Panel | Ssystem | Advanced | Environment Variables and updated variable PATH by adding to the end of it ;C:\Program Files\Java\jdk1.6.0_11\bin.
I can now navigate to C:\Java Applications and exeute javac Example1.java and it compiles OK but when I execute java Example1.java I get the error Exception in thread "main" java.lang.NoClassDefFoundError.
I dont' know anything about the set CLASSPATH that is mentioned in this thread. Where does that go or is there something else I need? -
How do you throw attribute level exception in setter for VORowImpl
Hello All,
I am trying to perform a very basic view object extension in iProcurement. All I want to do is throw an attribute level exception (or row level...whichever I can get to work). The code runs, however, the page displays the attribute error for all rows, and, it should only be displaying it for the row that had the validation error.
I next simplified the test by extending the iProcurement view object, but, not generating any VORowImpl classes. This way, I am using only Oracle code. Same result...if I purposely enter a bad number on one row, the result when I hit the continue button is that all rows get flagged with the error.
Without the substitution, the error is displayed correctly for only the row that caused it.
Are there any known issues using OAAttrValException or OARowValException when substitution is made on a view object?SOLVED -
I found the issue.
JDeveloper Version 9.0.3.5 appears to have a 'bug' I may have found. When creating a new View Object, the key attribute(s) that are pulled in from the view object you are extending appear to all have the 'Key Attribute' checkbox checked. (View object I am extending is not based on EO objects). However, if you inspect the xml file for the new view object, you will see that the wizard did not save off the value for the key attributes in the "KeyAttributes" tag usually found at the end of the xml file, such as:
<AttrArray Name="KeyAttributes">
<Item Value="RcvTransactionId" />
</AttrArray>
You think the key attribute is set because the GUI displays the checkbox.
Closing the project and re-opening, which causes the xml fiel to be read again, will refresh the checkbox so that it is unchecked. Checking and re-saving does the trick.
Without the key attribute set, any calls to OAAttrValException with parameter getKey() break as getKey() returns null. Subsequently, the exceptions thrown to the user on the screen are improperly displayed.
Everything works great now! I just have to remember to go back and check any 'Key Attributes' on future View Object extensions. -
If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as belowFirst: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Hi,
We are getting below errors in /nwa/logs. We have our PI (7.11) and Service Registry configured on the same server. And have out CE (7.2) system connected to this service registry. Does any one has similar experience? Please let me know if you have any solution for the same.
SR Log Error
| 11-Nov-11 14:10:45.568
| Method : getClassificationSystems()
| Class : com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean
| ThreadID : 146
| Message : com.sap.esi.uddi.sr.api.exceptions.SRException: No classification system found for ID 'QName: Namespace= http://uddi.sap.com/classification; Name= ConfigurationFlags'
|
| com.sap.esi.uddi.sr.impl.common.Utility.cs2srException(Utility.java:122)
| com.sap.esi.uddi.sr.impl.ejb.ServicesRegistryBean.getClassificationSystems(ServicesRegistryBean.java:242)
| sun.reflect.GeneratedMethodAccessor1325.invoke(Unknown Source)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
| com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
| $Proxy1087.getClassificationSystems(Unknown Source)
| com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean.getClassificationSystems(ServicesRegistrySiImplBean.java:456)
| sun.reflect.GeneratedMethodAccessor1324.invoke(Unknown Source)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
| com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:512)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:486)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:256)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:176)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:112)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:70)
| SoapServlet.doPost(SoapServlet.java:51)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
| com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
| com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
| com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:486)
| com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
| com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
| com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
| com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:84)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:245)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
| com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
| com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
| com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
| com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
| com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)
| com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)
| com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
|Hi,
Refer Error:Service Registyr Configuration PI 7.11
and http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8071b1b8-3c5c-2e10-e7af-8cadbc49d711?QuickLink=index&overridelayout=true
Thanks,
Chandra -
I have an itunes account and an ipod, and when I purchased 2 albums on the computer they synced straight to the ipod. I bought an iphone and used the usb cord from the computer to it to sync the itunes albums to the new phone. Everything transfered, and those were albums I had uploaded (not purchased from the itunes store), except the two albmus I just purchased from the itunes store. They appear on my itunes on the computer and ipod, but not on the iphone. What did I fail to do or did I do incorrectly?
This might sound weird, but here's an idea which worked for me re music that was newly added to itunes and showed up in my ipod but wouldn't play - I simply played the tracks in itunes first, just a second of time or so will do it, not the whole track, then connect the ipod and sync again and this time they played - hope this helps.
-
Get Attribute values from a page and procedure exception handling?
Hi All,
I have created new page with two input attributes not based on any VO. This page is created to capture two values and pass these to an AM method upon pressing OK button. The method in AM will call a procedure with two in parameter expecting the two values captured from the above said page.
I have two questions, first one how to capture the values entered by the page in the controller class and advises me how to handle exceptions when my procedure fails.
I can not use something like this since this page is not based on a VO
String fromName = (String)vo.getCurrentRow().getAttribute("FromName");
Do I have to create a dummy VO like select '' name1, '' name2 from dual?
Thanks for the help.Hi,
Actually you can capture the parameters on the page like this way
String test = (String)pageContext.getParameter("id of the text input bean");
Now in procedure you can take an out parameter which stores the error messages on exception
and return that out parameter in java.
and then you can throw exception on page using OAException class.
Thanks
Gaurav Sharma -
Get the values from Exception class
Hi all ..
In class i have raised one exception
when i catch this exception in my program i m able to get the
error message but i need to get all the parameters that i pass
when i raise the exception ...
i have raised like this
RAISE EXCEPTION TYPE cx_bapi_error
EXPORTING
textid = cx_bapi_error=>cx_bo_error
class_name = 'ZHS_'
log_no = wa_bapi_return-log_no
log_msg_no = wa_bapi_return-log_msg_no
t100_msgid = wa_bapi_return-id
t100_msgno = wa_bapi_return-number
t100_msgv1 = wa_bapi_return-message_v1
t100_msgv2 = wa_bapi_return-message_v2
t100_msgv3 = wa_bapi_return-message_v3
t100_msgv4 = wa_bapi_return-message_v4
STATUS = lt_status
and caught the exception like this in my program
CATCH cx_bapi_error INTO go_error.
gd_text = go_error->get_text( ).
EXIT.
ENDTRY.
in this i m just getting the class name which i have passed in exception
i need all other parameters that i have passed ..
if u have any idea pls let me know ..
Thanks in advance ...Hello Jayakumar
Usually the attributes of standard exception classes are defines as <b>public</b> and <b>read-only</b>. Thus, you should be able to use the following coding:
DATA:
go_error TYPE REF TO cx_bapi_error. " specific exception class !!!
TRY.
RAISE EXCEPTION TYPE cx_bapi_error
EXPORTING
textid = cx_bapi_error=>cx_bo_error
class_name = 'ZHS_'
log_no = wa_bapi_return-log_no
log_msg_no = wa_bapi_return-log_msg_no
t100_msgid = wa_bapi_return-id
t100_msgno = wa_bapi_return-number
t100_msgv1 = wa_bapi_return-message_v1
t100_msgv2 = wa_bapi_return-message_v2
t100_msgv3 = wa_bapi_return-message_v3
t100_msgv4 = wa_bapi_return-message_v4
STATUS = lt_status.
CATCH cx_bapi_error INTO go_error.
gd_text = go_error->get_text( ).
WRITE: go_error->t100_msgid, " perhaps the attributes have different name
go_error->t100_msgno, " check attribute names in SE24
EXIT.
ENDTRY.
Regards
Uwe -
Trying to delete file from trash but get this: The operation can’t be completed because the item “File name” is in use. All other files delete except this one. Please help
Maybe some help here:
http://osxdaily.com/2012/07/19/force-empty-trash-in-mac-os-x-when-file-is-locked -or-in-use// -
hello I'm experiencing some problems with my iMessage and face time. I did with Apple provided me online. I did the steps. Nothing will work, it keeps saying activation turn on Wi-Fi when my Wi-Fi is turned on. As soon as I got this on Christmas. iMessage and FaceTime have not been working. My Apple and ID password are correct. Everything else is working fine. My iOS updates are up to date, everything is fine except FaceTime and iMessage
Did you try everything here?
iOS: Troubleshooting Messages
Using FaceTime and iMessage behind a firewall
iOS: Troubleshooting FaceTime and iMessage activation
FaceTime, Game Center, Messages: Troubleshooting sign in issues
In the future saying your tried the Apple on-line articles does provide us with information as to which ones you found and tried -
Dunning - ST22- Exception in GET_DUNNING_CUSTOMIZING FM.
Hi Experts,
Issue is,
When the user ran the Dunning report on July 16th, (selection criteria is--> July 16th & From customer 1 TO customer 999999999), bcoz of some thing, at CUST_444, the Exception was raised (say, for customers CUST_111, CUST_222, CUST_333, its successful), saying that...ABAP/4 processor: RAISE_EXCEPTION and it stopped there/job cancelled!
So, now, again when the user wants to(subsequent running of dunning report) run the report for customer 1 to 999999999, SAP is blocking CUST_111, CUST_222, CUST_333 reports and saying already printed on July 16th!
ST22- Exception in GET_DUNNING_CUSTOMIZING FM.
So, How to fix it? I guess, we hv to delete the July 16th history report, If so, How to delete it?
thanq.
Message was edited by:
SrikharHi Sheshu,
If u get chance, pls. culd u respond to my other thread, title is,
<i><b>SM 30 -
AUTHORITY-CHECK OBJECT 'XXX' ??</b></i>
search criteria: authority-check object
area: abap general-abap development
time: 7 days.
Pls. clarify my doubts, sent to Roman!
I copied and paste the same code to my requiremetn, after declaring necessory data part, but not working!
if u did not find the thread , pls. let me know!
thanq.
Maybe you are looking for
-
hai experts, just now stepped into mpls world. i am refering the book "MPLS Fundamentals" by Luc De Ghein. In the implicit null portion the author states that " PHP is the default mode in cisco IOS.In case of ipv4 over mpls ,cisco ios only advertise
-
My ipad face time will not verify or sign in!
I have reset my ipad 2 ,updated it, tried signing in with a different profile and everything possible! I try to sign in on face time but it wont do it! I put in my apple id and the password and the password is correct but when i click the sign in but
-
How do you convert aiff files to aac and keep them organized in new folders
I have spent several hours trying to figure out how to convert my thousands of aiff files to aac files. I want to keept the originals and have the new aac files created and then stored in a file system identical but separate to the one that stores t
-
Adobe Interactive using ABAP WD
Team - Two questions: 1. Is there any documentation similar to Java WD (steps in an PDF doc) to create online/offline interactive forms. 2. My requirement is to create a transport request control form (I have a word layout) and then have users comple
-
How can I find my lost Iphone in Amman Jordan ?
My Iphone has been lost almost two weeks ago , the police are not helping at all eventhough I've given them the serial number . is there any way I can track my iphone online ? ps : I don't have find my i phone app and the i cloud is not activated als