Throwing IlegalArgumentException

I have been reading through the Exception part of the Java Tutorials, and also the Throwable, Exception, and IllegalArgumentException parts of the Java Class Library documentation. However I haven't got the syntax correct yet. How do I throw an IllegalArgumentException only if a variable (in this case, an int) is in a certain range (eg. less than 1)?
Best regards,
Steven.

try
if (x < 1) throw new IllegalArgumentException("Out of range "+x+" < 1");

Similar Messages

  • Function module JOB_CLOSE throwing exception

    Hello,
    We have a batch job which has 2 steps:
    1) Step 1 uses job_open, job_submit and job_close and immediately schedules batch job A/P_ACCOUNTS which in turn creates batch input sessions A/P_ACCOUNTS.
    2) Step 2 Processes A/P_ACCOUNTS sessions created yesterday or today.
    In few cases, job_close is throwing exception job_close_failed. I believe that error is coming due to non availability of work processes. Job A/P_Accounts is defined as a class C batch job. There is a check in the FM job_close which does the following check:
    - if the class of a batch job is B or C, it calculates the number of free work processes. If there are no work processes available then JOB_CLOSE throws JOB_CLOSE_FAILED exception. 
    - If the class is u2018Au2019, it skips this check.
    We have an option of changing the class of batch job to A but there are some system critical jobs that are running as class A.
    My question is:
    In the code, JOB_CLOSE has been called for scheduling the job A/P_ACCOUNTS with parameter start immediately. Can anyone please let me know what will happen if function JOB_CLOSE is not called with start immediately option? Will the batch job A/P_ACCOUNTS wait till the time work processes are available?
    Or, can anything else be done to solve the issue?
    Regards,
    Siddharth

    HI,
    This is my experience with job_close..
    when i was working in zprograms then i was able to scedule it any time i wanted..
    but in my standard program when i tried it didn't worked....
    so i have to use that option of starting it immediately..
    and then it is working fine..
    now if i schedule 5 jobs... one after another..
    its get queued up...and once the processor is free...its working..
    my code of job close
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = job_count
          jobname              = job_name
          strtimmed            = yes " yes = 'X'
        IMPORTING
          job_was_released     = job_released
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          invalid_target       = 8
          OTHERS               = 9.
    regards,
    Yadesh

  • Access denied error while writing a file to the file system - myfileupload.saveas() throws system.unauthorizedexception

    hi,
    as part of my requirement , i have to perform read and  write  operations of  few files [ using the file upload control in my custom visual web part] and on submit button click.
    but while writing these files - with the help of  fileupload control - and when i use  myfileupload.saveas(mylocation);
    - i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
    it throws system.unauthorizedexception.
    i have given full control on that folder where i was trying to store my attached files. and also  after following asp.net forums,
    i have added  iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
    but unfortunately  that didnt happen.
    also
    a) i am trying the code with runwithelevatedprivileges(delegate() )  code
    b) shared the drive within the  d :drive where i want o save the files.
    c) given the full privieleges for the app pool identity- in my case , its
    network service.
    the  other strange thing is that, the same code works perfectly in  other machine, where the same sp, vs 2012  etc were installed .
    would like to know, any other changes/ steps i need to make it on this  server, where i am getting the  error.
    help is  appreciated!

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • Outlook 2016 getting crashed and throws an alert message as "microsoft outlook has encountered a problem and needs to close.

    Hi,
    Today i installed Microsoft Office 2016 preview for my Mac OS X 10.10 Yosemite. Word, Excel and Powerpoint applications are working without any problem. However, Outlook getting crashed and throws an alert message as "microsoft outlook has encountered a problem and needs to close.", it's happens always, when i launch outlook. please suggest me, how can i comet from this issue.
    Thanks in advance,
    Suresh Balakrishnan.

    Go to the Microsoft site for help. These forums are not offering support for MS products, especially not for beta products.

  • Bi Dashboards issue works properly some times and after not display pointers data and give un expected error and throw login window

    HI,
    I have toff situation where  we deployed bi dashboards in our site and it works some time and some times not,
    and some times it keep loading and throw a login window.
    works when
    we restart performance point service  and if not work
    we re create secure store service and generated new key and create new pps service application
    before that we stopped secure store and pps service  using c.a in application server
    we are using ssas for datasource to connect  from dashboard designer
    we have seperate server for ssas dbs
    seperate application server running: pps service and secure store service
    two web front ends:  one of running secure store
    1 Domain controller + central admin service running
    some times after 4 -5 hours bi dashboards works , we dashboards not display data and throw un expected errors,
    also when we try to connect using a dashboard designer from a seperate client machine in same domain ,we have same issue , we unable to connect to ssas datasource server, and if connect some times unable to deploy dashboards.
    we tried every thin icreased server time out values  in ssas server
    :\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Config\msmdsrv.ini. in this location
    and in 
    c:\program files\common files\microsoft shared\web server extensions\14\webclients\ppsmonitoringServer\client.config
    maxStringContentLength="2147483647"
    maxNameTableCharCount="2147483647"
    maxBytesPerRead="2147483647"
    maxArrayLength="2147483647"
    maxDepth="2147483647" />
    even we have same issue
    is some thing happening when dashboards working some time and  after some time not 
    is a secure store crashing or its still request pending in IIS and not authenticating to data soruce why 
    below are the logs
    Here are the results of the log analysis :
    server wfe1 
    09/01/2014 14:43:44.66 w3wp.exe (0x2128) 0x158C PerformancePoint Service PerformancePoint Services 39 Critical A PerformancePoint service application call was aborted by the caller.  This may indicate the HttpRuntime executionTimeout for the Web Application
    is configured to a value smaller than the DataSourceQueryTimeout for the PerformancePoint Service Application. 8bc44f14-acef-49bf-b1c1-2755ea7e6e24
    09/01/2014 14:43:44.66 w3wp.exe (0x2128) 0x158C PerformancePoint Service PerformancePoint Services ef8z Critical ‏‏حدث
    استثناء
    أثناء عرض
    عنصر ويب.
    قد تساعد
    معلومات التشخيص
    التالية في
    تحديد سبب
    هذه المشكلة:  Microsoft.PerformancePoint.Scorecards.BpmException: ‏‏لقد
    انتهت
    مهلة الطلب
    أو تم
    إجهاضها. تم
    تسجيل تفاصيل
    إضافية من
    أجل المسؤول.  ‏‏رمز
    خطأ "خدمات PerformancePoint"
    هو 20700. 8bc44f14-acef-49bf-b1c1-2755ea7e6e24
    09/01/2014 14:43:44.66 w3wp.exe (0x2128) 0x158C SharePoint Foundation Runtime ba3q Medium Redirect to error.aspx?ErrorText=Request%20timed%20out%2E failed. Exception: System.Web.HttpException: The remote host closed the connection. The error code is 0x800704CD.    
    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)     at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()     at System.Web.HttpResponse.Flush(Boolean finalFlush)    
    at System.Web.HttpResponse.End()     at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString) 8bc44f14-acef-49bf-b1c1-2755ea7e6e24
    09/01/2014 14:47:32.69 w3wp.exe (0x2128) 0x2154 Web Content Management Publishing Cache 7363 Critical Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. To configure the account use
    the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.  Additional Data:  Current default
    super reader account: NT AUTHORITY\LOCAL SERVICE 78c107cd-0d4b-46f5-8e1a-0d9b4ebc7b29
    09/01/2014 15:07:40.74 w3wp.exe (0x2128) 0x209C PerformancePoint Service PerformancePoint Services 20 Critical The user "i:Anonymous" attempted to access an item in the following location:
    http://www.xxx.xxx.sa/ar-sa/Notary/Rspointer/Lists/PerformancePoint Content/28_.000  Verify that the location exists and that the user has the "Read Items" permission. 
    Exception details: Microsoft.PerformancePoint.Scorecards.BpmException: ‏‏لقد
    انتهت
    مهلة الطلب
    أو تم
    إجهاضها. تم
    تسجيل تفاصيل
    إضافية من
    أجل المسؤول.     at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location, SPListItem item)    
    at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location)     at Microsoft.PerformancePoint.Scorecards.Store.SPDataStore.SPItemGet(RepositoryLocation location, String
    spObjectTypeId) abf0263d-7333-4e4f-9cd4-a3a4dcb700c0
    09/01/2014 15:13:25.92 w3wp.exe (0x2128) 0x18DC PerformancePoint Service PerformancePoint Services 20 Critical The user "i:Anonymous" attempted to access an item in the following location:
    http://www.xxx.xxx.sa/ar-sa/Notary/Rspointer/Lists/PerformancePoint Content/218_.000  Verify that the location exists and that the user has the "Read Items" permission. 
    Exception details: Microsoft.PerformancePoint.Scorecards.BpmException: ‏‏لقد
    انتهت
    مهلة الطلب
    أو تم
    إجهاضها. تم
    تسجيل تفاصيل
    إضافية من
    أجل المسؤول.     at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location, SPListItem item)    
    at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location)     at Microsoft.PerformancePoint.Scorecards.Store.SPDataStore.SPItemGet(RepositoryLocation location, String
    spObjectTypeId) b35bf864-54f4-43fa-88a8-44cdf938bfa2
    09/01/2014 15:11:10.87 w3wp.exe (0x2128) 0x1F88 PerformancePoint Service PerformancePoint Services 20 Critical The user "i:Anonymous" attempted to access an item in the following location:
    http://www.xxx.xxx.sa/ar-sa/Courts/Bic/Lists/PerformancePoint Content/4_.000  Verify that the location exists and that the user has the "Read Items" permission. 
    Exception details: Microsoft.PerformancePoint.Scorecards.BpmException: ‏‏لقد
    انتهت
    مهلة الطلب
    أو تم
    إجهاضها. تم
    تسجيل تفاصيل
    إضافية من
    أجل المسؤول.     at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location, SPListItem item)    
    at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location)     at Microsoft.PerformancePoint.Scorecards.Store.SPDataStore.SPItemGet(RepositoryLocation location, String
    spObjectTypeId) 7cea0eb6-214f-4d7b-a6e7-97a0fe11c956
    09/01/2014 15:11:40.87 w3wp.exe (0x2128) 0x2150 PerformancePoint Service PerformancePoint Services 20 Critical The user "i:Anonymous" attempted to access an item in the following location:
    http://www.xxx.xxx.sa/ar-sa/Notary/Rspointer/Lists/PerformancePoint Content/162_.000  Verify that the location exists and that the user has the "Read Items" permission. 
    Exception details: Microsoft.PerformancePoint.Scorecards.BpmException: ‏‏لقد
    انتهت
    مهلة الطلب
    أو تم
    إجهاضها. تم
    تسجيل تفاصيل
    إضافية من
    أجل المسؤول.     at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location, SPListItem item)    
    at Microsoft.PerformancePoint.Scorecards.Store.Dao.SPListItemDao.Get(ISPFcoCache cache, Guid webSiteID, RepositoryLocation location)     at Microsoft.PerformancePoint.Scorecards.Store.SPDataStore.SPItemGet(RepositoryLocation location, String
    spObjectTypeId) 4154222b-6ff0-4b64-81b8-d08501a19278
    server wfe 2
    09/01/2014 14:50:59.05 w3wp.exe (0x1294) 0x1D88 Web Content Management Publishing Cache 7363 Critical Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. To configure the account use
    the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.  Additional Data:  Current default
    super reader account: NT AUTHORITY\LOCAL SERVICE 382f711d-cdad-4c5d-be88-2e7d6f36dde2
    09/01/2014 14:50:59.05 w3wp.exe (0x1294) 0x1D88 Web Content Management Publishing Cache 7363 Critical Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. To configure the account use
    the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.  Additional Data:  Current default
    super reader account: NT AUTHORITY\LOCAL SERVICE 382f711d-cdad-4c5d-be88-2e7d6f36dde2
    09/01/2014 14:50:59.05 w3wp.exe (0x1294) 0x1D88 Web Content Management Publishing Cache 7363 Critical Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. To configure the account use
    the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.  Additional Data:  Current default
    super reader account: NT AUTHORITY\LOCAL SERVICE 382f711d-cdad-4c5d-be88-2e7d6f36dde2
    09/01/2014 14:50:59.05 w3wp.exe (0x1294) 0x1D88 Web Content Management Publishing Cache 7363 Critical Object Cache: The super reader account utilized by the cache does not have sufficient permissions to SharePoint databases. To configure the account use
    the following command 'stsadm -o setproperty -propertyname portalsuperreaderaccount -propertyvalue account -url webappurl'. It should be configured to be an account that has Read access to the SharePoint databases.  Additional Data:  Current default
    super reader account: NT AUTHORITY\LOCAL SERVICE 382f711d-cdad-4c5d-be88-2e7d6f36dde2
    In the Roiscan logs we get an error in regards to the English Language pack:
    Review Items
    ============
    Error:                       Product {90140000-1015-0409-1000-0000000FF1CE} - Microsoft SharePoint Foundation 2010 1033 Lang Pack:  has unexpected
    file state(s).
    adil

    chinnijagadeesh,
    You suck!
    Signed: The rest of the universe.
    ... and quit crossposting FFS... it really is quite annoying!

  • Unable to throw 'Error: A value is required' on a field from bean

    Scenario: I have an input text field and a button on a page. The input text is not required initially. I want this to be set to required after the button is clicked. So, I am doing this on the action listener of the button and returning to the page. This just returns to the page but does not throw the required error. The error is thrown the second time I click on the button(No listeners are called this time as the required property is already set). I want the error message to display immediately after clicking the button, the first time(after returning from the bean).
    Options Tried:
    I used the following in the action listener of the bean
    setValueMandatory(true); //Used this as a binding value for the required property on the input field
    textValue.setValid(false); //textValue is my input text's binding to the bean
    textValue.validate(facesContext);
    textValue.processUpdates(facesContext);
    textValue.processValidators(facesContext);
    AdfFacesContext.getCurrentInstance().addPartialTarget(textValue);
    FacesContext.getCurrentInstance().renderResponse();
    I am able to focus on the field using the cursor but unable to throw the message. Clearly, some form submit or an action need to occur on the page to render the response(or, repaint the page programmatically). But, how do I do this from the bean?
    Jdev Version: 11.1.1.4

    Divya,
    Have you tried passing the Component instead of null in my previous code?
    here is the sample i tried and it works fine.
    jspx code snippet
        <af:inputText label="Label 1" id="it1" binding="#{pageFlowScope.attributeValuesBean.rtx}"/>
        <af:commandButton text="commandButton 1" id="cb1"
                                      actionListener="#{pageFlowScope.attributeValuesBean.throwMessage}"/>backing bean snippet
        private RichInputText rtx; // add getter and setter
        public void throwMessage(ActionEvent actionEvent) {
            // Add event code here...
               FacesMessage fms = new FacesMessage("A value is required");
                fms.setSeverity(FacesMessage.SEVERITY_ERROR);
                FacesContext ctx = FacesContext.getCurrentInstance();
                ctx.addMessage(getRtx().getClientId(), fms);
        }-Arun

  • How to throw Custom Error  message in Portal

    Hi Experts !
    I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
    This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is  throwing an Error Message  in GUI but this message is reflecting in  Portal as an Exception but what I need here is a custom Message similar to GUI.
    Pls suggest .
    With Thanks & Regards
    Navneet

    Hi Experts !
    I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
    This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is  throwing an Error Message  in GUI but this message is reflecting in  Portal as an Exception but what I need here is a custom Message similar to GUI.
    Pls suggest .
    With Thanks & Regards
    Navneet

  • Table in smartform throwing errors

    Hi,
    I was trying to create a table in a smartform. I have to display 5 colums from the table vbap based on certain conditions. I have created a table and a line type. And based on this line type I have created 5 cells under the header with text elements having the name of the columns. I then created the same 5 cells in main area with the text elements having the value within &.. I have added a loop also in the data tab of the table. However when i test the smart for it throws an error "No other column available". Is this the right procedure to create a table?

    I got it..thanks..

  • Jsp throw numberformatexception.see my code .reply as soon as possible

    i am developed application onclick checkbox delete the record.on first field i give the href to serailno for open the update page. like this <a href="UpdateBoq.jsp?S_NO=<%=sno%>">.sno is serialno.is come from database wihen i am click on serial no it show the updatepage.jsp is not open the updatepage.jsp but it throw the exception number format.this is my code.anybody help me this my project working i am only the single persion to develop this application in jsp.please help me.as soon as possible
    <%@ page language="java" import="java.sql.*"%>
    <%@ page import="java.text.SimpleDateFormat" %>
    <%@ page import="java.util.Date" %>
    <%! int count = 0; %>
    <%! String itemcode;%>
    <%! String sns;%>
    <%! String contunit; %>
    <%! float qty; %>
    <%! float oup;%>
    <%! float oep;%>
    <%! int sno;%>
    <%! int stcode;%>
    <%! float sum=0.0f;%>
    <%! float sum1=0.0f;%>
    <jsp:useBean id="sos" class="boq.Calculation" scope="request"/>
    <%
    //String userID = String.valueOf(session.getAttribute("APP_USER_ID"));
    //String userID = String.valueOf(session.getAttribute("LOGIN_ID"));
    String strDelete = request.getParameter("btnDelete");
    String strserialno=request.getParameter("serialno1");
    String strmopno = request.getParameter("mop");
    String strjobno = request.getParameter("job");
    String strwop=request.getParameter("siten");
    String strno=request.getParameter("siteno");
    if (strDelete != null)
    String del=request.getParameter("hidcount");
    int delcount=-1;
    if (del!=null)
    System.out.println("I am in start of delete Action");
    delcount = Integer.parseInt(del);
    String strCheckBox="";
    String strHidVal="";
    for (int i=0; i<=delcount; i++)
    strCheckBox = request.getParameter("checkbox"+i);
    if(strCheckBox!=null)
    strHidVal = request.getParameter("hid"+i);
    System.out.println("country code is :"+strHidVal);
    System.out.println(del);
    Connection con=null;
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
    System.out.println(con);
    Statement st2 = con.createStatement();
    Statement st1 = con.createStatement();
    String str0="select * from BOQ where S_NO= '"+ strHidVal + "'";
    ResultSet rs = st1.executeQuery(str0);
    String str="delete from BOQ where S_NO= '"+ strHidVal + "'";
    System.out.println(strCheckBox);
    int a=st2.executeUpdate(str);
    catch(Exception e)
    %>
    <script language="JavaScript">
    alert("<%=e.getMessage()%>");
    </script>
    <%
    finally
    if(con!=null)
    con.close();
    %>
    <html>
    <head>
    <title>CRS</title>
    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
    <link rel="stylesheet" href="css/ems.css" type="text/css">
    </HEAD>
    <body leftmargin=0 topmargin=2>
    <jsp:include page="Index.html" />
    <form name=form1 action="BOQVIEW.jsp" method=post>
    <table border=0 cellspacing=1 cellpadding=1 width=100% height=5>
    <tr>
    <td valign="top" height="23">
    <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>
    <td bgcolor='#E6E4E4' width=45 align="Center" colspan=2>
    <font color="#5d7a80" size="2">
    BOQ OF MOPS
    </font>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td valign=top>
    <table width="100%" cellpadding="1" cellspacing="1" border="0">
    <tr>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=40>S/NO</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=60>SITE NAME</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=65>SITE NUMBER</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=90>ITEM CODE/MATERIAL CODE</td>
    <td width="180" height="5" class="ReportColumnHeader" align="center"colspan=120>CONTRACT UNIT DESCRIPTION ORIGINAL</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=>QUANTITY</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=90 >ORIGINAL UNIT PRICE</td>
    <td width="130" height="5" class="ReportColumnHeader" align="center" colspan=100>ORIGINAL EXTENDED PRICE</td>
    </tr>
    </table>
    <%
    Connection con=null;
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","tiger");
    System.out.println(con);
    Statement st = con.createStatement();
    Statement st1=con.createStatement();
    String qoq=request.getParameter("qoq");
    int one=Integer.parseInt(qoq);
    ResultSet rs = st.executeQuery("SELECT * from BOQ where SITE_CODE="+one);
    ResultSet rs1=st1.executeQuery("select SUM(O_U_P) AS oriunitprice,SUM(O_E_P) AS oriextendsprice from boq WHERE SITE_CODE="+one);
    %>
    <%
    int count=0;
    while(rs.next())
    sno=rs.getInt(1);
    stcode=rs.getInt(2);
    sns=rs.getString(3);
    itemcode=rs.getString(4);
    contunit = rs.getString(5);
    qty=rs.getFloat(6);
    oup = rs.getFloat(7);
    oep = rs.getFloat(8);
    %>
    <table border="0" cellspacing="1" cellpadding="1" width="100" >
    <tr>
    <td class="ReportCellText1" width="10" height=><input type=checkbox name="<%="checkbox"+count%>" onselect="deleterecord();"> </td>
    <td class="ReportCellText1" width="130" height="5" align="center" colspan=29><a href="UpdateBoq.jsp?S_NO=<%=sno%>"><%=sno%></a>
    </td>
    <td class="ReportCellText1" width="55" height="5" align="center" COLSPAN=60><%=sns%></td>
    <td class="ReportCellText1" width="50" height="5" align="center" COLSPAN=65><%=stcode%></td>
    <td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=90><%=itemcode%></td>
    <td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=120><%=contunit%></td>
    <td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=54><%=qty%></td>
    <td class="ReportCellText1" width="130" height="5" align="center" COLSPAN=90><%=oup%></td>
    <td class="ReportCellText1" width="130" height="5" align="center" colspan=100> <%=oep%></td>
    </tr>
    <tr>
    </table>
    <input type=hidden name="<%="hid"+count%>" value="<%=sno%>">
    <!--
    </tr>
    <tr>
    </tr>
    <tr>
    </tr> !-->
    <%
    count++;
    %>
    <table width="100%" cellpadding="1" cellspacing="1" border="0">
    <TR>
    <td width="60" height="5" class="ReportCellText3" align="center" colspan=></td>
    <td class="ReportCellText3" width="55" height="5" align="center" COLSPAN=></td>
    <td width="60" height="5" class="ReportCellText3" align="center" colspan=></td>
    <td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
    <td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
    <td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
    <td class="ReportCellText3" width="50" height="5" align="center" COLSPAN=></td>
    <%
    rs1.next();
    sum=rs1.getFloat("oriunitprice");
    sum1=rs1.getFloat("oriextendsprice");
    %>
    <td width="60" height="5" class="ReportColumnHeader" align="center" colspan=>TOTLE AMOUNT</td>
    <td class="ReportCellText1" width="85" height="5" align="center" colspan=> <%=sum%></td>
    <td class="ReportCellText1" width="90" height="5" align="center" colspan=> <%=sum1%></td>
    </table>
    <TABLE>
    <input type=hidden name=hidcount value =<%=count%>>
    <input type=hidden name=serialno value=<%=itemcode%>>
    <INPUT TYPE=hidden NAME=mop VALUE=<%=contunit%> >
    <INPUT TYPE=hidden NAME=job VALUE=<%=qty%> >
    <INPUT TYPE=HIDDEN name=siten value=<%=oup%>>
    <input type=hidden name=siteno value=<%=oep%>>
    <table><tr><td>
    <input type = button value = Print size=20 onClick = "window.print();"></td>
    <td><input type = Submit value = "Delete" name="btnDelete" size = 20> </td>
    </form>
    <form action=BOQ.jsp method=post>
    <td><input type=Submit value = "Add New" size=20></td>
    </form>
    <form action=NEWPEexl.jsp method=post>
    <td><input type=Submit value = "Export to Excel" size=20></td></tr></table>
    </form>
    <%
    catch(Exception e)
    out.println(e.getMessage());
    finally
    if(con!=null)
    con.close();
    %>
    </body>
    </html>
    when i am click the serial no it show the update page is update .jsp
    this is the update code
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
    prefix="fileaccess"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld"
    prefix="database"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page language="java" import="java.sql.,java.util."%>
    <%@ page import="java.text.SimpleDateFormat" %>
    <%@ page import="java.util.Date" %>
    <%! int count = 0; %>
    <%!Connection con=null;%>
    <%!PreparedStatement ps=null;%>
    <%
    String strUpdate = request.getParameter("btnUpdate");
    String sno=request.getParameter("serialno1");
    int snoi=Integer.parseInt(request.getParameter("serialno1"));
    String sc=request.getParameter("sitenumber");
    int sci=Integer.parseInt(request.getParameter("sitenumber"));
    String sn=request.getParameter("sitename");
    String itc=request.getParameter("itemno");
    String cu=request.getParameter("contract");
    String qty=request.getParameter("quantity");
    float qtyf=Float.parseFloat(request.getParameter("quantity"));
    String oup=request.getParameter("orig");
    float oupf=Float.parseFloat(request.getParameter("orig"));
    String oep=request.getParameter("origexp");
    float oepf=Float.parseFloat(request.getParameter("origexp"));
    if (strUpdate != null)
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
    System.out.println(con);
    System.out.println("Connection Established");
    Statement st = con.createStatement();
    String str="update BOQ set SITE_CODE="sci",SITE_NAME='"sn"',ITEM_CODE='"itc"',CONTRACT_UNIT='"cu"',QTY="qtyf",O_U_P="oupf",O_E_P="oepf" where S_NO="snoi" ";
    int a=st.executeUpdate(str);
    if (a>0)
    %>
    <script type="text/javascript" >
    alert("The Record has been Updated Successfully");
    <% response.sendRedirect("BOQVIEW.jsp"); %>
    </script>
    <%
    catch(Exception e)
    String m = e.getMessage();
    %>
    <font size="1" face="Verdana" color=blue>
    "<%=m%>"</font>
    <%
    try
    if(con!=null)
    con.close();
    catch(SQLException sq)
    out.println(sq.getMessage());
    %>
    <!-- Insert the data code-->
    <HTML>
    <head>
    <title>BOQ</title>
    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
    <script type="text/javascript">
    function callingdate()
    Calendar.setup({
    inputField : "f_date_b", //*
    ifFormat : "%d-%b-%Y ",
    showsTime : true,
    button : "f_trigger_b", //*
    step : 1
    function callingdate1()
    Calendar.setup({
    inputField : "f_date_b1", //*
    ifFormat : "%d-%b-%Y ",
    showsTime : true,
    button : "f_trigger_b1", //*
    step : 1
    function dating()
    var mylist=document.getElementById("effective_date")
    document.getElementById("date").value=mylist.options[mylist.selectedIndex].text
    function caps() {
    document.form1.country_code.value = document.form1.country_code.value.toUpperCase()
    document.form1.country_name.value = document.form1.country_name.value.toUpperCase()
    </script>
    </head>
    <BODY >
    <% count++;
    %>
    <form name=form1 action=UpdateBoq.jsp method=post>
    <!-- <h3 STYLE = "BACKGROUND-COLOR=blue;
    COLOR=YELLOW"
    align=center color=green>Country Information</h1> !-->
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td bgcolor='#336699' align="Center"><font color="#d2b48c" size=2>BOQ OF MOPS</font> </td>
    </tr>
    </table>
    <%
    Connection con=null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.87:1521:orcl","system","tiger");
    System.out.println(con);
    Statement st = con.createStatement();
    String se=request.getParameter("serialno1");
    //int ser=Integer.parseInt(request.getParameter("serialno1"));
    String s="SELECT * from BOQ where S_NO="Integer.parseInt(request.getParameter("serialno1"))" ";
    ResultSet rs = st.executeQuery(s);
    System.out.println(s);
    %>
    <%
    while(rs.next())
    int serialno=rs.getInt(1);
    int stcode=rs.getInt(2);
    String sname=rs.getString(3);
    String itcode=rs.getString(4);
    String conunit=rs.getString(5);
    float qtyw = rs.getFloat(6);
    float oupw=rs.getFloat(7);
    float oepw=rs.getFloat(8);
    %>
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td bgcolor='#E6E4E4' align="Center" width=100%><font color="#5d7a80" size=2>BOQ OF MOPS </font> </td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
    <tr><td >
    1)SERIAL NUMBER:</td><td><input type=text name=serialno1 value= "<%=serialno%>" size=10 onblur = "caps();">
    </td></tr>
    <tr><td >
    2)SITE NUMBER:</td><td><input type=text name=sitenumber value= "<%=stcode%>" size=10 onblur = "caps();">
    </td></tr>
    <tr><td >
    3)SITE NAME:</td><td><input type=text name=sitename value= "<%=sname%>" size=10 onblur = "caps();">
    </td></tr>
    <tr><td>
    4)ITEM CODE/MATERIAL CODE:</td><td><input type=text name=itemno value= "<%=itcode%>" size = 20 onblur = "caps();" >
    </td></tr>
    <tr><td>
    5)CONTRACT UNIT DESCRIPTION:</td><td><input type=text name=contract value= "<%=conunit%>" size = 20 onblur = "caps();" >
    </td></tr>
    <tr><td>
    6)QUANTITY:</td><td><input type="text" name="quantity" value= "<%=qtyw%>" size =40 onblur = "caps();" >
    </td></tr>
    <tr><td>
    7)ORIGNAL UNIT/PRICE:</td><td><input type=text name=orig value= "<%=oupw%>" size = 20 onblur = "caps();" >
    </td></tr>
    <tr><td>
    8)ORIGNAL EXTENDED/PRICE:</td><td><input type=text name=origexp value= "<%=oepw%>" size = 20 onblur = "caps();" >
    </td></tr>
    </TABLE>
    <%
    %>
    <center>
    <table>
    <tr><td>
    <INPUT TYPE=Submit value = Update name="btnUpdate" size=20/></td> </tr></table>
    </form>
    <form action="BOQVIEW.jsp" method = post>
    <center> <table>
    <tr><td>
    <input type="submit" value="View" size="20"></input>
    </td> </tr></table>
    </form>
    </form>
    </table>
    </center>
    <hr>
    <script type="text/javascript">
    Calendar.setup({
    inputField : "f_date_b", //*
    ifFormat : "%d-%b-%Y ",
    showsTime : false,
    button : "f_trigger_b", //*
    step : 1
    Calendar.setup({
    inputField : "f_date_b1", //*
    ifFormat : "%d-%b-%Y",
    showsTime : false,
    button : "f_trigger_b1", //*
    step : 1
    </script>
    </BODY>
    <%
    catch(Exception e)
    out.println(e.getMessage());
    finally
    try
    if(con!=null)
    con.close();
    catch(SQLException sq)
    out.println(sq.getMessage());
    %>
    </HTML>
    this my table database oracle 9i
    CREATE TABLE BOQ
    S_NO INTEGER NOT NULL,
    SITE_CODE INTEGER,
    SITE_NAME VARCHAR2(40),
    ITEM_CODE VARCHAR2(20),
    CONTRACT_UNIT VARCHAR2(60),
    QTY FLOAT(70),
    O_U_P FLOAT(70),
    O_E_P FLOAT(70)
    );</a>

    1. Use code tags, there's button that says 'Code'. Select your text and use that. I'm not going to read your code while it's unformatted like this and especially because you seem to have posted your whole darn project here; and I suspect few others will bother either.
    2. Don't paraphrase the exception; post the exact stack trace.
    3. There's usually a line number given with the exception; which line does your stack trace point to? Try to figure out what you're doing wrong there.
    4. NumberFormatException means that you're trying to parse a string that's not in the correct format. Make sure the data you're getting from the DB is correct.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • 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

  • Ssrs report web service to save report as pdf throws error Soap exception unhandeled by user code

    I am creating a C# web application to save  an SSRS report as a pdf file on my local machine.
    I added the ReportService web reference as RS2005 and ReportExecution2005 web reference as RE2005.
    http://myServer/ReportServer_DEVPROJECT/ReportExecution2005.asmx?WSDL
    http://myServer/ReportServer_DEVPROJECT/ReportService2005.asmx?WSDL
    I created the following function SaveReport that is called on button click. My report can be accessed on the report server with the following url:
    http://myServer/Reports_DEVPROJECT/Pages/Report.aspx?ItemPath=%2fData+Mgmt%2fSample+Letter
    On the Report Manager home page the report link appears as "SAMPLE LETTER".
    It is deployed in the DataMgmt folder on the Report Manager.
    It uses a data source called "DS Letter" with option "Credentials stored securely in the report server"
    My application gets compiled, but I get the following run time error:
    Error: Soap exception unhandeled by user code. The item '/DataMgmt/Sample Letter' cannot be found. ---> Microsoft.ReportingService
    s.Diagnostics.Utilities.ItemNotFoundException: The item '/DataMgmt/Sample Letter' cannot be found.
    Please check my code and let me know what I can do to run this successfully. Once this is done, I would like to get help with passing a parameter (memberID) to the generate report for that member, through this application.
    Thank You in advance for your help.
    public static void SaveReport()
    RS2005.ReportingService2005 rs;
    RE2005.ReportExecutionService rsExec;
    // Create a new proxy to the web service
    rs = new RS2005.ReportingService2005();
    rsExec = new RE2005.ReportExecutionService();
    // Authenticate to the Web service using Windows credentials
    rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
    rs.Url = "http://myServer/ReportServer_DEVPROJECT/ReportService2005.asmx";
    rsExec.Url = "http://myServer/ReportServer_DEVPROJECT/ReportExecution2005.asmx";
    string historyID = null;
    string deviceInfo = null;
    string format = "pdf";
    Byte[] results;
    string encoding = String.Empty;
    string mimeType = String.Empty;
    string extension = String.Empty;
    RE2005.Warning[] warnings = null;
    string[] streamIDs = null;
    string fileName = @"c:\temp\samplerHAPeport.pdf";
    string _reportName = @"/DataMgmt/Sample HAP Letter";
    string _historyID = null;
    bool _forRendering = false;
    RS2005.ParameterValue[] _values = null;
    RS2005.DataSourceCredentials[] _credentials = null;
    RS2005.ReportParameter[] _parameters = null;
    try
    _parameters = rs.GetReportParameters(_reportName, _historyID, _forRendering, _values, _credentials);
    RE2005.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
    RE2005.ParameterValue[] parameters = new RE2005.ParameterValue[1];
    if (_parameters.Length > 0)
    //parameters[0] = new RE2005.ParameterValue();
    //parameters[0].Label = "";
    //parameters[0].Name = "";
    //parameters[0].Value = "";
    rsExec.SetExecutionParameters(parameters, "en-us");
    results = rsExec.Render(format, deviceInfo,
    out extension, out encoding,
    out mimeType, out warnings, out streamIDs);
    using (FileStream stream = File.OpenWrite(fileName))
    stream.Write(results, 0, results.Length);
    catch (Exception ex)
    throw ex;
    protected void BtnGenReport_Click(object sender, EventArgs e)
    SaveReport();

    Hello Devster,
    Thank you to post your question on TechNet forum.
    After reviewing the whole post, I have a question to you. You can access the report via the link, http://myServer/Reports_DEVPROJECT/Pages/Report.aspx?ItemPath=%2fData+Mgmt%2fSample+Letter.
    From the URL, I can see that the report is located at: /Data Mgmt/Sample Letter, instead of /DataMgmt/Sample Letter. In addition, I found that the target report is "/DataMgmt/Sample HAP Letter" instead of "/DataMgmt/Sample Letter" as the error described. I
    am not sure whether you post out the correct code segment.
    Please check the above things on your side, and hope it is helpful to you.
    Regards,
    Edward
    Edward Zhu
    TechNet Community 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 have updated to itunes 10.5 and now it doesn't recognize our iphones and says we need a driver installer but then throws a notice saying an error occured. Anyone know anything about this?  :)

    I have updated to itunes 10.5 on my Mac computer and now it doesn't recognize my iphones and says i need to install a device driver but when i try to install it it throws up a notification saying an error occured and to contact the makers of my device 's suppot website.  Anyone know?

    Have you tried repairing your application from within the Control Panel?

  • Unable to start the managed server throw NodeManager

    Hello!
    We have a problem to start Managed Servers throw Node manager.
    We get an error:
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Boot identity properties saved to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/data/nodemanager/boot.properties">
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Boot identity properties saved to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/data/nodemanager/boot.properties"
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Startup configuration properties saved to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/data/nodemanager/startup.properties">
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Startup configuration properties saved to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/data/nodemanager/startup.properties"
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Server error log also redirected to server log>
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.LogFileRotationUtil log
    INFO: Server error log also redirected to server log
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Starting WebLogic server with command line: /software/psoft/pt851/webserv/peoplesoft/bin/startManagedWebLogic.sh >
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Starting WebLogic server with command line: /software/psoft/pt851/webserv/peoplesoft/bin/startManagedWebLogic.sh
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Working directory is '/software/psoft/pt851/webserv/peoplesoft'>
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Working directory is '/software/psoft/pt851/webserv/peoplesoft'
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Rotated server output log to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/logs/PIA1.out00001">
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.LogFileRotationUtil log
    INFO: Rotated server output log to "/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/logs/PIA1.out00001"
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Server error log also redirected to server log>
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.LogFileRotationUtil log
    INFO: Server error log also redirected to server log
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Server output log file is '/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/logs/PIA1.out'>
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Server output log file is '/software/psoft/pt851/webserv/peoplesoft/servers/PIA1/logs/PIA1.out'
    <Jan 26, 2012 2:17:54 PM> <INFO> <peoplesoft> <PIA1> <Server failed during startup so will not be restarted>
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.ServerManager log
    INFO: Server failed during startup so will not be restarted
    <Jan 26, 2012 2:17:54 PM> <WARNING> <Exception while starting server 'PIA1'>
    java.io.IOException: Server failed to start up. See server output log for more details.
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:331)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:662)
    Jan 26, 2012 2:17:54 PM weblogic.nodemanager.server.Handler handleStart
    WARNING: Exception while starting server 'PIA1'
    java.io.IOException: Server failed to start up. See server output log for more details.
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:331)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:662)
    Additional information:
    weblogic 10.3.3
    PT8.51.11
    Linux x86_64 RH5
    When we starting Manged servers manualy, it's works fine.
    Thank you.

    I'm pretty sure this is the wrong forum for this question. Why don't you try here: WebLogic Server - General

  • My ipad 4 got in black screen, Itunes still recognize but throw me an error 4005 when i want to restore.

    my ipad 4 don´t turn on, I'm very stressed.
    Yesterday i took a photo and when I wanted to see it my ipad is restarted. took too long to turn on and turn off once was.
    I've tried many ways to change the lightning cable, pc change, restoring the apple mobile device usb, but itunes still throwing me the error 4005.
    I have proven with other software like redsnow but mark me the error as it does not support ios 7.1.2.
    when i connect the ipad in Itunes, it says me that my idevice is in recovery mode.
    when this happened it was the battery to 100 percent

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPhone, iPad, iPod Touch: Troubleshooting Touchscreen Response
    http://support.apple.com/kb/ts1827
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    iOS: Restore errors 4005, 4013, and 4014
    http://support.apple.com/kb/TS5314
     Cheers, Tom

Maybe you are looking for