Parameterized Transformation in BPM- Null Pointer exception

Dear All,
I'm doing RFC Lookup in the mapping Transform inside BPM. I have defined the parameters in Message Mapping, Operation Mapping as well as Configurable parameters in Transformation step inside BPM. I don't know if there are any additional steps needs to be done.
If you have any thought on the below error, can you please help me out?
Thanks!

null Thrown: java.lang.NullPointerException: null at com.sap.guid.GUID.parseHexGUID(GUID.java:1046) at com.sap.guid.GUIDGenerator.parseHexGUID(GUIDGenerator.java:111) at com.sap.aii.utilxi.misc.api.GUIDFactory.parseHexGUID(GUIDFactory.java:127) at com.sap.aii.ibrun.sbeans.mapping.ParametrizationMap.createInputParameter(ParametrizationMap.java:140) at com.sap.aii.ibrun.sbeans.mapping.ParametrizationMap.createElement(ParametrizationMap.java:112) at com.sap.aii.ibrun.sbeans.mapping.ParametrizationMap.createParametrizations(ParametrizationMap.java:57) at com.sap.aii.ibrun.sbeans.mapping.ParametrizationMap.<init>(ParametrizationMap.java:37) at com.sap.aii.ibrun.sbeans.mapping.ParametrizationMap.newInstance(ParametrizationMap.java:65) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:111) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor423.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy901.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor4292.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:267) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:266)

