Validate failure and report java.lang.NullPointerException
there are three required textinput field in my dialog window . after input data into them, i click button to commit data, meet the validate failure error . report a java.lang.NullPointerException at these three fields bottom. others non-required fields has no error.
The error message in page is
JBO-35007: Row currency has changed .... need oracle.jbo.Key[5 ] -
Length - java.lang.NullPointerException
RollId - java.lang.NullPointerException
VatId - java.lang.NullPointerException
and in application.log is
08/02/24 12:48:15.951 fabricmis: Servlet error
java.lang.NullPointerException
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.webcache.adf.filter.PageCachingFilter.doFilter(PageCachingFilter.java:232)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
the log in debug mode
08/03/01 16:31:45 [22632] Failed to validate :1 for binding:VatId
2008-3-1 16:31:45 oracle.adf.view.faces.util.MessageFactory getMessage
Warning:
java.lang.NullPointerException
at oracle.jbo.uicli.binding.JUCtrlValueBinding.validateAttributeValue(JUCtrlValueBinding.java:757)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.validateInputValue(JUCtrlValueBinding.java:2128)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding$AttrValidator.validate(FacesCtrlAttrsBinding.java:189)
at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
at oracle.adf.view.faces.component.UIXEditableValue.validate(UIXEditableValue.java:206)
at oracle.adf.view.faces.component.UIXEditableValue._executeValidate(UIXEditableValue.java:522)
at oracle.adf.view.faces.component.UIXEditableValue.processValidators(UIXEditableValue.java:302)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXForm.processValidators(UIXForm.java:59)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.webcache.adf.filter.PageCachingFilter.doFilter(PageCachingFilter.java:274)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Similar Messages
-
Exception in thread "RTPC Report" java.lang.NullPointerException
Hi.. I am having the above problem when ruuning my transmission program..
I run my code and it seems to be ok... There is message showing the web cam stream is being transmitted...
However, it dawn on me when i could not even receive any stream via JMStudio with the specified address. e.g. 220.10.10.20 at port 2020.
Can any one please help?
Thanks.
CArter
Following is my code...
import java.awt.*;
import java.io.*;
import java.util.*;
import java.net.InetAddress;
import javax.media.*;
import javax.media.protocol.*;
import javax.media.protocol.DataSource;
import javax.media.format.*;
import javax.media.control.TrackControl;
import javax.media.control.QualityControl;
import javax.media.rtp.*;
import javax.media.rtp.rtcp.*;
import javax.media.rtp.*;
import java.io.InputStream;
import javax.media.rtp.RTPManager;
public class MyTransmitter extends Thread
private MediaLocator videoLocator;
private String ipAddress;
private int basePort;
private Integer stateLock=new Integer(0);
private boolean failure;
private Processor processor;
private DataSource videoDataInput,videoDataOutput;
private RTPManager rtpMgrs[];
private VideoFormat JPEG_VIDEO=new VideoFormat(VideoFormat.JPEG_RTP);
private SendStream sendStream;
private SourceDescription descriptionList[];
public MyTransmitter(String ips,String ports){
ipAddress=ips;
Integer bPort=Integer.valueOf(ports);
if(bPort!=null)
basePort=bPort.intValue();
public void run()
initializeVideo();
if(videoLocator!=null){
createMyProcessor();
createMyManager();
// May be should put inside the if..else statements
//createMyTransmitter();
// Initailize the video
public void initializeVideo()
// Stre the devices in a vector
VideoFormat format=new VideoFormat(VideoFormat.RGB);
Vector deviceList=CaptureDeviceManager.getDeviceList(format);
CaptureDeviceInfo deviceInfo=null;
// If there is more than one device detected
if(deviceList.size()>0){
// Set the first device to device Info
// GEt the media locator of the devie
deviceInfo=(CaptureDeviceInfo)deviceList.elementAt(0);
videoLocator=deviceInfo.getLocator();
}else{
System.out.println(" --X No device found...");
public void createMyProcessor()
boolean result=false;
DataSource ds=null;
// Check if the media locator is null
if(videoLocator==null){
System.out.println(" --X No video locator..");
System.out.println(" - Trying to create a Processor..");
// Attempt to create DataSource from media locator
try{
ds=Manager.createDataSource(videoLocator);
}catch(Exception ex){
System.out.println(" --X Unable to create dataSource : "+ex.getMessage());
System.out.println(" - Video data source is created..");
// Try to create Processor from DataSource
try{
processor=Manager.createProcessor(ds);
}catch(NoProcessorException npe){
System.out.println(" --X Unable to create Processor: "+npe.getMessage());
catch(IOException ioe){
System.out.println(" --X IOException creating Processor..");
// Wait for the processor to be configured
result=waitForState(processor,Processor.Configured);
if(result==false)
System.out.println(" --X Could not configure processor..");
// Set the track controls for processor
TrackControl []tracks=processor.getTrackControls();
if(tracks==null || tracks.length<1){
System.err.println(" --X No track is found..");
// Set the content description of processor to RAW_RTP format
// This will limit the supported formats to reported from
// Track.getSupportedFormats() to valid RTP format
ContentDescriptor cdes=new ContentDescriptor(ContentDescriptor.RAW_RTP);
processor.setContentDescriptor(cdes);
Format []supported;
Format chosen=null;
boolean atLeastOneTrack=false;
for(int i=0;i<tracks.length;i++){
Format format=tracks.getFormat();
if(tracks[i].isEnabled()){
supported=tracks[i].getSupportedFormats();
// WE've set the output content to RAW_RTP.
// So, all the supporte formats should work with RAW_RTP.
// We will pick the first one.
if(supported.length>0){
if(supported[0] instanceof VideoFormat){
chosen=checkVideoSize(tracks[i].getFormat(),supported[0]);
}else
chosen=supported[0];
tracks[i].setFormat(chosen);
System.out.println(" Track "+i+" is transmitted in "+chosen+" format.. ");
atLeastOneTrack=true;
}else{
// If no format is suitable, track is disabled
tracks[i].setEnabled(false);
}else
tracks[i].setEnabled(false);
if(!atLeastOneTrack)
System.out.println("atLeastOneTrack: "+atLeastOneTrack);
System.out.println(" --X Could Not find track to RTP format..");
result=waitForState(processor,Controller.Realized);
if(result==false){
System.out.println(" --X Could NOT realize processor...");
// Set the JPEG Quality to value 0.5
setJPEGQuality(processor,0.5f);
// Set the output Data Source
videoDataOutput=processor.getDataOutput();
//Start the processor
processor.start();
public void setJPEGQuality(Processor p,float values)
Control []cs=p.getControls();
QualityControl qc=null;
VideoFormat JPEGFmt=new VideoFormat(VideoFormat.JPEG);
// Loop through the ocntrols to find the Quality control for the JPEG encoder
for(int i=0;i<cs.length;i++){
if(cs[i] instanceof QualityControl && cs[i] instanceof Owned){
Object owner=((Owned)cs[i]).getOwner();
// Check if the owner is the Codec
// Check the format of output as well
if(owner instanceof Codec){
Format fmts[]=((Codec)owner).getSupportedOutputFormats(null);
// Loop through the supported format and set the quality to 0.5
for(int j=0;j<fmts.length;j++){
qc=(QualityControl)cs[i];
qc.setQuality(values);
System.out.println(" - Quality is set to "+values+" on "+qc);
break;
if(qc!=null)
break;
public Format checkVideoSize(Format originalFormat,Format supported)
int width,height;
Dimension size=((VideoFormat)originalFormat).getSize();
Format jpegFormat=new Format(VideoFormat.JPEG_RTP);
Format h263fmt=new Format(VideoFormat.H263_RTP);
if(supported.matches(jpegFormat)){
width=(size.width%8 == 0 ? size.width:(int)(size.width%8)*8);
height=(size.height%8 == 0 ? size.height:(int)(size.height%8)*8);
}else if(supported.matches(h263fmt)){
if(size.width<128){
width=128;
height=96;
}else if(size.width<176){
width=176;
height=144;
}else{
width=352;
height=288;
}else{
// Unknown format, just return it.
return supported;
return (new VideoFormat(null,new Dimension(width,height),Format.NOT_SPECIFIED,null,Format.NOT_SPECIFIED)).intersects(supported);
public boolean waitForState(Processor p,Integer status)
p.addControllerListener(new StateListener());
failure=false;
if(status==Processor.Configured){
p.configure();
}else if(status==Processor.Realized){
p.realize();
//Wait until an event that confirms the success of the method, or failure of an event
while(p.getState()<status && !failure){
synchronized(getStateLock()){
try{
// Wait
getStateLock().wait();
}catch(InterruptedException ie){
return false;
if(failure)
return false;
else
return true;
public Integer getStateLock(){
return stateLock;
public void setFailure(){
failure=true;
public void createMyManager()
SessionAddress destAddress;
InetAddress ipAddr;
int port;
SourceDescription srcDesList[];
PushBufferDataSource pbds=(PushBufferDataSource)videoDataOutput;
PushBufferStream pbss[]=pbds.getStreams();
rtpMgrs=new RTPManager[pbss.length];
for(int a=0;a<pbss.length;a++){
try{
// RTP Managers or RTP Manager?????
rtpMgrs[a]=RTPManager.newInstance();
port=basePort;
ipAddr=InetAddress.getByName(ipAddress);
SessionAddress localAddr=new SessionAddress(InetAddress.getLocalHost(),port+20);
destAddress=new SessionAddress(ipAddr,port,1);
Integer myipprefix=Integer.valueOf(ipAddress.substring(0,3));
if((myipprefix.intValue()>223) && (myipprefix.intValue()<240)){
rtpMgrs[a].initialize(destAddress);
}else{
rtpMgrs[a].initialize(localAddr);
rtpMgrs[a].addTarget(destAddress);
System.out.println(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
if(videoDataOutput!=null){
sendStream=rtpMgrs[a].createSendStream(videoDataOutput,0);
sendStream.start();
}catch(UnsupportedFormatException ex){
System.out.println(" --X Unsupported Format : "+ex);
catch(IOException ioe){
System.out.println(" --X IOException : "+ioe.getMessage());
catch(Exception ex){
System.out.println(" --X Unable to create RTP Manager...");
System.out.println(ex.getMessage());
/*public void createMyTransmitter()
try{
if(videoDataOutput!=null){
sendStream=rtpMgrs[i].createSendStream(videoDataOutput,0);
sendStream.start();
}catch(UnsupportedFormatException ex){
System.out.println(" --X Unsupported Format : "+ex);
catch(IOException ioe){
System.out.println(" --X IOException : "+ioe.getMessage());
public void stopTransmitter(){
if(processor!=null){
processor.stop();
processor.close();
processor=null;
// Loop through RTP Managers and close all managers..
// Dispose them for garbage collection
for(int i=0;i<rtpMgrs.length;i++){
rtpMgrs[i].removeTargets("Session ended..");
rtpMgrs[i].dispose();
//rtpMgrs.removeTargets("Session ended..");
//rtpMgrs.dispose();
* StateListener class to handle Controller events
class StateListener implements ControllerListener{
public void controllerUpdate(ControllerEvent ce){
if(ce instanceof ControllerClosedEvent){
processor.close();
/* Handle all controller events and notify all
waiting thread in waitForState method */
if(ce instanceof ControllerEvent){
synchronized(getStateLock()){
getStateLock().notifyAll();Ok I reviewed your code and there were a couple things which I am confused about. Firstly, it looks like you have a section of code which checks to see if the ip address preffix is within the 240-223 range, which tells me that you are trying to implement multicast addresses. However, your example ip is out of the multicast range. Also the InetAddress has an isMulticastAddress() method which can check that for you.
Those are just the first things that struck me and I'll keep going through the code. -
Hi guys,
I'm getting a java.lang.NullPointerException (with no other details of error) when i try to write to a textfield on my GUI. the line: TF1.setText("F"); is where the problem is occurring. that line is within a loop ->
if(freq >87 && freq < 100)
System.out.println("Note =F" +freq);
TF1.setText("F");
the textfield has been constructed and initialised and given an initial value. what i need to happen is the string in the textfield to be constantly updated (overwritten) with the new string.
the initial value from TextField TF1= new TextField("", 10);
TF1.setText("blank");
works fine, but one the loop above is entered, the current frequency is printed to the command line and then "java.lang.NullPointerException" is thrown.
I'm struggling with this, and have a deadline to meet so I would much appreciate some help.The Gui class is this:
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Panel;
import java.awt.TextField;
import javax.swing.JFrame;
import javax.swing.*;
public class Gui extends JFrame{
public static void main(String args[])
Project project = new Project();
project.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
project.setSize( 250, 200 ); // set frame size
project.setVisible( true ); // display frame
// new Project(){//constructor
Panel p, p1;
p = new Panel();
p.setLayout (new FlowLayout(FlowLayout.LEFT,5,5));
project.add(p, BorderLayout.NORTH);
p1 = new Panel();
p1.setLayout (new FlowLayout(FlowLayout.LEFT,5,5));
p1.setLayout (new GridLayout(4,1));
project.setTitle("Guitar Tuner Prototype");
TextField TF1= new TextField("", 10);
TF1.setText("blank");
p1.add(TF1);
TF1.setVisible(true);
p1.setVisible(true);
p.add(p1);
//Capture input data from the microphone
project.captureAudio();
project.captureThread();
}//end constructor
//end main
The project.java class has the "private TextField TF1; at the top. the project.java class also contains the loop thats writing to the texfield as specified in th original post.. -
Report Completes in Warning - java.lang.NullPointerException
Hi,
I have a report that ends in warning, when i check the OPP log it says:
Caused by: java.lang.NullPointerException
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
When i download the XML and run it on my desktop it runs perfectly fine.. Can someone help me on how to debug this issue..
Plus this report runs without any problem for a different period, Mar-10, but ends in warning for Apr-10
Thanks
Edited by: user648077 on May 26, 2010 2:42 AMPlease see the suggested solutions in these docs.
R12 Can not Upload Templates. Template Upload Process Completes with Error: A System Error Has Occurred. Invalid UTF-8 Encoding. [ID 758669.1]
Cannot Upload the German Version of The Oracle Contract Template [ID 755359.1]
Generating Fsg Xml Publisher Report Ends in 'Invalid UTF8 Encoding' Error [ID 470233.1]
Thanks,
Hussein -
Reports in Manager Self Service with java.lang.NullPointerException
Hi Everyone,
I have been breaking my head with this problem for over a week. When initially installed the reports worked fine but now when I try and access the Report Selection I get the following java.lang.NullPointerException error. I am running EP 6.0 SP14 on a ERP2004 backend system. I have compared almost all the values with the default ones and have read all documentation and set up exactly what it needs. In SAPGUI the Manage´'s Desktop shows ok via trans ppmdt, but via my MSS it shows nothing.... Any ideas ?...
SSO works ok, everything like that is already configured since the full MSS works besides the reporting.... I do not have a BW system, I would only want the reports that come from REPO or FUNC. The Report Selection page doesn't even open.
One thing I have noticed, when I change the sap.xss.rpt.scenario=RPT0 on the resource for the report selection service the screen appears showing an empty report selection, but when I enter the rpt0 value it displays that error.....
Any ideas ?? Anyone been throught this ??
Regards,
Paulo Poinha -- AccentureHi Paulo,
I had the same problem - it is resolved by SAP note 912976 and has to do with:
Symptom
After applying NW04 SP Stack 14 and ERP 2004 MSS SP10, the MSS Reporting application returns a java.lang.NullPointerException error. -
Hello all,
Please excuse my being too detailed.
After installing Forms 11g, Reports 11g in a new Windows 7 Professional 64bit machine, I was able to run both the Forms Builder and Reports Builder.
I then moved my forms and reports into a different folder, updated the FORMS_PATH and REPORTS_PATH in the registry, and added a key into keymap file:
C:\Oracle\Forms\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_11.1.1.2.0\configuration\cgicmd.dat
that allows hiding userid and password when calling up reports.
I then made a change to the following file:
C:\Oracle\Forms\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_REPORTS\applications\reports_11.1.1.2.0\configuration\rwservlet.properties
by adding the following line to force reload keymap:
<reloadkeymap>yes</reloadkeymap>
Having done that, I could call up reports from remote clients. Unfortunately, now I cannot run the Reports Builder.
Each time I tried, I would see a splash screen, then the usual process in task bar. But no builder appeared.
Right-clicking the process and selecting running the builder will produce a popup dialog declaring:
"REP-50125: rwbuilder.conf:java.lang.NullPointerException"
I have restarted the computer, restarting the Admin Server, Reports Server, etc., to no avail.
If I were to rename the rwbuilder.conf away, the Reports Builder will hang at the splash screen.
The shortcut I used to run the Reports Builder is:
C:\Oracle\Forms\asinst_1\config\reports\bin\rwbuilder.bat
The path to the rwbuilder.conf file is:
C:\Oracle\Forms\asinst_1\config\ReportsToolsComponent\ReportsTools\rwbuilder.conf
and its contents, which has never been modified since installation, follow:
<?xml version = '1.0' encoding = 'UTF-8'?>
<server xmlns="http://xmlns.oracle.com/reports/server" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/reports/server file:C:\Oracle\Forms\as_1/reports/dtd/rwserverconf.xsd" version="11.1.1.3.0">
<cache class="oracle.reports.cache.RWCache">
<property name="cacheSize" value="50"/>
<!--property name="cacheDir" value="your cache directory"/-->
<!--property name="maxCacheFileNumber" value="max number of cache files"/-->
</cache>
<!--Please do not change the id for reports engine.-->
<!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->
<engine id="rwEng" class="oracle.reports.engine.EngineImpl" maxEngine="1" minEngine="0" engLife="50">
<!--property name="sourceDir" value="your reports source directory"/-->
<!--property name="tempDir" value="your reports temp directory"/-->
<!--property name="keepConnection" value="yes"/-->
</engine>
<engine id="rwURLEng" class="oracle.reports.urlengine.URLEngineImpl" maxEngine="1" minEngine="0" engLife="50"/>
<!--security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/-->
<!--destination destype="oraclePortal" class="oracle.reports.server.DesOraclePortal">
<property name="portalUserid" value="%PORTAL_DB_USERNAME%/%PORTAL_DB_PASSWORD%@%PORTAL_DB_TNSNAME%" encrypted="no"/>
</destination-->
<!--security id="rwSec" class="oracle.reports.server.RWSecurity">
</security-->
<destination destype="ftp" class="oracle.reports.plugin.destination.ftp.DesFTP"/>
<destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>
<job jobType="report" engineId="rwEng" securityId="rwJaznSec"/>
<job jobType="rwurl" engineId="rwURLEng"/>
<notification id="mailNotify" class="oracle.reports.server.MailNotify">
<property name="succnotefile" value="succnote.txt"/>
<property name="failnotefile" value="failnote.txt"/>
</notification>
<!--notification id="wfNotify" class="oracle.reports.server.WorkflowNotify">
<property name="connStr" value="%WF_DB_USERNAME%/%WF_DB_PASSWORD%@%WF_DB_TNSNAME%" encrypted="no"/>
</notification-->
<!--jobStatusRepository class="oracle.reports.server.JobRepositoryDB">
<property name="repositoryConn" value="repo_db_username/repo_db_password@repo_db_tnsname" encrypted="no"/>
</jobStatusRepository-->
<connection maxConnect="50" idleTimeOut="15">
</connection>
<queue maxQueueSize="1000"/>
<!--jobRecovery auxDatFiles="yes"/-->
<pluginParam name="mailServer" value="%MAILSERVER_NAME%">
<!--property name="enableSSL" value="yes"/-->
</pluginParam>
<webLayout port="9002" docroot="C:\Oracle\Forms\user_projects\domains\ClassicDomain\servers\WLS_REPORTS\tmp\_WL_user\reports_11.1.1.2.0\uqanoi\war"/>
</server>
Will really appreciate any help!
Thank you.
JacobHi,
This looks like it might be related to bug 6358304.
Go to My Oracle Support site (Metalink) Patchs & Updates tab. Then search for 6358304.
There is a patch downloadable for this which worked for me though I was getting the error when running reports via the server and not through starting reports builder.
However if you search the Knowledge base for 6358304 there is a work around available by editing the cgicmd.dat - specifically by adding a space at the end of the key you added to the file:
1. In the cgicmd.dat file, add a space at the end of the key line.
for example:
my_key: userid=hr/hr@oradb %* %P <--< add a space after the "P".
2. Additional workaround is to change from :
%* %P
to:
%P %*
Hope that works for you, otherwise I would recommend raising a support request with Oracle.
Cheers,
Toby. -
hello all,
we have done up gradation from 11.1.1.3 to EPM 11.1.2.3.500.
we have financial reporting book for HFM.
when we right click on this books and select "complete book in PDF", we get following error as
"nested exception is: java.lang.NullPointerException"
any idea ?
regards,
-Dattatray Matealso following is the log from E:\Oracle\Middleware\user_projects\domains\EPMSystem\servers\FinancialReporting0\logs\FRLogging.log
[2015-01-29T11:14:05.377-05:00] [FinancialReporting0] [NOTIFICATION] [] [oracle.EPMFR.performance] [tid: [ACTIVE].ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 00iR6CF85cpFw00Fzzw0w00000sk0005Nc,0:1] [APP: FINANCIALREPORTING#11.1.2.0] [URI: /hr/modules/com/hyperion/reporting/web/bookViewer/HRBookPdf.jsp] [SRC_CLASS: com.hyperion.reporting.util.HRLogTimer] [SRC_METHOD: logTimeEnd] PERF: 0000003005 WebDynamicBook getStatus() returned false
[2015-01-29T11:14:05.377-05:00] [FinancialReporting0] [ERROR] [] [oracle.EPMFR.jsp] [tid: [ACTIVE].ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 00iR6CF85cpFw00Fzzw0w00000sk0005Nc,0:1] [APP: FINANCIALREPORTING#11.1.2.0] [URI: /hr/modules/com/hyperion/reporting/web/bookViewer/HRBookPdf.jsp] [SRC_CLASS: jsp_servlet._modules._com._hyperion._reporting._web._reportviewer.__hrrunjob] [SRC_METHOD: _jspService] [[
com.hyperion.reporting.util.HyperionReportException: ; nested exception is:
java.lang.NullPointerException
at com.hyperion.reporting.reportserver.FetchInstanceThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.hyperion.reporting.haradm.HRAdmUtils.getMemberNameFromMemberSelection(Unknown Source)
at com.hyperion.reporting.results.ExecBook.processChapterMemberSelections(Unknown Source)
at com.hyperion.reporting.results.ExecBook.executeChapterReport(Unknown Source)
at com.hyperion.reporting.results.ExecBook.executeChapter(Unknown Source)
at com.hyperion.reporting.results.ExecBook.executeBook(Unknown Source)
at com.hyperion.reporting.reportserver.FetchInstanceThread.runBook(Unknown Source)
... 1 more -
"AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame
I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
Exception in thread "main" java.lang.NullPointerException
at pkg1.GUI.createFrame(GUI.java:123)
at pkg1.GUI.startFrame2(GUI.java:66)
at pkg1.Top.cos(Top.java:25)
at pkg1.Top.main(Top.java:20) My code:
GUI class
package pkg1;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Toolkit;
import java.awt.event.MouseMotionListener;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import oracle.jdeveloper.layout.XYLayout;
public class GUI
public JDesktopPane desktop;
private XYLayout xYLayout1 = new XYLayout();
public int openFrameCount = 0;
JFrame f = new JFrame();
public void GUII() // Prepare JFrame
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(500, 600);
f.setVisible(true);
public void startFrame()
desktop = new JDesktopPane();
createFrame(); //create first "window"
f.setContentPane(desktop);
desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
public void startFrame2()
createFrame(); //create second "window"
f.setContentPane(desktop);
desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
public void createFrame()
MyInternalFrame frame = new MyInternalFrame();
frame.setVisible(true); //necessary as of 1.3
desktop.add(frame);
frame.add(new GUI2());
} Top class
public class Top
public static void main(String[] args)
GUI g = new GUI();
g.GUII(); //Create JFrame
g.startFrame(); //Create JInternalFrame
Top t = new Top();
t.sth();
public void sth()
GUI gui = new GUI();
gui.startFrame2();
} MyIntternalFrame class
import javax.swing.JInternalFrame;
import java.awt.event.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import oracle.jdeveloper.layout.XYConstraints;
import oracle.jdeveloper.layout.XYLayout;
/* Used by InternalFrameDemo.java. */
public class MyInternalFrame extends JInternalFrame {
static int openFrameCount = 0;
static final int xOffset = 30, yOffset = 30;
private XYLayout xYLayout1 = new XYLayout();
private JButton jButton1 = new JButton();
private JLabel jLabel1 = new JLabel();
private JFrame c = new JFrame();
private JPanel d = new JPanel();
private XYLayout xYLayout2 = new XYLayout();
public MyInternalFrame() {
super("Document #" + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
//...Create the GUI and put it in the window...
//...Then set the window size or call pack...
int width = new GUI2().width + 10;
int height = new GUI2().height + 40;
setSize(width,height);
setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
} Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another classSome possibly helpful suggestions:
1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
2) Get rid of GUII. The GUI constructor will do all this and more.
3) Get rid of startFrame and startFrame2.
4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane). -
Call RFC and receive a java.lang.NullPointerException ...
Hello,
I develop a RFC adaptative project.
When i execute the application, i obtain the following exception:
java.lang.NullPointerException
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:256)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:222)
at com.sap.tut.wd.rodlist.model.Ztest_Rod_Input.<init>(Ztest_Rod_Input.java:51)
at com.sap.tut.wd.rodocomponent.RodoCust.wdDoInit(RodoCust.java:98)
at com.sap.tut.wd.rodocomponent.wdp.InternalRodoCust.wdDoInit(InternalRodoCust.java:130)
... 45 more
Ztest_Rod_Input is my adaptative RFC ...
This excception appears with the following code line:
> ztest_rod_Input input = new ztest_rod_Input();
I tried with a known BAPI in other project and i don't have this exception ...
Have you any suggestions ?
Thanks a lot,
Rodolphe.Hi Arch,
I execute your code and in the Input View i enter the following code:
> public void onActionSearch {
>String RFCelement = wdContext.currentContextElement().getLocalMatnr();
>wdThis.wdGetRodoCustController().wdGetContext().currentZtest_Rod_InputElement().setMatnr(RFCelement);
> wdThis.wdGetRodoCustController().executeZtest_Rod_Input();
When the user complete the input field and he execute the button Search ...
i obtain the following exception:
java.lang.NullPointerException
at com.sap.tut.wd.rodocomponent.InputRodView.onActionSearch(InputRodView.java:145)
at com.sap.tut.wd.rodocomponent.wdp.InternalInputRodView.wdInvokeEventHandler(InternalInputRodView.java:140)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
... 26 more
Then when i look the SDL server log i see:
#1141 05/06/2008 14:06:04.607 [SAPEngine_Application_Thread[impl:3]_12] ERROR com.sap.lcrabapapi.ejb.AbapSLDRequestBean: Caught an Exception while processing a JCO request. Check the RFC engine for sanity and check your server logs and traces for more information.
Thrown:
java.lang.NullPointerException
Rodolphe -
Java.lang.NullPointerException with and update statement
Hello,
I'm getting this exception:
java.lang.NullPointerException
phaseone.AlbumModel.updateImageTrackerAlbums(AlbumModel.java:313)
phaseone.AlbumModel.processRequest(AlbumModel.java:228)
phaseone.AlbumModel.doGet(AlbumModel.java:522)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
I have an open method called before this one that connects me to the database. It works fine and have it working with a bunch of other methods but this one gives me this exception. i've even hard coded the variable 'user' and 'albumNumber' with information that exists in the database. i can't see where this logical error is coming from. I appreciate the help. I've been on this for 3 1/2 hour going blind. thanks!!
public boolean updateImageTrackerAlbums(String user, int albumNumber){
PreparedStatement pstmt = null;
boolean pass = false;
String query = "update imagetracker set totalalbums = ? where username = ?";
try{
pstmt = conn.prepareStatement(query);
pstmt.setInt(1, albumNumber);
pstmt.setString(2, user);
int x = pstmt.executeUpdate();
if (x >= 1){
pass = true;
}catch(SQLException e){
e.printStackTrace();
return pass;
}finally{
DBUtil.closePreparedStatment(pstmt);
return pass;
}code3 wrote:
The exception is pointing to this:
pstmt = conn.prepareStatement(query);
Do you understand anyway when a NullPointerException would be thrown? It will be thrown if you try to access/invoke an object reference which is actually null.
Connection conn = null;
pstmt = conn.prepareStatement(query); // Throws NPE because conn is null. -
Getting error: java.lang.NullPointerException while submitting xml report
hi every one,
i am getting the below error when submitting the Xml report Request
XDO Data Engine Version No: 5.6.3
Resp: 21635
Org ID : 204
Request ID: 5878206
All Parameters: P_ORGANIZATION_ID=7907:P_DELIVERY_DATE_LOW=:P_DELIVERY_DATE_HIGH=:P_FREIGHT_CODE=:P_DELIVERY_ID=:P_TRIP_ID=:P_DELIVERY_LEG_ID=4497:P_ITEM_DISPLAY=D:P_ITEM_FLEX_CODE=MSTK:DebugFlag=N
Data Template Code: CUST_WSH
Data Template Application Short Name: WSH
Debug Flag: N
{P_DELIVERY_DATE_HIGH=, P_ORGANIZATION_ID=7907, P_TRIP_ID=, P_FREIGHT_CODE=, P_DELIVERY_DATE_LOW=, P_ITEM_FLEX_CODE=MSTK, P_ITEM_DISPLAY=D, P_DELIVERY_LEG_ID=4497, P_DELIVERY_ID=}
Calling XDO Data Engine...
java.lang.NullPointerException
at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:379)
at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:226)
at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:283)
at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
Output file size:
0
Finished executing request completion options.
please help me out
Regards,
pavanAbove problem is solved.
but now i am facing one more problem
i intend to get output in pdf format
but i am getting in xml format
kindly help -
Java.lang.NullPointerException and ConnectionPool problem
refresh page , problem gone
java.lang.NullPointerException
at Deferment.UpdatePostgraduate.getStatus(UpdatePostgraduate.java:278)
at Deferment.UpdatePostgraduate.doPost(UpdatePostgraduate.java:175)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
UpdatePostgraduate.java:278
->while (rs.next()) {
175-> tarCount=getStatus(userid);
now I have
Connection conn = null;
CallableStatement calstat=null;
ResultSet rs = null;
in every of my function
and my
public Connection getConnection() throws SQLException, ServletException { Connection conn = null; try{ pool.getConnection(); }catch (SQLException sqle) { throw new ServletException(sqle.getMessage()); } return conn; }private DataSource pool = null;
int tarCount;
int sendMail;
@Override
public void init() throws ServletException {
Context env = null;
try {
env = (Context) new InitialContext().lookup("java:comp/env");
pool = (DataSource) env.lookup("jdbc/test");
if (pool == null) {
throw new ServletException(
"'jdbc/test' is an unknown DataSource"); }
} catch (NamingException ne) {
throw new ServletException(ne);
public Connection getConnection()
throws SQLException, ServletException
Connection conn = null;
try{
conn=pool.getConnection();
}catch (SQLException sqle) {
System.out.println("JDBC error:" + sqle.getMessage());
sqle.printStackTrace();
return conn;
}then on every function I call it like
private int getFound(String UNumber) throws Exception {
Connection conn = null;
CallableStatement calstat=null;
ResultSet rs = null;
try {
conn = pool.getConnection();
calstat = (CallableStatement) conn.prepareCall("{call DuplicatePost(?)}");
calstat.setString(1, UNumber);
rs = calstat.executeQuery();
tarCount = 0;
while (rs.next()) {
tarCount++;
} catch (SQLException se) {
System.out.println("JDBC error:" + se.getMessage());
se.printStackTrace();
} catch (Exception e) {
System.out.println("other error:" + e.getMessage());
e.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
if (calstat != null) {
calstat.close();
} catch (SQLException e) {
e.printStackTrace();
} //end finally
return tarCount;
}// end function
}// end -
Hi Guys
I am having some problem as I am using a DataSource for connections and randomly
the CallableStatements and PreparedStatements created from this DataSource becomes
null and everytime I get NullPointerException with this message.
java.sql.SQLException: java.lang.NullPointerException
at weblogic.jdbc.rmi.SerialPreparedStatement.setString(SerialPreparedStatement.java:210)
at .........
Help will be appreciated..Hi Guys
I am having some problem as I am using a DataSource for connections and randomly
the CallableStatements and PreparedStatements created from this DataSource becomes
null and everytime I get NullPointerException with this message.
java.sql.SQLException: java.lang.NullPointerException
at weblogic.jdbc.rmi.SerialPreparedStatement.setString(SerialPreparedStatement.java:210)
at .........
Help will be appreciated.. -
Java.lang.nullpointerexception when I deactivate the poa and shutdown the o
When I deactivate the poa and shutdown the orb I sometimes get this exception
java.lang.NullPointerException
at com.inprise.vbroker.orb.ORB.getThreadLocalObject(ORB.java:1050)
at com.inprise.vbroker.orb.ServerThreadInfo.create(ServerThreadInfo.java:34)
at com.inprise.vbroker.orb.TPDispatcherImpl.tls(TPDispatcherImpl.java:32)
at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:53)Typically try this:
// for any object (class instance, array) anyObject
if(anyObject == null) {
// process in your own way
} -
Server: JBoss EAP 6.2.0
Client: JDK 1.7.0_51 x64
JAX-WS: RI 2.2.8 ( via -Djava.endorsed.dirs )
I am getting a java.lang.NullPointerException when calling the operation on the WS endpoint from the client when using non-anonymous replyTo address.
I have simplified the scenario into a small test case that hopefully others can replicate. Since the exception is happening on the client instead of the server, I would think that the container used is irrelevant, but I have specified it nonetheless.
1) WebService:
package test.webservice;
import java.util.Random;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.soap.Addressing;
@WebService(targetNamespace="http://services.nowhere.org/")
@Addressing(required=true)
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public class RandomTest {
@WebMethod
public long nextRandom(@WebParam boolean forceException) throws Exception {
if( forceException ) {
throw new Exception("Some exception");
Random rand = new Random();
return rand.nextLong();
2) Generated WSDL by JBossEAP 6.2.2:
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://webservice.test/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="RandomTestService" targetNamespace="http://webservice.test/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservice.test/" elementFormDefault="unqualified" targetNamespace="http://webservice.test/" version="1.0">
<xs:element name="nextRandom" type="tns:nextRandom"/>
<xs:element name="nextRandomResponse" type="tns:nextRandomResponse"/>
<xs:complexType name="nextRandom">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="nextRandomResponse">
<xs:sequence>
<xs:element name="return" type="xs:long"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="nextRandom">
<wsdl:part element="tns:nextRandom" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="nextRandomResponse">
<wsdl:part element="tns:nextRandomResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="RandomTest">
<wsdl:operation name="nextRandom">
<wsdl:input message="tns:nextRandom" name="nextRandom" wsam:Action="http://webservice.test/RandomTest/nextRandomRequest" wsaw:Action="http://webservice.test/RandomTest/nextRandomRequest">
</wsdl:input>
<wsdl:output message="tns:nextRandomResponse" name="nextRandomResponse" wsam:Action="http://webservice.test/RandomTest/nextRandomResponse" wsaw:Action="http://webservice.test/RandomTest/nextRandomResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RandomTestServiceSoapBinding" type="tns:RandomTest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsaw:UsingAddressing wsdl:required="true"/>
<wsp:PolicyReference URI="#RandomTestServiceSoapBinding_WSAM_Addressing_Policy"/>
<wsdl:operation name="nextRandom">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="nextRandom">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="nextRandomResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RandomTestService">
<wsdl:port binding="tns:RandomTestServiceSoapBinding" name="RandomTestPort">
<soap:address location="http://localhost:8080/servertest/RandomTest"/>
</wsdl:port>
</wsdl:service>
<wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="RandomTestServiceSoapBinding_WSAM_Addressing_Policy"><wsam:Addressing><wsp:Policy/></wsam:Addressing></wsp:Policy>
</wsdl:definitions>
3) ant build.xml to generate the client code from WSDL
<?xml version="1.0" encoding="UTF-8"?>
<project default="build" basedir="..">
<property name="jaxws.classpath" location="C://jaxws-2.2.8/jaxws-ri/lib/*.jar"/>
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath path="${jaxws.classpath}"/>
</taskdef>
<target name="build" >
<!-- For these to work, the JAR files in tools/jaxws-ri must be included in Ant's classpath -->
<wsimport wsdl="http://localhost:8080/servertest/RandomTest?wsdl"
verbose="true"
sourcedestdir="src"
destdir="bin"
keep="true">
<xjcarg value="-enableIntrospection"/>
</wsimport>
</target>
</project>
4) Client code
4a) ClientTest.java - Actual client run from client
package test.wsclient;
import java.util.ArrayList;
import java.util.List;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.AddressingFeature;
import org.nowhere.services.RandomTest;
import org.nowhere.services.RandomTestService;
public class ClientTest {
public static void main(String args[]) throws Exception {
ClientTest app = new ClientTest();
app.testAddressing();
public void testAddressing() throws Exception {
String REPLY_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallback";
String FAULT_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallbackFault";
RandomTestService service = new RandomTestService();
RandomTest port = service.getRandomTestPort(new AddressingFeature());
BindingProvider provider = (BindingProvider) port;
// pass the replyTo address to the handler
provider.getRequestContext().put("ReplyTo", REPLY_TO_ADDRESS);
provider.getRequestContext().put("FaultTo", FAULT_TO_ADDRESS);
// Register handlers to set the ReplyTo and FaultTo on the SOAP request sent to the WS endpoint
List<Handler> handlerChain = new ArrayList<Handler>();
handlerChain.add(new ClientHandler());
provider.getBinding().setHandlerChain(handlerChain);
// Start endpoint to receive callbacks from WS
Endpoint endpoint = Endpoint.publish(REPLY_TO_ADDRESS, new CallbackSEI());
try {
port.nextRandom(false);
} catch( Exception ex ) {
ex.printStackTrace();
} finally {
Thread.sleep(10000);
endpoint.stop();
System.exit(0);
4b) ClientHandler.java - Used to set the wsa ReplyTo address and FaultTo address when sending SOAP request from client to server
package test.wsclient;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class ClientHandler implements SOAPHandler<SOAPMessageContext> {
public ClientHandler() {};
@Override
public Set<QName> getHeaders() {
return null;
@Override
public void close(MessageContext arg0) {
@Override
public boolean handleFault(SOAPMessageContext context) {
return true;
protected void setAnAddress(SOAPHeader header, String tagName, String address) {
NodeList nodeListReplyTo = header.getElementsByTagName(tagName);
NodeList nodeListAddress = nodeListReplyTo.item(0).getChildNodes();
for (int i = 0; i < nodeListAddress.getLength(); i++) {
Node node = nodeListAddress.item(i);
if ("Address".equals(node.getLocalName())) {
node.setTextContent(address);
break;
protected String getMessageID(SOAPHeader header) {
NodeList nodeListMessageId = header.getElementsByTagName("MessageID");
return nodeListMessageId.item(0).getTextContent();
@Override
public boolean handleMessage(SOAPMessageContext context) {
Boolean isOutbound = (Boolean) context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (isOutbound) {
try {
SOAPEnvelope envelope = context.getMessage().getSOAPPart().getEnvelope();
SOAPHeader header = envelope.getHeader();
/* extract the generated MessageID */
String messageID = getMessageID(header);
context.put("MessageID", messageID);
context.setScope("MessageID", Scope.APPLICATION);
/* change ReplyTo address */
setAnAddress(header, "ReplyTo", (String) context.get("ReplyTo"));
setAnAddress(header, "FaultTo", (String) context.get("FaultTo"));
} catch (Exception ex) {
throw new RuntimeException(ex);
return true;
4c) CallbackSEI.java - endpoint on the client for server to send the SOAP response back to the client
package test.wsclient;
import javax.annotation.Resource;
import javax.jws.Oneway;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.soap.Addressing;
@WebService
@Addressing
//@HandlerChain(file = "/handler-chain.xml")
public class CallbackSEI {
@Resource
private WebServiceContext context;
* If there is no namespace specified in the method below, then the CallbackSEI needs to be in the same package as the
* WS endpoint.
@Oneway
@Action(input="http://services.nowhere.org/RandomTest/nextRandomResponse")
@RequestWrapper(localName="nextRandomResponse", targetNamespace="http://services.nowhere.org/")
public void handleNotification(@WebParam(name="return")long random) {
System.out.println("Asynch response received");
System.out.println( random );
//System.out.println("This response relates to the message ID: "+ getMessageID());
In summary:
Server is listening on port 8080
Client will listen in port 8082 for the callback from the server for the SOAP response
Now when I run the client, I see that the proper behaviour as far as ws-addressing is concerned. That is:
client -- SOAP request ( on port 8080 ) --> server
client <-- HTTP 202 ( empty HTTP body ) --- server
client <-- SOAP response ( on port 8082 ) --- server
All well and good, except that I am getting a NullPointerException on the client side when I call the operation.
With debugging of the SOAP request and responses, I get the following output:
---[HTTP request - http://localhost:8080/servertest/RandomTest]---
Accept: text/xml, multipart/related
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://services.nowhere.org/RandomTest/nextRandomRequest"
User-Agent: JAX-WS RI 2.2.8 svn-revision#13980
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/servertest/RandomTest</To><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomRequest</Action><ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://localhost:8082/servertest/RandomCallback</Address>
</ReplyTo><FaultTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://localhost:8082/servertest/RandomCallbackFault</Address>
</FaultTo><MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</MessageID></S:Header><S:Body><ns2:nextRandom xmlns:ns2="http://services.nowhere.org/"><arg0>false</arg0></ns2:nextRandom></S:Body></S:Envelope>--------------------
---[HTTP response - http://localhost:8080/servertest/RandomTest - 202]---
null: HTTP/1.1 202 Accepted
Content-Length: 0
Content-Type: text/xml;charset=UTF-8
Date: Fri, 18 Jul 2014 08:34:36 GMT
Server: Apache-Coyote/1.1
java.lang.NullPointerException
at com.sun.proxy.$Proxy38.nextRandom(Unknown Source)
at test.wsclient.ClientTest.testAddressing(ClientTest.java:43)
at test.wsclient.ClientTest.main(ClientTest.java:18)
---[HTTP request]---
Cache-control: no-cache
Host: localhost:8082
Content-type: text/xml; charset=UTF-8
Content-length: 704
Connection: keep-alive
Pragma: no-cache
User-agent: Apache CXF 2.7.7.redhat-1
Accept: */*
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomResponse</Action><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:65d8d7fc-09e4-494a-a9c5-0a01faf4d7e6</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8082/servertest/RandomCallback</To><RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</RelatesTo></soap:Header><soap:Body><ns2:nextRandomResponse xmlns:ns2="http://services.nowhere.org/"><return>2870062781194370669</return></ns2:nextRandomResponse></soap:Body></soap:Envelope>--------------------
Asynch response received
2870062781194370669
As you can see from the output above, the proxy is throwing an Exception when it receives the HTTP 202 response.
Any ideas ?I think I have found when I get this error and probably I have found a bug. I will appreciate if someone can confirm this.
In my BPEL project setup, my BPEL process's wsdl file imports another wsdl from different namespace. Here is sample snippet -
<wsdl:definitions targetNamespace="http://namespace/1">
<wsdl:import namespace="http://namespace/2" location="resources/another.wsdl"/>
<plnk:partnerLinkType....../>
</wsdl:definitions>
Please let me know. I checked the bundled samples with Oracle BPEL PM and did not find any similar case where process wsdl imports another wsdl.
Thank you.
Meghana
Maybe you are looking for
-
BUPA creation from customer and Vendor Master data in R/3 - Urgent!!
Hello All, Firstly I am posting this query in this group to figure out a way to achieve this functionality of integration and moving Business Partners. <u>Requirement: </u>On creation of every Customer or Vendor in R/3 we need to create a Business Pa
-
Recurent error with amserver.war on Sun AS 9.1
I found 2 main problems installing with amconfig script : This first one i'm going to post if anyone else runs against this problem 1. java.lang.UnsatisfiedLinkError: no jss4 in java.library.path (Stack trace ignored ) i solved this error adding the
-
Can anybody explain how to create a condition table in a detailed manner step by step? Thanks in advance for the answers.
-
Reports 2.5 to 6i migration
We are upgrading reports 2.5 on a win 95 platform to reports 6i on win 2000 and the reports will be web based. Has any one done this? are there any known problems when re-compliling/generating the old 2.5 reports into 6i reports. Cheers Nick
-
HT5858 my ipad screen won't rotate. It is locked in the vertical position
Ipad screen is locked in position. Won't rotate.