Application Parameter not getting Refreshed when testing in another client
Hi,
I have created a WD application in development client 150 and the application has import parameter WORKITEMID. I am getting this value in the startup input plug-in. I am calling this application in the workflow as a activity step. For unit testing purposes I am defaulted the import paramater value to a 000546578. When I put a breakpoint in the startup method, I am able to get the value of WORKITEMID as 000546578. Once I have completed my application I have changed the defualted value to 000436477 and now I am trying to test in testing client 140, and in debugging I am able to stll 000546578 not the newly defualted value. This is happeening only in testing client.
When I debug and see the client 150, I am able to see the new value, but in client 140 still the old value is showing up at run-time when I test the application. But on the application parameter tab the new value is visible. Only the prb is at run-time its still picking up old value.
I am new to ABAP WD stuff. Can anyone help me out how to resolve this issue.
With Regards,
Sreekanth
Try using: weblogic.refresh
http://edocs.bea.com/wls/docs61/webapp/deployment.html#149386
Cheers
mbg
"Santosh Sahadevan" <[email protected]> wrote in message
news:3ef55cba$[email protected]..
>
Hey all,
We are developing an application in which the development enviornmentwhich we
have recieved from the clients ,(configuered bythe clients) which is sameas that
of the production env.
The web application is running in a cluster in a weblogic 6.1 env . Whenwe trying
to change the JSP, it doesnt get refreshed. We have to explicitaiilychanging
the jsp at the .wlnotdelete dir created , to take its changes . But as weknow
thats a temp place holder for the application .
Since we are team of 20 developers it becomes a real pain when weexplictially
try to stop and restart the server , just for changing a jsp.
Do we have a solution for the same.
Similar Messages
-
Graph image not getting displayed when navigating from another page
Hi All,
I have implemented a line graph in ADF with "dept no"(in x-axis) and "avg sal"(in y-axis). When I am going to run only this graph page, its showing proper data.
But,when I am trying to navigate from another jspx page (which is under some package) to this graph page, the graph is not getting displayed(graph image is not getting displayed).
In my project I am following package structure for jspx and backing bean.
Please help me to solve this problem.
Thnx,
AbhijitAbhijit,
A couple of things:
1). There's really not enough information provided to answer your question - have you tried doing some debugging?
2). You may have beer luck on the [url http://forums.oracle.com/forums/forum.jspa?forumID=381&start=0]11g forum
John -
ALV not getting refreshed when call screen is executed second time
I have 2 screens 9001 and 9002. In 9001 , I am displaying the fields of a database table in a Table Control. The user has to select some of those fields and click on a button 'Generate ALV'. After clicking , the control navigates to 9002 where I am displaying ALV with data in the selected fields(the other fields remain empty). (using custom container)
Now there is BACK button in 9002 where i have written LEAVE TO SCREEN 9001. After this if the user again make changes in column selection and click on 'Generate ALV' , then still the old alv data is displayed. (Mind you the structure of alv is same , only the selected fields should show data).
I am using REFRESH_ALV_DISPLAY also and when i tested this function independently , its working fine (although for interactive alv in the same screen).
I am making use of <fs> for dynamic internal table and i checked it using breakpoints , during the 2nd time , it contains the correctly updated data so i think the problem lies with alv
Kindly check this code
MODULE STATUS_9002 OUTPUT.
SET PF-STATUS 'ZALV'.
* SET TITLEBAR 'xxx'.
CREATE OBJECT C_CONT
EXPORTING
CONTAINER_NAME = 'CUST_CONT'
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF OBJ_ALV IS INITIAL.
CREATE OBJECT OBJ_ALV
EXPORTING
I_PARENT = C_CONT
CALL METHOD OBJ_ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = INP_TABLE
CHANGING
IT_OUTTAB = <itab>
ELSE.
CALL METHOD OBJ_ALV->REFRESH_TABLE_DISPLAY
ENDIF.
ENDMODULE. " STATUS_9002 OUTPUT
Edited by: amber22 on Sep 16, 2011 6:45 PMAmber,
Something like:
*& Module STATUS_9001 OUTPUT
MODULE status_9001 OUTPUT.
SET PF-STATUS 'ST9001'.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9001 INPUT
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'GEN'.
SELECT * FROM spfli INTO TABLE gt_outtab.
CALL SCREEN 9002.
WHEN 'BACK'.
LEAVE.
ENDCASE.
ENDMODULE. " USER_COMMAND_9001 INPUT
*& Module STATUS_9002 OUTPUT
MODULE status_9002 OUTPUT.
SET PF-STATUS 'ST9002'.
IF obj_alv IS INITIAL.
CREATE OBJECT c_cont
EXPORTING
container_name = 'CUST_CONT'.
CREATE OBJECT obj_alv
EXPORTING
i_parent = c_cont.
CALL METHOD obj_alv->set_table_for_first_display
EXPORTING
i_structure_name = 'SPFLI'
CHANGING
it_outtab = gt_outtab.
ELSE.
CALL METHOD obj_alv->refresh_table_display.
ENDIF.
ENDMODULE. " STATUS_9002 OUTPUT
*& Module USER_COMMAND_9002 INPUT
MODULE user_command_9002 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
CALL METHOD: obj_alv->free, c_cont->free.
CLEAR: obj_alv, c_cont.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN 9001.
ENDCASE.
ENDMODULE. " USER_COMMAND_9002 INPUT
Altough it's not a really nice solution... Why using 2 screens for example? you could use two containers instead...
Also I would recommand playing with the new salv class for your grids.
Anyway don't hesitate to give feed-back.
Kr,
m. -
Print program is not getting triggered when saving the application
Hi all,
My requirement is when i save the invoice using VF01 the print program should get triggered.
The print program is not getting triggered when saving the application even when i have configured the outtype and have attached the print program.
The setting "send immediately (when saving application)" is also checked.
I need to configure it for VF01 transaction.
The error message displayed was " please maintain output device in master data".
Regards,
UmeshHi Umesh
Please check if you have missed any of the following:
1. Defining Access Sequence(can use existing).
2. Defining Output Condition Type(can use existing). - Assigning the Driver Program and Form in processing routine.
3. Output Determination Procedure
4. Assign Output Procedure to Billing Types
Kind Regards
Eswar -
CRM Header data not getting refreshed in BADI when clicked in New order
We have used a ORDERADM_H BADI, header badi to populate some custom field values.
Step 1) While creating sales order in CRM(CRMD_ORDER), we are giving inputs such as sold to party , material etc.
Step 2) Before actually saving the order, we found that we dont need this order to be created and again click on create new button in the transaction. In order header BADI, order data for the previous order is not getting refreshed. The previous GUID is still there and function module CRM_ORDER_READ still retrieves the old order values which was cancelled in the previous step. It is causing lot of issues and finally giving dump.
basically the previous GUID is not getting refreshed. Please suggestPls send the code that you have in the Badi. Did you actually compare the GUIDs manually ? Instead of CRM_ORDER_READ have you tried using CRM_ORDER_READ_OW ?
-
Tree Table is not getting refreshed properly in Jdev 11.1.2.0
Hi,
I am seeing a peculiar issue with tree table not getting refreshed in Jdev 11.1.2.0.
Let me explain you my use case.
I have a tree table in a page, where the first column is displayed as selectBooleanRadio component. When user selects this selectBooleanRadio component, that treetable node should get expanded and at the same time all the child records(I have a select boolean check box component(transient attribute) at the child level) for that node should get selected. This is to allow user to unselect the child records, which he/she does not want to process further(some functionality).
Now when the user selects any radio button, the tree table node is not expanded, but the arrow beside the radio button for that node can be seen as expanded.
I thought it may be a partial trigger issue, so i tried refreshing the tree table programatically as well. But it was of no use.
Then I set the partial triggers wrt to SelectBooleanRadio component on the parent container of the TreeTable. After which somehow the node got expanded but the tree table shrinks in width and the actual disclosure functionality of a tree table is lost.
The same use case works perfectly fine in Jdev 11.1.1.5.
For reference:
I created a sample test case(Dept/Emp) in jdev version 11.1.1.5, which works fine. Workspace: http://adf-use-cases.googlecode.com/files/TreeTable1.rar
But the same test case, when i created in jdev version 11.1.2.0, gives issues. Workspace: http://adf-use-cases.googlecode.com/files/TreeTableUseCase.rar
If you download the application and run in respective jdev version, you will get to know more about the issue.
Please let me know, If I am doing anything wrong in the implementation of this use case.
Any help/suggestions are appreciated.
Thanks
Umesh
Note: My complete application is in Jdev 11.1.2.0, so I can't degrade my jdev version to 11.1.1.5.Thanks Frank for the reply.
But upgrading the jdeveloper to 11.1.2.2 is not an ideal solution for us now, because of the size of the project.
Some how, the issue of refreshing the tree table is resolved. I am using a command button with clientComponent to true and causing a full page refresh.
I am not sure, if this is a perfect solution.
As you said, that this behavior may be an issue with the Jdev version 11.1.2.0, I am using. I am going with the above said approach. -
Data is not Getting refresh in Dashboard
Hi I have implemented Xcelsius on the top of SAP BI System.
I have the following architecture -
SAP BI Cube --> BO XI 3.1 Universe Based on Cube --> QWaaS on the Universe --> Xcelsius Dashboard on the QWaas.
When i created a dashboard and run it , it worked fine and showed me data , which is lying in Cube.
But When the Data get updated in Cube and i again refresh the Dashboard , It still showing me the old data , the Data is not getting refresh in Dashboard .
what could be the possible casue ?
Is QWaas always fetch the dat at run time ?
ThanksQaaWS web service call needs to be invoked to get the data updates from the datasource. Xcelsius provides several options to command how frequently web services connections are calle/refreshed ('refresh on load', 'refresh every X seconds' or trigger cells...).
You should also keep in mind, that, since QaaWS hits datasource each time web service is called, this can bring some performance issues (web service calls WebI server to run corresponding query, which performs a refresh). In order to mitigate this, since XI 3.0, QaaWS features a cache mechanism, that is used to store data results from each query refresh (corresponding to a web service call), in order to serve it again with better efficiency, in case same request is performed during a specific time interval (which typically corresponds to dashboard interactions).
Cache sessions are sorted according to the user names and prompt values used, cache is emptied after a defauilt duration without any interaction (request from the same session).
Cache timeout duration is set for each QaaWS query, and can be tuned from QaaWS Designer when modifying/creating the query : go to Advanced... button on first step of query edition wizard, cache lifetime corresponds to timeout value (in seconds) displayed on Advanced parameter panel (default value being set to 60 seconds).
Cache lifetime may also be an explanation why you do not see data refreshed (if you are with QaaWS XI 3.0 or later).
Hope that helps,
David. -
Panel is not getting refreshed.i see a jam of old and new graph and lines
hi friends
i am attaching my code .when i adjust the slider position the size of the graph will increase(scaling).when i scroll to see the entire graph the screen is not getting refreshed properly.
no leads ..can be 3,12 ...try any arbitary ...(stored in a txt file)
myfile.txt=consider some 600 random numbers for testing.
public class ECGDisplay extends JFrame implements WindowListener
Container contain;
JSlider sliderX,sliderY,sliderCount;
JTextField Xval,Yval,Count;
int [] time=new int[600];
int []Volt=new int[600];
Simpanel[] panelname;
float relX=1;
float relY=1;
LineBorder lineborder,lineborder1;
JPanel ScalingAdjustersPanel,ECGDisplayPanel;
JScrollPane Scroll;
JViewport vp;
JRadioButton RbX,RbY,RbCount;
ButtonGroup group;
private FileInputStream in;
String horizontalScalingSliderLabel = "mm/S";
String verticalScalingSliderLabel = "mm/mV";
String heightOfTileSliderLabel ="Height of tile in uV";
boolean flag=false;
int LeadCount;
int x=20,y=15;
int count=4;
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
java.awt.Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
public ECGDisplay()
super();
this.setTitle("ECG FRAME");
this.addWindowListener(this);
this.setSize (screen.width, screen.height);
contain=getContentPane();
EcgLeadCount();
EcgWindowCreation(LeadCount);
void EcgLeadCount( )
try
FileInputStream in = new FileInputStream("no_Leads.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(in));
LeadCount=Integer.parseInt(br.readLine());
in.close();
catch (Exception e)
System.err.println ("Error while reading no of leads");
void PanelAdjuster()
for(int i=0;i<LeadCount;i++)
panelname.setPreferredSize(new Dimension((30*x),(count*y)));
void readMyFile(int i)
try
FileInputStream in = new FileInputStream("myfile.txt");
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
for (int j = 0; j < Volt.length; j++)
Volt[j] = Integer.parseInt(br.readLine());
in.close();
catch (Exception e)
System.err.println ("Error writing to file");
public void EcgWindowCreation(int LeadCount)
for(int i=0;i<600;i++)
time[i]=i;
ScalingAdjustersPanel=new JPanel();
ECGDisplayPanel=new JPanel();
panelname=new Simpanel[LeadCount];
for(int i=0;i<LeadCount;i++)
panelname[i] =new Simpanel();
System.out.println(panelname[i]);
readMyFile(i);
ECGDisplayPanel.add(panelname[i]);
ScalingAdjustersPanel.setPreferredSize(new Dimension(200,(screen.height-50)));
ScalingAdjustersPanel.setLayout(new BoxLayout(ScalingAdjustersPanel,BoxLayout.Y_AXIS));
ECGDisplayPanel.setLayout(new BoxLayout(ECGDisplayPanel,BoxLayout.Y_AXIS));
sliderX=new JSlider(10,50,20);
sliderY=new JSlider(15,50,15);
sliderCount=new JSlider(4,10,4);
ScalingAdjustersPanel.add(sliderCount);
sliderCount.setBorder(BorderFactory.createTitledBorder("uV"));
sliderCount.setMajorTickSpacing(2);
sliderCount.setMinorTickSpacing(1);
sliderCount.setPaintTicks(true);
sliderCount.setPaintLabels(true);
sliderCount.setVisible(false);
sliderCount.addChangeListener(new SliderChange());
ScalingAdjustersPanel.add(sliderX);
sliderX.setBorder(BorderFactory.createTitledBorder(horizontalScalingSliderLabel));
sliderX.setMajorTickSpacing(10);
sliderX.setMinorTickSpacing(5);
sliderX.setPaintTicks(true);
sliderX.setPaintLabels(true);
sliderX.addChangeListener(new SliderChange());
sliderX.setVisible(true);
ScalingAdjustersPanel.add(sliderY);
sliderY.setBorder(BorderFactory.createTitledBorder(verticalScalingSliderLabel));
sliderY.setMajorTickSpacing(10);
sliderY.setMinorTickSpacing(5);
sliderY.setPaintTicks(true);
sliderY.setPaintLabels(true);
sliderY.addChangeListener(new SliderChange());
sliderY.setVisible(false);
RbX=new JRadioButton ("horizontal Scaling",true);
RbY=new JRadioButton ("vertical Scaling");
RbCount=new JRadioButton ("height Of Tile");
group=new ButtonGroup ();
group.add(RbX);
group.add(RbY);
group.add(RbCount);
ScalingAdjustersPanel.add(RbX);
ScalingAdjustersPanel.add(RbY);
ScalingAdjustersPanel.add(RbCount);
RbX.addActionListener(new buttonSelected());
RbY.addActionListener(new buttonSelected());
RbCount.addActionListener(new buttonSelected());
lineborder = new LineBorder(Color.GRAY,2,true);
lineborder1 = new LineBorder(Color.RED,2,true);
ScalingAdjustersPanel.setBorder(lineborder);
JScrollPane Scroll=new JScrollPane(ECGDisplayPanel);
contain.setLayout(new BorderLayout());
splitPane.setOneTouchExpandable(true);
splitPane.add(ScalingAdjustersPanel);
splitPane.add(Scroll);
contain.add(splitPane,BorderLayout.CENTER);
setVisible(true);
public void windowClosing(WindowEvent evt)
this.setVisible(false);
this.dispose();
public void windowOpened(WindowEvent evt) {}
public void windowClosed(WindowEvent evt) {}
public void windowIconified(WindowEvent evt) {}
public void windowDeiconified(WindowEvent evt) {}
public void windowActivated(WindowEvent evt) {}
public void windowDeactivated(WindowEvent evt) {}
public class SliderChange implements ChangeListener
public void stateChanged(ChangeEvent AE)
Object sliderOBJ=AE.getSource();
if(sliderOBJ==sliderX)
x= sliderX.getValue();
relX=(float)x/20;
else if (sliderOBJ==sliderY)
y= sliderY.getValue();
relY=(float)(((float)y*count)/(15*4));
else if(sliderOBJ==sliderCount)
count=sliderCount.getValue();
relY=(float)(((float)y*count)/(15*4));
PanelAdjuster();
ECGDisplayPanel.repaint();
ECGDisplayPanel.updateUI();
public class buttonSelected implements ActionListener
public void actionPerformed(ActionEvent e)
JRadioButton slid1=(JRadioButton)e.getSource();
if(slid1==RbX)
sliderX.setVisible(true);
sliderY.setVisible(false);
sliderCount.setVisible(false);
if(slid1==RbY)
sliderX.setVisible(false);
sliderY.setVisible(true);
sliderCount.setVisible(false);
if(slid1==RbCount)
sliderX.setVisible(false);
sliderY.setVisible(false);
sliderCount.setVisible(true);
public class Simpanel extends JPanel
public void paintComponent(Graphics g)
g.setColor(Color.BLUE);
for(int i=0;i<599;i++)
g.drawLine((int)(time[i]*relX),(int)(Volt[i]*relY),(int)(time[i+1]*relX),(int)(Volt[i+1]*relY));
Graphics2D g2=(Graphics2D) g;
//drawing a rectangle
double leftX=0;
double topY=0;
double width=x;
double height=y;
g2.setColor(Color.RED);
for(int j=0;j<=count;j++)
for(int i=0;i<30;i++)
Rectangle2D rect=new Rectangle2D.Double(leftX,topY,width,height);
g2.draw(rect);
leftX=leftX+x;
leftX=0;
topY=topY+y;
public static void main(String args[])
ECGDisplay frame=new ECGDisplay();
Edited by: garlapati on Apr 7, 2009 10:18 AMFrom the [custom painting tutotial|http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html]:
Most of the standard Swing components have their look and feel implemented by separate "UI Delegate" objects. The invocation of super.paintComponent(g) passes the graphics context off to the component's UI delegate, which paints the panel's background. For a closer look at this process, see the section entitled "Painting and the UI Delegate" in the aforementioned SDN article. -
Lov command link does not get refreshed
We are using Jheadstart 11.1.1.4.26 with Jdeveloper 11.1.1.4 and we think we have found a bug.
The scenario includes two items, an inputtext (FirstName) and an LovItem (ManagerId)
The LovItem (ManagerId) is dependent on the inputtext (FirstName) with Clear/Refresh and has a Disabled Expession #{bindings.EmployeesFirstName.inputValue==null} so that when the Firstname is null the LovItem (ManagerId) is disabled.
This seems to work fine except from the commandLink of the LovItem which does not get refreshed. This is probably because the Id of the commandLink is not included in the componentsToRefresh item inside the EmployeesFirstNameDependsOnItem.
Of course we could create a custom vm for the default/misc/facesConfig/dependsOnItemBean.vm and pass the id of the commandlink but we are looking for a more generic way.
<managed-bean id="__168">
<managed-bean-name id="__169">EmployeesFirstNameDependsOnItem</managed-bean-name>
<managed-bean-class id="__170">oracle.jheadstart.controller.jsf.bean.DependsOnItemBean</managed-bean-class>
<managed-bean-scope id="__171">application</managed-bean-scope>
<managed-property id="__172">
<property-name id="__173">itemsToClear</property-name>
<list-entries id="__174">
<value id="__175">EmployeesManagerId</value>
</list-entries>
</managed-property>
<managed-property id="__176">
<property-name id="__177">componentsToRefresh</property-name>
<list-entries id="__178">
<value id="__179">EmployeesManagerId</value>
</list-entries>
</managed-property>
</managed-bean>
I sent a testcase to '[email protected]' last friday.
Regards
VasileiosVasileios,
Thank, I was able to reproduce this. We will fix it in the next release.
Here is how you can fix it using custom templates:
- add the following macro to your custom macros file:
#macro (ITEM_LINK_PARTIAL_TRIGGERS)
partialTriggers = "#foreach($item in $JHS.current.item.dependsOnItems) #if (($JHS.current.pageComponent.hasOverflowRight || $JHS.current.pageComponent.hasOverflowRightWithSplitter || $JHS.current.pageComponent.hasOverflowBelow || $JHS.current.pageComponent.hasOverflowBelowWithSplitter) && $JHS.current.item.displayInTableOverflow && !$item.displayInTableOverflow)${JHS.current.group.shortName}PC:${JHS.current.group.shortName}Tab:#end${item.id}#end" #end
- in the custom formLovItem and tableLovItem templates, add this macro to the commandLink element:
<af:commandLink immediate="true" partialSubmit="true" #ITEM_DISABLED_IN_FORM() #ITEM_UPDATEABLE_IN_FORM() id="#NEW_ID("cl")" #ITEM_LINK_PARTIAL_TRIGGERS()
Steven Davelaar,
JHeadstart team. -
Hi,
In my JSF application, I have 2 pages. My first page displays the user details with an image and in the second page I can change the image.
If I change the image in my second page and come back to my first page, the image is not getting refreshed. The image gets changed only when I refresh that page.
Can anyone please help me with some inputs on this.
Thanks..Clean way is to change the HTTP headers so that the browser doesn't cache the page. Here is the complete set to be used in HTML <head>:
<meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">
<meta http-equiv="pragma" content="no-cache">Or if you're using HttpServletResponse, then do:
response.setHeader("cache-control", "private, no-cache, no-store, no-transform, must-revalidate"); // HTTP 1.1
response.setHeader("pragma", "no-cache"); // HTTP 1.0Another solution -nasty but working- is to add a fake query string behind the image URL which changes from time to time so that the browser is forced to reload the image.
E.g.<img src="/images/foo.gif?<%= System.currentTimeMillis(); %>" /> -
Report is not getting refreshed after changing prompts once again?
HI,
I am running some webi and deski reports using webi sdk also i'm handling the prompts of
report.
Problem is that if i ran the parametrized webi or deski report then my application shows the prompt page
then i fill all the prompt for the report it shows the data for selected prompt values.
But if i once again changed prompt values it shows data of previously selected prompt values not for
the currently changed prompt values. means reports not getting refreshed.
sometimes its work correctly.
What will be problem?
How can i resolve this issues?
Please help me
Thanks in advance
HarshadThe workflow is:
1. Refresh
2. Set Prompts
3. Get View.
then repeat.
Are you refreshing before setting prompts?
Sincerely,
Ted Ueda -
Values not getting refreshed in web report.
Hello Friends,
Currently i am running an web report. The scenerio is i have check box with 5 options For Ex: IMS , IMR, IMN,IMM,IMP.
IMS is the combination of all divisions and IMR is the combination of only three divisions.
In BEx we runthe report with divisions . For ex : divisions are Ind1, ind2,ind3,ind4,ind 5.
Instead of displaying divisions in the select options like Ind1,ind2....etc., we have created a structure in the report
and using new selection we have restricted the divisions with IMS,IMN,etc.,
IMS->combination of all divisions. IMR is combination of ind1,ind2,ind3.
IMN... all are with single divisions
Now we have assigned the query in the data provider for select options in hte web report,
But when we select any options the values of the remaining queries are not getting refreshed.
If we use the divisons directly with out using the structures the values are getting refreshed.
Can any one give me the solutions for this?
Regards
SrinivasHi Mansi,
Check the Prompt properties in the Edit Query window of the webI. In the query filters section of window, click on the blue icon which says Prompt Properties. Deselect Keep Last values select and run the webI again.
If the solution is not related to your question, please provide more details.
Thanks,
Rajesh -
Issue: Not getting response when the document is having special chars
Please help following issue: Not getting response when the document is having special chars(Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
Error message:
System.FormatException: Invalid length for a Base-64 char array. at
System.Convert.FromBase64String(String s) at
Summarize.Summarizer.AccumulateBroadcast(String filedata, String givenWords) in
c:\DocumentSummarizer\App_Code\Summarizer.cs:line 66
Code:
File 1:
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Properties;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.extractor.*;
import com.lowagie.text.Document;
import com.lowagie.text.pdf.PRTokeniser;
import com.lowagie.text.pdf.PdfReader;
public class DocumentSummarizerClient {
static Properties loadProperties() {
Properties prop = new Properties();
try {
prop.load(DocumentSummarizerClient.class.getClassLoader().getResourceAsStream("vep.properties"));
} catch (Exception ioe) {
ioe.printStackTrace();
return prop;
public String getSummary(String fileName,String noOfWordsOrPercentage ){
String summaryInputData ="";
String summarizedData="";
String summarizerURL = loadProperties().getProperty("Summarizer.serviceURL");
try {
String fileExtension=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
if (fileExtension.equalsIgnoreCase("doc")|| fileExtension.equalsIgnoreCase("txt")|| fileExtension.equalsIgnoreCase("pdf")) {
if (fileExtension.equalsIgnoreCase("txt")) {
BufferedReader bufferedReader = new BufferedReader(
new FileReader(fileName));
String line = null;
while ((line = bufferedReader.readLine()) != null) {
summaryInputData += line;
if(fileExtension.equalsIgnoreCase("doc")){
POIFSFileSystem fs = null;
fs = new POIFSFileSystem(new FileInputStream(fileName));
HWPFDocument doc = new HWPFDocument(fs);
WordExtractor we = new WordExtractor(doc);
String[] paragraphs = we.getParagraphText();
for( int i=0; i<paragraphs .length; i++ ) {
paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
summaryInputData+= paragraphs[i];
if(fileExtension.equalsIgnoreCase("pdf")){
Document document = new Document();
document.open();
PdfReader reader = new PdfReader(fileName);
int pageCount =reader.getNumberOfPages();
for(int i=1;i<=pageCount;i++){
byte[] bytes = reader.getPageContent(i);
PRTokeniser tokenizer = new PRTokeniser(bytes);
StringBuffer buffer = new StringBuffer();
while (tokenizer.nextToken()) {
if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
buffer.append(tokenizer.getStringValue());
summaryInputData += buffer.toString();
else{
System.out.println("This is Invalid document. Presntly we support only text,word and PDF documents ");
// String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
// encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
summarizedData= postRequest(parameters,summarizerURL);
String slength= "<string xmlns=\"http://tempuri.org/\">";
if(summarizedData.contains("</string>")){
summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
summarizedData = replaceVal(summarizedData);
//System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
// System.out.println("Summarized data "+summarizedData);
if(summarizedData.contains("Please enter the percentage")){
summarizedData="Data given cannot be summarized further";
else{
System.out.println("Data given cannot be summarized further");
summarizedData="";
} catch (FileNotFoundException e) {
return("The File is not found \n\n"+e.toString());
} catch (IOException e) {
return("The File is already in use \n\n"+e.toString());
} catch (Exception e) {
return(e.toString());
return summarizedData;
public static String postRequest(String parameters,String webServiceURL) throws Exception{
Properties systemSettings = System.getProperties();
systemSettings.put("http.proxyHost", loadProperties().getProperty("proxyHost"));
systemSettings.put("http.proxyPort", loadProperties().getProperty("proxyPort"));
System.setProperties(systemSettings);
String responseXML = "";
try {
URL url = new URL(webServiceURL);
URLConnection connection = url.openConnection();
HttpURLConnection httpConn = (HttpURLConnection) connection;
byte[] requestXML = parameters.getBytes();
httpConn.setRequestProperty("Content-Length", String
.valueOf(requestXML.length));
httpConn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
httpConn.setRequestMethod("POST");
httpConn.setDoOutput(true);
httpConn.setDoInput(true);
OutputStream out = httpConn.getOutputStream();
out.write(requestXML, 0, requestXML.length);
out.close();
InputStreamReader isr = new InputStreamReader(httpConn
.getInputStream());
BufferedReader br = new BufferedReader(isr);
String temp;
String tempResponse = "";
while ((temp = br.readLine()) != null)
tempResponse = tempResponse + temp;
responseXML = tempResponse;
br.close();
isr.close();
} catch (java.net.MalformedURLException e) {
System.out
.println("Error in postRequest(): Secure Service Required");
} catch (Exception e) {
System.out.println("Error in postRequest(): " + e.getMessage());
return responseXML;
public String replaceVal(String value) {
if (value == null) {
value = "";
value = value.replace("<", "<");
value = value.replace(">", ">");
value = value.replace("&", "&");
return value;
public static void main(String[] args) {
DocumentSummarizerClient testdoc=new DocumentSummarizerClient();
System.out.println("hello");
testdoc.getSummary("C:\\working_folder\\vep\\UnitTestCases\\VEP1.0\\DocumentSummarizerTestData\\TestErrorFour.doc","100%");
Note: Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
File 2:
---------public class Base64Utils {
private static byte[] mBase64EncMap, mBase64DecMap;
* Class initializer. Initializes the Base64 alphabet (specified in RFC-2045).
static {
byte[] base64Map = {
(byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F',
(byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L',
(byte)'M', (byte)'N', (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
(byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X',
(byte)'Y', (byte)'Z',
(byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
(byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l',
(byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r',
(byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x',
(byte)'y', (byte)'z',
(byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
(byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'};
mBase64EncMap = base64Map;
mBase64DecMap = new byte[128];
for (int i=0; i<mBase64EncMap.length; i++)
mBase64DecMap[mBase64EncMap[i]] = (byte) i;
* This class isn't meant to be instantiated.
private Base64Utils() {
* Encodes the given byte[] using the Base64-encoding,
* as specified in RFC-2045 (Section 6.8).
* @param aData the data to be encoded
* @return the Base64-encoded <var>aData</var>
* @exception IllegalArgumentException if NULL or empty array is passed
public static String base64Encode(byte[] aData) {
if ((aData == null) || (aData.length == 0))
throw new IllegalArgumentException("Can not encode NULL or empty byte array.");
byte encodedBuf[] = new byte[((aData.length+2)/3)*4];
// 3-byte to 4-byte conversion
int srcIndex, destIndex;
for (srcIndex=0, destIndex=0; srcIndex < aData.length-2; srcIndex += 3) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
(aData[srcIndex] << 4) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+2] >>> 6) & 003 |
(aData[srcIndex+1] << 2) & 077];
encodedBuf[destIndex++] = mBase64EncMap[aData[srcIndex+2] & 077];
// Convert the last 1 or 2 bytes
if (srcIndex < aData.length) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
if (srcIndex < aData.length-1) {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
(aData[srcIndex] << 4) & 077];
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] << 2) & 077];
else {
encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] << 4) & 077];
// Add padding to the end of encoded data
while (destIndex < encodedBuf.length) {
encodedBuf[destIndex] = (byte) '=';
destIndex++;
String result = new String(encodedBuf);
return result;
* Decodes the given Base64-encoded data,
* as specified in RFC-2045 (Section 6.8).
* @param aData the Base64-encoded aData.
* @return the decoded <var>aData</var>.
* @exception IllegalArgumentException if NULL or empty data is passed
public static byte[] base64Decode(String aData) {
if ((aData == null) || (aData.length() == 0))
throw new IllegalArgumentException("Can not decode NULL or empty string.");
byte[] data = aData.getBytes();
// Skip padding from the end of encoded data
int tail = data.length;
while (data[tail-1] == '=')
tail--;
byte decodedBuf[] = new byte[tail - data.length/4];
// ASCII-printable to 0-63 conversion
for (int i = 0; i < data.length; i++)
data[i] = mBase64DecMap[data[i]];
// 4-byte to 3-byte conversion
int srcIndex, destIndex;
for (srcIndex = 0, destIndex=0; destIndex < decodedBuf.length-2;
srcIndex += 4, destIndex += 3) {
decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
((data[srcIndex+1] >>> 4) & 003) );
decodedBuf[destIndex+1] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
((data[srcIndex+2] >>> 2) & 017) );
decodedBuf[destIndex+2] = (byte) ( ((data[srcIndex+2] << 6) & 255) |
(data[srcIndex+3] & 077) );
// Handle last 1 or 2 bytes
if (destIndex < decodedBuf.length)
decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
((data[srcIndex+1] >>> 4) & 003) );
if (++destIndex < decodedBuf.length)
decodedBuf[destIndex] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
((data[srcIndex+2] >>> 2) & 017) );
return decodedBuf;
issue 2: Exception when passing 2MB .txt file
Steps to reproduce:
Call getSummary() with 2MB .txt file
Actual:
The following exception has occured:
1. Error in postRequest(): Unexpected end of file from server
java.lang.NullPointerException
Please provide your precious feedback/suggestions.
Thanks in advance…..
Edited by: EJP on 15/03/2011 16:52: added code tags. Please use them. Code is unreadable otherwise.Thanks for your response….
This is enhancement project and some one develops long back.
Regarding point (b) You should be using the java.net.URLEncoder to encode URL parameters, not a base64 encoder.
DocumentSummarizerClient.java I am using base64
Ex:
// String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
// encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
summarizedData= postRequest(parameters,summarizerURL);
String slength= "<string xmlns=\"http://tempuri.org/\">";
if(summarizedData.contains("</string>")){
summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
summarizedData = replaceVal(summarizedData);
//System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
System.out.println("Summarized data "+summarizedData);
if(summarizedData.contains("Please enter the percentage")){
summarizedData="Data given cannot be summarized further";
Above specific please I need to modify to resolve above issue.
Could you please suggest me what changes I need to do.
Waiting for positive response. -
Cell data not getting refreshed in which user enters data OO ALV(editable)
Hi Friends,
I am using OO ALV for editable grid display.
I am unable to change grid data in the cell in which user enters something, using OO ALV. Did through debugging of my own program and found that some problem with system program. Then I did all system debugging. Could not find out why is the grid not getting refreshed with the new data in the cell in which user had entered some value. Rest of the cell's data are getting refreshed with the values which i am updating in the final internal table. I can see that the data in the final internal table is changed for the cell in which user enters data. But even after the call of
CALL METHOD obj_alvgrid1->refresh_table_display
does not refreshes the data in the cell in which user had entered data. Rest of the cells data are getting refreshed.
Piece of code:
SET HANDLER obj_event_receiver->handle_data_changed
FOR obj_alvgrid1.
METHODS: handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed
e_onf4
e_onf4_before
e_onf4_after.
METHOD handle_data_changed.
DATA : v_valid TYPE char1,
v_refresh TYPE char1.
*--check mt_good_cells semantically
CALL METHOD perform_semantic_checks( er_data_changed ).
*--If PBO is again visited, just refresh the ALV grid.
CALL METHOD obj_alvgrid1->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDMETHOD.
METHOD perform_semantic_checks.
LOOP AT er_data_changed->mt_good_cells INTO w_good.
v_index = sy-tabix.
CASE w_good-fieldname.
WHEN 'ZASCAS'.
*Now here based on some conditions I am changing my final internal table i_zamtsmatnp
MODIFY i_zamtsmatnp FROM w_zamtsmatnp INDEX
w_good-row_id TRANSPORTING
zascas modif.
User enters data in zascas field. Based on the data entered, I am changing other fields which is getting refreshed. I am also changing zascas in the program even after user had already entered the value which was bit wrong and i am correcting it in the program on the even "data_changed" even.
Please help me friends as i m strugling past hours wondering why the data is not getting refreshed for the cell in which user enter data.
Regards,
SuryaHi Surya,
The approach you are following is correct. You need to use the comibnation of all these things:
Event - DATA_CHANGED
Methods - CHECK_CHANGED_DATA
- GET_CHANGED_DATA.
However, here are few standard programs which are having similar functionality.
BCALV_EDIT_03
BCALV_EDIT_07
Check out these once.
Note: If anything is helpful, dont forget to reward points
Thanks,
Adithya K
SAP Practise
[email protected] -
Application does not work properly when I press a CommanButton
Hi all, I am having a problem with weblogic 10.3.5.
It turns out that an application built with JDeveloper 11.1.5, I test it, and everything goes well in the JDeveloper integrated Weblogic.
But when deploy in a standalone weblogic 10.3.5 server, the application does not work properly when I press a CommanButton to go to another page search (the property "action" is set correctly) , but nothing happens, stays in the same home page. Similarly when a commanButton link to run a task-flow, It do not work , however in the JDeveloper integrated Weblogic it runs correctly.
How I can solve these problems?
Thanks.Thanks Frank for help us, but when I writing this comment we are doing at home. So, we going to test the page in a stand alone weblogic server 10.3.5. We wrote the URL as :
" http://<our ip>:7001/myApp/faces/index.jspx "
this application contains a report desing and compiled with iReport 4.5.1 ( last version in the moment ), we can see the report when I press a commanButton without any problem.
But now, we need try your suggestions in the office, and give you more information about it . Thanks for the moment.
In the Afternoon we gonna give you more information about it .
Maybe you are looking for
-
Is it even possible to dynamically apply view criteria in an ADF Web App?
This is one of those situations where something that should take an hour ends up taking days. * I have a view. * The view has Bind Variables associated with it. * The view has View Criteria associated with it. * Each of the View Criteria use differen
-
Bug w/ xsl:attribute-set in java xdk
Hi - I found what seems to be a bug in the 9.0.0.2.0.0A xdk beta for java. In xsl, if you have an empty xsl:attribute-set (one that uses other attribute sets but does not define any of it's own), the XSL Processor gives an internal error. Adding an a
-
CPU & I/O quotas available in Oracle 10g ?
Im a developer. I wanted to create 2 schemas so that they will not interfere with each other. I wanted to also make sure that the load/activities on one of the schema does not affect the performance of the other. Is there anything equivalent of "quot
-
MI424WR - DNS Host Name Resolution
I have added several DNS entries in the DNS Server section of the MI424WR. These are for my network printer, and I have renamed several Android devices to give them names. When I try to ping any host name that I added to the DNS Server section it doe
-
Help fixing a huge windowserver_last.log file
While using Omni Disk Sweeper, I discovered that my windowserver_last.log file is in excess of 8GB in size. I'm not very unix command savvy, but I am trying to reclaim the space without wiping something important. I'm unable to open the file using co