Similar Messages

  • Null Pointer Exception with Oracle Transformer

    Hi all,
    I'm getting a NullPointerException after building a DOM tree and feeding it to a stream via the Oracle JAXP transformer. I am trying to convert the data in DOMSource to PDF file. The following code:
    TransformerFactory transFact = TransformerFactory.newInstance();
    Transformer transForm = transFact.newTransformer();
    ByteArrayOutputStream pdfOutStream = new ByteArrayOutputStream();
    DOMSource pdfInput = new DOMSource(doc);
    StreamResult pdfOutput = new StreamResult(pdfOutStream);
    transForm.transform(pdfInput,pdfOutput);
    int pdfByteSize = pdfOutStream.size();
    System.out.println("Size of pdfByteSize : "+ pdfByteSize);
    pdfByte = new byte[pdfByteSize];
    pdfByte = pdfOutStream.toByteArray();
    InputStream formInputStream = new ByteArrayInputStream(pdfByte);
    Iam getting error at "transForm.transform(pdfInput,pdfOutput);".
    Here the StackTrace :
    07/05/24 10:59:40 XML-22900: (Fatal Error) An internal error condition occurred.
    javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
    Caused by: java.lang.NullPointerException
         at oracle.xml.parser.v2.XMLText.reportSAXEvents(XMLText.java:402)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:3061)
         at oracle.xml.parser.v2.XMLElement.reportChildSAXEvents(XMLElement.java:3072)
         at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:2165)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:337)
    Environment we are using is Sun JDK 1.4.2_06 on Windows, running JDeveloper 10 g with OC4j as Application Server.
    Can any one please explain me in this regard?
    Thanks
    Manoj

    Thanks for the Reply.
    Before Null Pointer Exception I am getting another Fatal error:
    javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:775)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374)
    Please Help

  • Adding a new UDF throws a null pointer exception and modifying user.xml

    Hello,
    I have a two part question.
    i. I am trying to add a UDF (using Advanced>User Configuration..Attributes) to a fully configured OIM i.e. oim with reconciliation and provisioning from and to resources but it throws a null pointer exception. Look at the log, I see
    ===============Excerpt form the log file==========
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [[
    ---Stack Trace Begins[[This is not an exception. For debugging purposes]]---
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.doCheckAccess(OESAuthzServiceImpl.java:210)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:188)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:180)
    oracle.iam.platform.authz.impl.AuthorizationServiceImpl.hasAccess(AuthorizationServiceImpl.java:173)
    oracle.iam.configservice.impl.ConfigManagerImpl.checkAuthorization(ConfigManagerImpl.java:1899)
    oracle.iam.configservice.impl.ConfigManagerImpl.addAttribute(ConfigManagerImpl.java:177)
    oracle.iam.configservice.api.ConfigManagerEJB.addAttributex(Unknown Source)
    ... 21 lines skipped..
    oracle.iam.configservice.api.ConfigManager_5u0nrx_ConfigManagerRemoteImpl.addAttributex(ConfigManager_5u0nrx_ConfigManagerRemoteImpl.java:864)
    ... 13 lines skipped..
    oracle.iam.configservice.api.ConfigManagerDelegate.addAttribute(Unknown Source)
    oracle.iam.configservice.agentry.config.CreateAttributeActor.perform(CreateAttributeActor.java:266)
    oracle.iam.consoles.faces.mvc.canonic.Model.perform(Model.java:547)
    oracle.iam.consoles.faces.mvc.admin.Model.perform(Model.java:324)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doPerform(Controller.java:255)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doSelectAction(Controller.java:178)
    oracle.iam.consoles.faces.event.NavigationListener.processAction(NavigationListener.java:97)
    ... 24 lines skipped..
    oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:115)
    ... weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:100)
    ... 15 lines skipped..
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ---Stack Tracefor this call Ends---
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: 1] [arg: null] [arg: USER_MANAGEMENT_CONFIG] [arg: CREATE_ATTRIBUTE] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = USER_MANAGEMENT_CONFIG, Action = CREATE_ATTRIBUTE **********
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: Decision :PERMIT\nObligations from policy: ] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    =============Excerpt ends==============
    Is there a reason why this is and how do I get by it.
    ii. Can I just add the field directly within the MDS>file/user.xml? Would there be an issue with changing an existing attribute metadata using the user.xml?

    Pradeep thank you for your response. it was helpful. However, I also found the responses to both my questions.
    i. The null pointer exception was due to using a complex query I was using in the LOV query. I tried a simple query and that worked fine.
    ii. For modifying the user defined attributes one can consult the following forum post:
    OIM 11g - Change UDF Field Type form String to LOV
    Thanks

  • Null Pointer Exception Error's in WebDynpro Java

    Hi All,
    How Types are coming Null Pointer Exception Error's in WebDynpro Java, Please provide the types.of Errors.
    Ex. Cardinality Type not correct etc...
    Thanks,
    Bye,
    Vijay Hari.

    HI
      Null Pointer Exception can occur in may instances , for suppose
      1) when  you create a Value Node with some attribute which has cardinality , and you have not
      initialized the Node , then it would through  Null Pointer exception ,
      2) when you integrate the RFC and parameters you pass as input to the RFC are not set correctly
          then there could be null pointer when you execute the RFC
      3>or may be when you doesnot bind the node when using webservice then there could be null pointer exception
    and there could be many occurances  for the exception

  • Null pointer exception with inner class

    Hi everyone,
    I've written an applet that is an animation of a wheel turning. The animation is drawn on a customised JPanel which is an inner class called animateArea. The main class is called Rotary. It runs fine when I run it from JBuilder in the Applet Viewer. However when I try to open the html in internet explorer it gives me null pointer exceptions like the following:
    java.lang.NullPointerException      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2761)      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2722)      
    at Rotary$animateArea.paintComponent(Rotary.java:251)      
    at javax.swing.JComponent.paint(JComponent.java:808)      
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)      
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)      
    at javax.swing.JComponent._paintImmediately(JComponent.java:4668)      
    at javax.swing.JComponent.paintImmediately(JComponent.java:4477)      
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)      
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)      
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)      
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)      
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)      
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)      
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Do inner classes have to be compiled seperately or anything?
    Thanks a million for you time,
    CurtinR

    I think that I am using the Java plugin ( Its a computer in college so I'm not certain but I just tried running an applet from the Swing tutorial and it worked)
    Its an image of a rotating wheel and in each sector of the wheel is the name of a person - when you click on the sector it goes red and the email window should come up (that doesn't work yet though). The stop and play buttons stop or start the animation. It is started by default.
    This is the code for the applet:
    import java.applet.*;
    import javax.swing.JApplet;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.util.StringTokenizer;
    import java.net.*;
    public class Rotary extends JApplet implements ActionListener, MouseListener
    public boolean rotating;
    private Timer timer;
    private int delay = 1000;
    private AffineTransform transform;
    private JTextArea txtTest; //temp
    private Container c;
    private animateArea wheelPanel;
    private JButton btPlay, btStop;
    private BoxLayout layout;
    private JPanel btPanel;
    public Image wheel;
    public int currentSector;
    public String members[];
    public int [][]coordsX, coordsY; //stores sector no. and x or y coordinates for that point
    final int TOTAL_SECTORS= 48;
    //creates polygon array - each polygon represents a sector on wheel
    public Polygon polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
    polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
    polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
    polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
    polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48;
    public Polygon polySectors[]={polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
                      polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
                      polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
                      polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
                      polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48};
    public void init()
    members = new String[TOTAL_SECTORS];
    coordsX= new int[TOTAL_SECTORS][4];
    coordsY= new int[TOTAL_SECTORS][4];
    currentSector = -1;
    rotating = true;
    transform = new AffineTransform();
    //***********************************Create GUI**************************
    wheelPanel = new animateArea(); //create a canvas where the animation will be displayed
    wheelPanel.setSize(600,580);
    wheelPanel.setBackground(Color.yellow);
    btPanel = new JPanel(); //create a panel for the buttons
    btPanel.setLayout(new BoxLayout(btPanel,BoxLayout.Y_AXIS));
    btPanel.setBackground(Color.blue);
    btPanel.setMaximumSize(new Dimension(30,580));
    btPanel.setMinimumSize(new Dimension(30,580));
    btPlay = new JButton("Play");
    btStop = new JButton("Stop");
    //txtTest = new JTextArea(5,5); //temp
    btPanel.add(btPlay);
    btPanel.add(btStop);
    // btPanel.add(txtTest); //temp
    c = getContentPane();
    layout = new BoxLayout(c,layout.X_AXIS);
    c.setLayout(layout);
    c.add(wheelPanel); //add panel and animate canvas to the applet
    c.add(btPanel);
    wheel = getImage(getDocumentBase(),"rotary2.gif");
    getParameters();
    for(int k = 0; k <TOTAL_SECTORS; k++)
    polySectors[k] = new Polygon();
    for(int n= 0; n<4; n++)
    polySectors[k].addPoint(coordsX[k][n],coordsY[k][n]);
    btPlay.addActionListener(this);
    btStop.addActionListener(this);
    wheelPanel.addMouseListener(this);
    startAnimation();
    public void mouseClicked(MouseEvent e)
    if (rotating == false) //user can only hightlight a sector when wheel is not rotating
    for(int h= 0; h<TOTAL_SECTORS; h++)
    if(polySectors[h].contains(e.getX(),e.getY()))
    currentSector = h;
    wheelPanel.repaint();
    email();
    public void mouseExited(MouseEvent e){}
    public void mouseEntered(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}
    public void mousePressed(MouseEvent e){}
    public void email()
    try
    URL rotaryMail = new URL("mailto:[email protected]");
    getAppletContext().showDocument(rotaryMail);
    catch(MalformedURLException mue)
    System.out.println("bad url!");
    public void getParameters()
    StringTokenizer stSector;
    String parCoords;
    for(int i = 0; i <TOTAL_SECTORS; i++)
    {               //put member names in applet parameter list into an array
    members[i] = getParameter("member"+i);
    //separate coordinate string and store coordinates in 2 arrays
    parCoords=getParameter("sector"+i);
    stSector = new StringTokenizer(parCoords, ",");
    for(int j = 0; j<4; j++)
    coordsX[i][j] = Integer.parseInt(stSector.nextToken());
    coordsY[i][j] = Integer.parseInt(stSector.nextToken());
    public void actionPerformed(ActionEvent e)
    wheelPanel.repaint(); //repaint when timer event occurs
    if (e.getActionCommand()=="Stop")
    stopAnimation();
    else if(e.getActionCommand()=="Play")
    startAnimation();
    public void startAnimation()
    if(timer == null)
    timer = new Timer(delay,this);
    timer.start();
    else if(!timer.isRunning())
    timer.restart();
    Thanks so much for your help!

  • Custom Schedule Task ( Null Pointer Exception)

    Hi All,
    I had written Custom Schedule task: Below is the code
    When i run the Schedule task it is failing throwing Null Pointer Exception. the code is not able to fetch userId ,passwordex and passwordwar values in execute method. please help me
    package oracle.iam.sample.notification;
    import java.sql.Date;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import oracle.iam.identity.exception.NoSuchUserException;
    import oracle.iam.identity.exception.UserLookupException;
    import oracle.iam.identity.usermgmt.api.UserManager;
    import oracle.iam.identity.usermgmt.vo.User;
    import oracle.iam.notification.api.NotificationService;
    import oracle.iam.notification.exception.EventException;
    import oracle.iam.notification.exception.MultipleTemplateException;
    import oracle.iam.notification.exception.NotificationException;
    import oracle.iam.notification.exception.NotificationResolverNotFoundException;
    import oracle.iam.notification.exception.TemplateNotFoundException;
    import oracle.iam.notification.exception.UnresolvedNotificationDataException;
    import oracle.iam.notification.exception.UserDetailsNotFoundException;
    import oracle.iam.notification.vo.NotificationEvent;
    import oracle.iam.platform.Platform;
    import oracle.iam.platform.authz.exception.AccessDeniedException;
    import oracle.iam.scheduler.vo.TaskSupport;
    import static oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName.MANAGER_KEY;
    import static oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName.USER_LOGIN;
    import oracle.iam.platform.kernel.vo.Orchestration;
    public class PasswordExpiry extends TaskSupport {
    public PasswordExpiry() {
    super();
    public void execute(HashMap taskParameters) {
    System.out.println("inside the Execute methode");
    System.out.println("Schedule task Arguments "+taskParameters);
    String userId = (String)taskParameters.get("User Login");
    System.out.println("===========input=============== "+userId);
    String passwordex=taskParameters.get("usr_pwd_expire_date").toString();
    System.out.println("===========input=============== "+passwordex);
    String passwordwar=taskParameters.get("usr_pwd_warn_date").toString();
    System.out.println("===========input=============== "+passwordwar);
    try {
    System.out.println("inside the Try block");
    NotificationService notService = Platform.getService(NotificationService.class);
    NotificationEvent eventToSend = this.createNotificationEvent(userId, passwordex,passwordwar);
    notService.notify(eventToSend);
    } catch (Exception e) {
    e.printStackTrace();
    private NotificationEvent createNotificationEvent(String userKey, String passwordex,
    String passwordwar) throws NoSuchUserException, UserLookupException,
    AccessDeniedException {
    NotificationEvent event = new NotificationEvent();
    //get user IDs to whom notification is to be sent and set it in the
    //event object being created
    String[] receiverUserIds= getRecipientUserIds(userKey);
    event.setUserIds(receiverUserIds);
    //Set template name to be used to send notification for this event
    event.setTemplateName("PasswordWarningNotificationTemplate");
    //Setting senderId as null here and hence default sender ID would
    //get picked up
    event.setSender(null);
    //Create a map with key value pair for the parameters declared at time
    //of configuring notification event
    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("usr_key", userKey);
    map.put("usr_pwd_warn_date", passwordex);
    map.put("usr_pwd_expire_date",passwordwar);
    event.setParams(map);
    return event;
    private String[] getRecipientUserIds(String userKey) throws NoSuchUserException,
    UserLookupException, AccessDeniedException {
    UserManager usrMgr = Platform.getService(UserManager.class);
    User user = null;
    String userId = null;
    Set<String> userRetAttrs = new HashSet<String>();
    //Sending notification to both the user and his/her manager
    userRetAttrs.add(MANAGER_KEY.getId());
    userRetAttrs.add(USER_LOGIN.getId());
    User manager = null;
    String managerId = null;
    String managerKey = null;
    Set<String> managerRetAttrs = new HashSet<String>();
    managerRetAttrs.add(USER_LOGIN.getId());
    //Retrieving User ID
    user = usrMgr.getDetails(userKey, userRetAttrs, false);
    userId = user.getAttribute(USER_LOGIN.getId()).toString();
    List<String> userIds = new ArrayList<String>();
    userIds.add(userId);
    if (user.getAttribute(MANAGER_KEY.getId()) != null) {
    managerKey = user.getAttribute(MANAGER_KEY.getId()).toString();
    manager = usrMgr.getDetails(managerKey, managerRetAttrs, false);
    //Retrieving User's Manager ID
    managerId = manager.getAttribute(USER_LOGIN.getId()).toString();
    userIds.add(managerId);
    //To return String[] than an Object array
    String[] recipientIDs = userIds.toArray(new String[0]);
    return recipientIDs;
    * Call notification Engine passing an event object to it
    * @param event
    * @throws NotificationException
    private void sendNotification(NotificationEvent event) throws NotificationException {
    try {
    //Call notify method of NotificationService to pass on the event
    //to notification engine
    NotificationService notificationService = Platform.getService(
    NotificationService.class);
    notificationService.notify(event);
    } catch (EventException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (UnresolvedNotificationDataException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (TemplateNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (MultipleTemplateException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (NotificationResolverNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (UserDetailsNotFoundException e) {
    throw new NotificationException(e.getMessage(), e.getCause());
    } catch (NotificationException e){
    throw e;
    public HashMap getAttributes() {
    return null;
    public void setAttributes() {}
    Thank you

    The task parameters passed into a scheduled job are the parameters defined for the scheduled task definition in the metadata xml and configured in the scheduled job. They are not the data of an individual user as you seem to be trying to get. In a scheduled task I would expect some sort of search for users to operate on.

  • Null Pointer Exception

    Hi ,
    We are using SO_DOCUMENT_SEND_API1 this BAPI to send mails in our application.Here we are passing values to the input parameters  SENDER_ADDRESS,SENDER_ADDRESS_TYPE,COMMIT_WORK .
    and we need to pass values to the tables also.one table name in the bapi is PACKING_LIST  type SOPCKLSTI1(structure).
    we have used the following code  to pass the values to the table :
                          Sopcklsti1 input_doctype = new Sopcklsti1();
         Sopcklsti1_List maillist = new Sopcklsti1_List();
         input_doctype.setDoc_Type("RAW");
         maillist.addSopcklsti1(input_doctype);
         inputmail.setPacking_List(maillist);
    When  we are running the application it is giving us the java null pointer exception.
    Any inputs on this .
    Regards,
    Pavani

    Hi pavani,
    follow this procedure,
    1)First create object for the structure.
    2)Using this object set values to attributes.
    3)Bind this object to the node.
    4)execute the bapi.
    Regards,
    Sunaina Reddy T

  • While trying to send mail getting NUll Pointer exception

    Hi,
    I am trying to send email through email notification but instance doesn't through any fault but on opmn log it sends null pointer exception and doesn't send any mail. But some other flow using same SMTP server are able to send mail.
    Exceptions:
    07/11/14 16:46:25 java.lang.NullPointerException
    07/11/14 16:46:25      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:363)
    07/11/14 16:46:25      at oracle.tip.pc.services.notification.email.EmailDriver.sendMessage(EmailDriver.java:207)
    07/11/14 16:46:25      at oracle.tip.pc.services.notification.email.EmailDriver.send(EmailDriver.java:185)
    07/11/14 16:46:25      at oracle.tip.pc.services.notification.DefaultNotificationServiceImpl.sendEmailNotification(DefaultNotificationServiceImpl.java:251)
    07/11/14 16:46:25      at oracle.tip.pc.services.notification.NotificationServiceImpl.sendEmailNotification(NotificationServiceImpl.java:271)
    07/11/14 16:46:25      at oracle.bpel.services.notification.queue.sender.MDBConsumer.deliverNotification(MDBConsumer.java:256)
    07/11/14 16:46:25      at oracle.bpel.services.notification.queue.sender.MDBConsumer.onMessage(MDBConsumer.java:137)
    07/11/14 16:46:25      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
    07/11/14 16:46:25      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/11/14 16:46:25      at java.lang.reflect.Method.invoke(Method.java:585)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    07/11/14 16:46:25      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/11/14 16:46:25      at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    07/11/14 16:46:25      at com.evermind.server.ejb.MessageDrivenConsumer.onMessage(MessageDrivenConsumer.java:347)
    07/11/14 16:46:25      at com.evermind.server.ejb.MessageDrivenConsumer.processMessages(MessageDrivenConsumer.java:233)
    07/11/14 16:46:25      at com.evermind.server.ejb.MessageDrivenConsumer.run(MessageDrivenConsumer.java:169)
    07/11/14 16:46:25      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    07/11/14 16:46:25      at java.lang.Thread.run(Thread.java:595)
    Any Idea?

    Hi,
    I am also trying E-mail Activity but I am not able to receive the e-mail.
    I have set the following in the ns_emails.xml
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>Oracle BPM</FromName>
    <FromAddress>[email protected]</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>Server' IPADRESS</SMTPHost>
    <SMTPPort>25</SMTPPort>
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <SMTPHost>Server' IPADRESS</SMTPHost>
    <SMTPPort>25</SMTPPort>
    </IncomingServerSettings>
    In this "[email protected]" is the user configured and "Server' IPADRESS" is the IPADDRESS of the SMTP server.
    Moreover I have also have SMTP server as the incoming server.
    Now I have a simple BPEL PROCESS having Email Activity of sending a mail.
    The "To" section has "[email protected]".
    I am not able to recive the mail and I have also cheked the SMTP server there is no mail there but BPEL Process runs fine.
    I also have one Script which can send mail to the user Ihave mentioned and it works fine.So server setting seems to be fine.Are there any other setting required.
    If you are able to send the mail then can you give me your inputs on this issue.
    Regards
    Lalit

  • REG : Null Pointer Exception for RFC values

    Hi All,
    I am facing peculiar erro in code.I need to check the null entries in SAP server then it should be replaced by space and if not null then should be replaced by the value in backend.But it is throwing null pointer exception
    I am using equalsignore case(null) and trim for space.
    I am not getting why its is throwing null pointer  exception.Kindly advise
    Regards,
    Anupama

    Hi
    Use
    String f = null ;
    if(f!==null)
    Wdcomponent.getMessageManager.ReportException ("this will cause null pointer exception  "+ f.length());
    Better to give it any Constant like
    priveate static final String NULL_CHECK  = "DEL_VAL12";
    rather than space ,at the time of chceking see if it has  DEL_VAL12 if true then put the actual data else let it be there.
    Best Regards
    Satish Kumar

  • Why am I receiving Null pointer Exception Error.

    why am I receiving Null pointer Exception Error.
    Hi I am developing a code for login screen. There is no syntex error as such ut I am receving the aove mentioned error. Can some one please help me ??
    ------------ Main.java------------------
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Main implements ActionListener
    Frame mainf;
    MenuBar mb;
    MenuItem List,admitform,inquiry,exit,helpn;
    Menu newm,update,help;
    Inquiry iq;
    Admit ad;
    // HosHelp hp;
    Howuse hu;
    Register reg;
    Main()
    mainf=new Frame(" Engg College V/S Mumbai University ");
         mb=new MenuBar();
         newm=new Menu(" New ");
         update=new Menu(" Update ");
         help=new Menu(" Help ");
         List=new MenuItem("List");
         admitform=new MenuItem("Admit");
         inquiry=new MenuItem("Inquiry");
         exit=new MenuItem("Exit");
         helpn=new MenuItem("How to Use?");
    newm.add(List);
                   newm.add(admitform);
    newm.add(inquiry);
                   newm.add(exit);
         help.add(helpn);
              mb.add(newm);
              mb.add(update);
              mb.add(help);
    mainf.setMenuBar(mb);
                   exit.addActionListener(this);
                   List.addActionListener(this);
         inquiry.addActionListener(this);
         admitform.addActionListener(this);
    helpn.addActionListener(this);
         mainf.setSize(400,300);
         mainf.setVisible(true);
    public void actionPerformed(ActionEvent ae)
    if (ae.getSource()==List)
              reg=new Register();
         if(ae.getSource()==inquiry)
         iq=new Inquiry();
    if(ae.getSource()==admitform)
         ad=new Admit();
              if(ae.getSource()==helpn)
              hu=new Howuse();
              if(ae.getSource()==exit)
         mainf.setVisible(false);
    public static void main(String args[])
              new Main();
    -------------Register.java---------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Register implements ActionListener//,ItemListener
    Label id,name,login,pass,repass;
    Button ok,newu,cancel,check;
    Button vok,iok,lok,mok,sok; //buttons for dialog boxes
    TextField idf,namef,loginf,passf,repassf;
    Dialog valid,invlog,less,mismat,acucreat;
    Frame regis;
    Checkbox admin,limit;
    CheckboxGroup type;
    DBconnect db;
    Register()
         db=new DBconnect();
    regis=new Frame("Registeration Form");
              type=new CheckboxGroup();
              admin=new Checkbox("Administrator",type,true);
              limit=new Checkbox("Limited",type,false);
              id=new Label("ID :");
    name=new Label("Name :");
         login=new Label("Login :");
         pass=new Label("Password :");
         repass=new Label("Retype :");
    idf =new TextField(20); idf.setEnabled(false);
         namef=new TextField(30); namef.setEnabled(false);
    loginf=new TextField(30); loginf.setEnabled(false);
         passf=new TextField(30); passf.setEnabled(false);
         repassf=new TextField(30); repassf.setEnabled(false);
    ok=new Button("OK"); ok.setEnabled(false);
         newu=new Button("NEW");
    cancel=new Button("Cancel");
         check=new Button("Check Login"); check.setEnabled(false);
    vok=new Button("OK");
         iok=new Button("OK");
              lok=new Button("OK");
              mok=new Button("OK");
              sok=new Button("OK");
    valid=new Dialog(regis,"Login name is valid !");
         invlog=new Dialog(regis,"Login name already exist!");
         less=new Dialog(regis,"Password is less than six characters !");
    mismat=new Dialog(regis,"password & retyped are not matching !");
    acucreat=new Dialog(regis,"You have registered successfully !");
         regis.setLayout(null);
    //     regis.setBackground(Color.orange);
    valid.setLayout(new FlowLayout());
         invlog.setLayout(new FlowLayout());
         less.setLayout(new FlowLayout());
         mismat.setLayout(new FlowLayout());
    acucreat.setLayout(new FlowLayout());
    id.setBounds(35,50,80,25); //(left,top,width,hight)
    idf.setBounds(125,50,40,25);
    name.setBounds(35,85,70,25);
    namef.setBounds(125,85,150,25);
    login.setBounds(35,120,80,25);
    loginf.setBounds(125,120,80,25);
    check.setBounds(215,120,85,25);
         pass.setBounds(35,155,80,25);
    passf.setBounds(125,155,80,25);
    repass.setBounds(35,190,80,25);
    repassf.setBounds(125,190,80,25);
    admin.setBounds(35,225,100,25);
    limit.setBounds(145,225,100,25);
              ok.setBounds(45,265,70,25);
         newu.setBounds(135,265,70,25);
    cancel.setBounds(225,265,70,25);
         passf.setEchoChar('*');
    repassf.setEchoChar('*');
         regis.add(id);
         regis.add(idf);
    regis.add(name);
         regis.add(namef);
         regis.add(login);
         regis.add(loginf);
         regis.add(check);
    regis.add(pass);
         regis.add(passf);
    regis.add(repass);
         regis.add(repassf);
         regis.add(ok);
         regis.add(newu);
         regis.add(cancel);
    regis.add(admin);
         regis.add(limit);
    valid.add(vok);
         invlog.add(iok);     
         less.add(lok);
         mismat.add(mok);
    acucreat.add(sok);
    ok.addActionListener(this);
         newu.addActionListener(this);
    check.addActionListener(this);
    cancel.addActionListener(this);
         // limit.addItemListener(this);
         //admin.addItemListener(this);
              vok.addActionListener(this);
              iok.addActionListener(this);
         lok.addActionListener(this);
         mok.addActionListener(this);
         sok.addActionListener(this);
    regis.setLocation(250,150);
    regis.setSize(310,300);
    regis.setVisible(true);
         public void actionPerformed(ActionEvent ae)
         if(ae.getSource()==check)
              try{
                   String s2=loginf.getText();
    ResultSet rs=db.s.executeQuery("select* from List");
                        while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
    //                    invlog.setBackground(Color.orange);
                             invlog.setLocation(250,150);
                             invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                             break;
                        else
                        //     valid.setBackground(Color.orange);
                             valid.setLocation(250,150);
                             valid.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                   valid.setVisible(true);
                        }catch(Exception e)
                   e.printStackTrace();
    if(ae.getSource()==newu)
         try{
              ResultSet rs=db.s.executeQuery("select max(ID) from List");
         while(rs.next())
    String s1=rs.getString(1).trim();
                   int i=Integer.parseInt(s1);
    i++;
                   String s2=""+i;
    idf.setText(s2);
                   newu.setEnabled(false);
                   namef.setText(""); namef.setEnabled(true);
              loginf.setText(""); loginf.setEnabled(true);
              passf.setText(""); passf.setEnabled(true);
              repassf.setText(""); repassf.setEnabled(true);
              ok.setEnabled(true);
                   check.setEnabled(true);
                   }catch(Exception e)
              e.printStackTrace();
         if(ae.getSource()==ok)
              try
              String s1=idf.getText();
              String s2=loginf.getText();
              String s3=passf.getText();
         String s4=repassf.getText();
         int x=Integer.parseInt(s1);
         int t;
         if(type.getSelectedCheckbox()==admin)
              t=1;
              else
              t=0;
    ResultSet rs=db.s1.executeQuery("select* from List");
                   while(rs.next())
                   if(s2.equals(rs.getString(2).trim()))
                        invlog.setBackground(Color.orange);
                        invlog.setLocation(250,150);
                        invlog.setSize(300,100);
                   cancel.setEnabled(false);
    ok.setEnabled(false);
    check.setEnabled(false);
                        invlog.setVisible(true);
                        break;
                   else
                        if (s3.length()<6)
                        less.setBackground(Color.orange);
                             less.setLocation(250,150);
                             less.setSize(300,100);
                   ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        less.setVisible(true);
    else if(!(s3.equals(s4)))
                        mismat.setBackground(Color.orange);
                        mismat.setLocation(250,150);
                        mismat.setSize(300,100);
                        ok.setEnabled(false);
                        cancel.setEnabled(false);
                        check.setEnabled(false);
                        mismat.setVisible(true);
                        else
    db.s1.execute("insert into User values("+x+",'"+s2+"','"+s3+"',"+t+")");
                        acucreat.setBackground(Color.orange);
                        acucreat.setLocation(250,150);
                        acucreat.setSize(300,100);
                        regis.setVisible(false);
                        acucreat.setVisible(true);
                   }//else
              }//while
                   } //try
              catch(Exception e1)
              // e1.printStackTrace();
              if (ae.getSource()==cancel)
              regis.setVisible(false);
              if (ae.getSource()==vok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   valid.setVisible(false);
              if (ae.getSource()==iok)
              ok.setEnabled(true);
                   cancel.setEnabled(true);
    check.setEnabled(true);
                   invlog.setVisible(false);
              if (ae.getSource()==lok)
              less.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
              if (ae.getSource()==mok)
              mismat.setVisible(false);
                   cancel.setEnabled(true);
    ok.setEnabled(true);
    check.setEnabled(true);
    if (ae.getSource()==sok)
              acucreat.setVisible(false);
              ok.setEnabled(false);
                   newu.setEnabled(true);
                   regis.setVisible(true);
         public static void main(String args[])
         new Register();
    -----------DBConnect.java------------------------------------
    import java.sql.*;
    public class DBconnect
    Statement s,s1;
    Connection c;
    public DBconnect()
    try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              c=DriverManager.getConnection("jdbc:odbc:Sonal");
              s=c.createStatement();
    s1=c.createStatement();
         catch(Exception e)
         e.printStackTrace();
    ----------Login.java----------------
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Login implements ActionListener
    Frame log;
    Label login,pass;
    TextField loginf,passf;
    Button ok,cancel;
    Dialog invalid;
    Button iok;
    Register reg;
    DBconnect db;
    Main m;
    Login()
    db=new DBconnect();
         log=new Frame();
         log.setLocation(250,210);
         login=new Label("Login :");
    pass=new Label("Password :");
         loginf=new TextField(20);
         passf=new TextField(20);
         passf.setEchoChar('*');
         ok=new Button("OK");
         // newu=new Button("New User");
         cancel=new Button("CANCEL");
         iok=new Button(" OK ");
    invalid=new Dialog(log,"Invalid User!");
    //log.setBackground(Color.cyan);
    //log.setForeground(Color.black);
         log.setLayout(null);
         // iok.setBackground(Color.gray);
         invalid.setLayout(new FlowLayout());
         login.setBounds(35,50,70,25); //(left,top,width,hight)
         loginf.setBounds(105,50,100,25);
         pass.setBounds(35,85,70,25);
         passf.setBounds(105,85,70,25);
         ok.setBounds(55,130,70,25);
    // newu.setBounds(85,120,80,25);
    cancel.setBounds(145,130,70,25);
    log.add(login);
    log.add(loginf);
    log.add(pass);
    log.add(passf);
    log.add(ok);
    // log.add(newu);
    log.add(cancel);
         invalid.add(iok);//,BorderLayout.CENTER);
    ok.addActionListener(this);
    // newu.addActionListener(this);
    cancel.addActionListener(this);
         iok.addActionListener(this);
    log.setSize(300,170);
    log.setVisible(true);
    public void actionPerformed(ActionEvent a)
    if(a.getSource()==ok)
         try{
              String l=loginf.getText();
              String p=passf.getText();
              ResultSet rs=db.s.executeQuery("select * from List");
              while(rs.next())
              if(l.equals(rs.getString(2).trim())&& p.equals(rs.getString(3).trim()))
                        String tp=rs.getString(4).trim();
                             int tp1=Integer.parseInt(tp);
    log.setVisible(false);
    if(tp1==1)
                             m=new Main();
                        // m.List.setEnabled(true);
                             else
                             m=new Main();
                             m.List.setEnabled(false);
                        break;
    else
                   invalid.setBackground(Color.orange);
                   invalid.setSize(300,100);
                   invalid.setLocation(250,210);
                   cancel.setEnabled(false);
              ok.setEnabled(false);
                   invalid.setVisible(true);
                   }catch(Exception e1)
                   e1.printStackTrace();
         if (a.getSource()==cancel)
         log.setVisible(false);
         if (a.getSource()==iok)
         invalid.setVisible(false);
         loginf.setText("");
         passf.setText("");
         cancel.setEnabled(true);
    ok.setEnabled(true);
         public static void main(String[] args)
         new Login();
    -------------inquiry.java---------------------------------
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.Date;
    import java.text.*;
    import java.sql.*;
    public class Inquiry implements ActionListener
    Frame inqry;
    Label name,addr;
    TextField namef,addrf;
    Button ok,cancel,dok;
    Dialog invalid;
    Frame result; //Result of the inquiry....
    Label lrname,lraddr,lward,lrdate,lcdate;
    TextField rname,raddr,ward,rdate,cdate;
    Date d;
    DateFormat df;
    Button rok,rcancel;
    Dialog success;
    Button rdok;
    DBconnect db;
    Inquiry()
              db=new DBconnect();
              inqry=new Frame("Inquiry Form");
              inqry.setLayout(null);
    inqry.setBackground(Color.cyan);
              name=new Label(" NAME ");
              addr=new Label("ADDRESS");
              namef=new TextField(20);
              addrf=new TextField(20);
              ok=new Button("OK");
              cancel=new Button("CANCEL");
              dok=new Button("OK");
              invalid=new Dialog(inqry,"Invalid Name or Address !");
              invalid.setSize(300,100);
         invalid.setLocation(300,180);
              invalid.setBackground(Color.orange);
              invalid.setLayout(new FlowLayout());
    result=new Frame(" INQUIRY RESULT "); //Result Window......
    result.setLayout(null);
    result.setBackground(Color.cyan);
    lcdate=new Label(" DATE ");
         lrname=new Label(" NAME ");
    lraddr=new Label(" ADDRESS ");
         lward=new Label(" WARD ");
         lrdate=new Label(" ADMIT-DATE ");
    cdate=new TextField(10);
         rname=new TextField(20);
    rname.setEnabled(false);
         raddr=new TextField(20);
         raddr.setEnabled(false);
         ward=new TextField(20);
         ward.setEnabled(false);
         rdate=new TextField(10);
         rdate.setEnabled(false);
         cdate=new TextField(20);
         d=new Date();
         df=DateFormat.getDateInstance(DateFormat.MEDIUM,Locale.KOREA);
         cdate.setText(df.format(d));
         cdate.setEnabled(false);
    rok=new Button(" OK ");
         rcancel=new Button("CANCEL");
              name.setBounds(40,50,50,25);
    namef.setBounds(120,50,130,25);
    addr.setBounds(40,100,60,25);
    addrf.setBounds(120,100,80,25);
    ok.setBounds(60,145,70,25);
              cancel.setBounds(140,145,70,25);
              lcdate.setBounds(200,50,60,25); //Result Window......
    cdate.setBounds(270,50,80,25);      
    lrname.setBounds(35,85,70,25);
    rname.setBounds(140,85,180,25);
    lraddr.setBounds(35,120,80,25);
         raddr.setBounds(140,120,100,25);
    lward.setBounds(35,155,80,25);
    ward.setBounds(140,155,100,25);
    lrdate.setBounds(30,190,80,25);
    rdate.setBounds(140,190,80,25);
    rok.setBounds(70,240,70,25);
    rcancel.setBounds(170,240,70,25);
              inqry.add(name);
              inqry.add(namef);
              inqry.add(addr);
              inqry.add(addrf);
              inqry.add(ok);
              inqry.add(cancel);
    invalid.add(dok);
         result.add(lcdate); //Result Window......
         result.add(cdate);
              result.add(lrname);
              result.add(rname);
              result.add(lraddr);
              result.add(raddr);
              result.add(lward);
              result.add(ward);
              result.add(lrdate);
              result.add(rdate);
              result.add(rok);
              result.add(rcancel);
         ok.addActionListener(this);
         cancel.addActionListener(this);
         dok.addActionListener(this);
    rok.addActionListener(this); //Result Window......
         rcancel.addActionListener(this);
         inqry.setSize(280,180);
         inqry.setLocation(300,180);
         inqry.setVisible(true);
              result.setSize(400,280); //Result Window......
         result.setLocation(200,150);
         result.setVisible(false);
              public void actionPerformed(ActionEvent ae)
                   if(ae.getSource()==ok)
                   try
                             String nm=namef.getText();
                             String ad=addrf.getText();
                             inqry.setVisible(false);
                             ResultSet rs=db.s.executeQuery("select * from Billinformation");
                             while(rs.next())
                                  String nm1=rs.getString(2).trim();
                                  String ad1=rs.getString(3).trim();
                                  int k=0;
                                  if((nm1.equals(nm))&&(ad1.equals(ad)))
                             String adm=rs.getString(5).trim();
                             String wr=rs.getString(6).trim();
                             String bd=rs.getString(8).trim();
                                  String wrb=wr+"-"+bd;
    result.setVisible(true);
                                  rname.setText(nm1);
                             raddr.setText(ad1);
                             ward.setText(wrb);
                             rdate.setText(adm);
    k=1;
                                  break;
                                  }//if
                             else if(k==1)
                             invalid.setVisible(true);
                             }//while
    }//try
                             catch(Exception e)
                             e.printStackTrace();
                        } //getsource ==ok
                   if(ae.getSource()==cancel)
    inqry.setVisible(false);
                        if(ae.getSource()==rok) //Result Window......
                        namef.setText("");
                             addrf.setText("");
                             result.setVisible(false);
                        inqry.setVisible(true);
    if(ae.getSource()==rcancel)
    result.setVisible(false);
                        if(ae.getSource()==dok)
                        namef.setText("");
                             addrf.setText("");
                             invalid.setVisible(false);
                             inqry.setVisible(true);
         public static void main(String args[])
              new Inquiry();
    PLease Help me !!
    I need this urgently.

    can you explain what your program tries to do... and
    at where it went wrong..Sir,
    We are trying to make an project where we can make a person register in our data base & after which he/she can search for other user.
    The logged in user can modify his/her own data but can view other ppl's data.
    We are in a phase of registering the user & that's where we are stuck. The problem is that after the login screen when we hit register (OK- button) the data are not getting entered in the data base.
    Can u please help me??
    I am using "jdk1.3' - studnet's edition.
    I am waiting for your reply.
    Thanks in advance & yr interest.

  • Null pointer exception and servlet

    I cant figure out why i am getting a null pointer exception. this works if i keep my form output in the same class as my driving servlet. All i did was break off the html display to a new form and i get a null pointer exception.
    this is just an excerpt. no reason to post the whole form.
    Here are my two classes...
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Element;
    public class myServlet extends HttpServlet
       implements SingleThreadModel {
            displayScreen myAddressBook;
            HttpServletRequest request;
            HttpServletResponse response;
            String displayForm = "DISPLAYFORM";
            String addForm     = "ADDFORM";
            String editForm    = "EDITFORM";
         // get function
        public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
              request = this.request;
              response = this.response;
            displayScreen myAddressBook = new displayScreen(this.request,this.response);
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
         errorMsg = "";
         errCount=0;
         //stores address book in hashmap. Not currently using Address Book object
         request = this.request;
        response = this.response;
         if ((request.getParameterValues("submit")[0].equals("Next")))
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    public class displayScreen {
         int errCount;
         String errorMsg;
         String displayForm = "DISPLAYFORM";
         String addForm     = "ADDFORM";
         String editForm    = "EDITFORM";
         HttpServletRequest request;
         HttpServletResponse response;
           displayScreen (HttpServletRequest request, HttpServletResponse response) {
               request = this.request;
               response = this.response;
    public void sendAddressBook (HttpServletRequest request, HttpServletResponse response,boolean FileError,String formType)
             throws ServletException, IOException {
            request = this.request;
            response = this.response;
         response.setContentType("text/html");  /*****/ I GET A NULL POINTER EXCEPTION RIGHT HERE!!!!!!
    }

    anyway to write the system.err to an html screen with
    a servlet?Why would you ask that? Surely you should have asked "Any way to write a stack trace to an HTML screen from a servlet?"
    And in fact there is. I am sure you have not yet looked up the Exception class and the versions of its printStackTrace() method. But when you do, you will see that there are printStackTrace(PrintStream) and printStackTrace(PrintWriter). And you know how to write HTML (or text in general) to the servlet response so that it shows up in the client's browser, right? I will let you figure out how to put those things together.

  • Null Pointer Exception and Illegal Arguement when ran with Wireless Toolkit

    The following code throws a null pointer exception after it tried to initialize the textBox. I am not sure if there is something I am not importing, or if it's just because I'm sick and my head is cloudy. :-}.
    I am using Wireless Toolkit 2.2 and Java 5.0
    Anyhelp would be appreicated. Thank You.
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TacticalTestMain extends MIDlet implements CommandListener {
         private Display display;
         private Form formMain;
         private TextBox tbHelp;          //Text Box for help Command
         private Command cmExit;          //A button to exit midLet
         private Command cmBack;          //Go "back" to main form
         private Command cmHelp;          //Ask for help
         public TacticalTestMain()
              display = Display.getDisplay(this);
              formMain = new Form("Tactical Survey Program");
              cmExit = new Command("Exit", Command.SCREEN, 1);
              cmBack = new Command("Back", Command.BACK, 1);
              cmHelp = new Command("Help", Command.HELP, 1);
              formMain.addCommand(cmExit);
              formMain.addCommand(cmBack);
              formMain.addCommand(cmHelp);
              formMain.setCommandListener(this);
              System.out.println("Before Create Text Box");
              //Create the help textBox with a max of 25 charecters
              tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
              tbHelp.addCommand(cmBack);
              tbHelp.setCommandListener(this);
              System.out.println("AfTER Create Text Box");               
         }//end constructor
         public void startApp()
              System.out.println("Inside StartApp()");
              display.setCurrent(formMain);
         }//end startApp()
         public void pauseApp()
         }//end pauseApp
         public void destroyApp(boolean unconditional)
              notifyDestroyed();
         }//end destroyApp()
         //Check to see if the exit button was selected
         public void commandAction(Command c, Displayable d)
              System.out.println("Inside commandAction()");
              String sLabel = c.getLabel();
              if(sLabel.equals("Exit"))
                   destroyApp(true);
    Errors from the KToolbar:
    Running with storage root DefaultColorPhone
    Before Create Text Box
    Unable to create MIDlet TacticalTestMain
    java.lang.IllegalArgumentException
         at javax.microedition.lcdui.TextField.setChars(+105)
         at javax.microedition.lcdui.TextField.setString(+27)
         at javax.microedition.lcdui.TextField.<init>(+134)
         at javax.microedition.lcdui.TextBox.<init>(+74)
         at TacticalTestMain.<init>(+134)
         at java.lang.Class.runCustomCode(+0)
         at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
         at com.sun.midp.midlet.Selector.run(+22)
    Execution completed.
    743701 bytecodes executed
    23 thread switches
    741 classes in the system (including system classes)
    4071 dynamic objects allocated (120440 bytes)
    2 garbage collections (91412 bytes collected)

    Hi zoya,
    Here is the problem:
    tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
    This line declares a maximum textbox size of 25 but in reality he is declaring a textbox of size 29.
    Thats why it is throwing the illegal argument.
    happy coding :)

  • Null Pointer exception returned when object is not null!

    I've isolated the problem and cut down the code to the minimum. Why do I get a null pointer exception when the start method is called, when the object objJTextField is not null at this point???? I'm really stuck here, HELP!
    (two small java files, save as BasePage.java and ExtendedPage.java and then run ExtendedPage)
    first file
    ~~~~~~~
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public abstract class BasePage extends JFrame implements ActionListener
    private JPanel objJPanel = null;
    public BasePage()
    setSize(300,200);
    Container objContentPane = getContentPane();
    objJPanel = new JPanel();
    createObjects();
    createPage();
    // Add panels to content pane
    objContentPane.add(objJPanel);
    public void addComponentToPage(JComponent objJComponent)
    objJPanel.add(objJComponent);
    public void addButtonToPage(JButton objJButton)
    objJButton.addActionListener(this);
    objJPanel.add(objJButton);
    public void actionPerformed(ActionEvent objActionEvent)
    System.out.println("Action performed");
    userDefinedButtonClicked(objActionEvent.getActionCommand());
    // overide
    public abstract void createObjects();
    public abstract void createPage();
    public abstract void userDefinedButtonClicked(String sActionCommand);
    file 2
    ~~~~
    import javax.swing.*;
    public class ExtendedPage extends BasePage
    private JTextField objJTextField = null;
    private JButton objJButtonBrowse = null;
    public ExtendedPage()
    super();
    public void createObjects()
    objJTextField = new JTextField(20);
    objJButtonBrowse = new JButton("Start");
    objJButtonBrowse.setActionCommand("START");
    public void createPage()
    addComponentToPage(objJTextField);
    addButtonToPage(objJButtonBrowse);
    public void userDefinedButtonClicked(String sActionCommand)
    if ((sActionCommand != null) && (sActionCommand.equals("START")) )
    start();
    private void start()
    objJTextField.setText("Doesn't work");
    public static void main(String[] args)
    ExtendedPage objEP = new ExtendedPage();
    objEP.show();

    Hello ppaulf,
    Your problem is in your ExtendedPage.java file. You can fix this by changing the line
    private JTextField objJTextField = null;to:
    private JTextField objJTextField = new JTextField();This creates a proper instance.
    Good luck,
    Ming
    Developer Technical Support
    http://www.sun.com/developers/support

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • I am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g

    hi TimoHahn,
    i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
    Root cause of ServletException.
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
    at java.util.ResourceBundle.getString(ResourceBundle.java:334)
    at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

Maybe you are looking for

  • SetTimout doesn't work properly in AIR 2.7 for IOS

    Hello, I notice the setTimout() method does not work properly in AIR 2.7 for IOS. Closure function isn't execute with the proper delay... See bellow (Timeout.execute is a workaround -> http://www.displayobject.fr/2011/06/16/a-timeout-class-to-replace

  • Problem With the Marquee and Crop Tools

    I have just upgraded to Photoshop CS5. Whenever I drag out a rectangular marquee, elliptical marquee, or crop lines, while in the process of dragging, it draws the selection ("marching ants") from the center-out. It's as though I am holding down the

  • Want to downgrade to 6.0.2

    After updating my FCP 6.0.2 to 6.0.3 I am not able to open my project. FC always failed when trying to update this project. So I want to reinstall my FC and update only to 6.0.2. But on the apple sites is only Pro Applications Update 2008 available.

  • Testing SCORM?

    Hi, I need to be able to test Captivate's SCOs locally to figure out the SCORM API and calls, but no luck so far. I'm not using an LMS yet, it is in late stages of development, and I need to be able to test captivate SCORM before I can communicate wi

  • Possible script to do this? wake up ipod to download podcast

    Hello, Does anyone have an idea for this? I use my mac to charge the ipod. I dont use disk mode. I plug my ipod in it syncs and unmounts itself.. as I sleep overnight it charges. As I have slept overnight 4 new podcast have been downloaded. When I un