InitialLdapContext IPV6 - NumberFormatException

Hi,
     I have a sample program listed below for reference which makes
use of an IPV6 address when setting up the environment for creating
a ldapContext object through the use of initialLdapContext() call.
When I compile and run this program I get "java.lang.NumberFormatException".
Below is the code listing and sample run of the program. Also, the same
program works fine without throwing any exceptions when I replace the IPV6
address of the system with its corresponding IPV4 address.
Could anyone please let me know as to why I get "NumberFormatException".
PS: The sample program was built, compiled and run using JDK 1.5 and JRE 1.5
and run on Windows-XP SP2 where IPV6 is configured and ping6 works for
the same address (of a remote node).
Code listing of the sample program:
import java.util.*;
import javax.naming.*;
import javax.naming.directory.*;
import javax.naming.ldap.*;
import java.net.InetAddress;
public class testipv6
public static void main(String args[]) throws Exception
int ldapVersion = 3;
LdapContext ldapContext;
Hashtable environment;
int serverPort;
int portNumber;
InetAddress ipAddress = null;
Control[] connCtls = null;
String serverName;
portNumber = 907;
ipAddress = ipAddress.getByName("fe80::200:f8ff:fe25:6eb4");
serverName = ipAddress.getHostName() + ":" + portNumber;
// Initialize the environment for an LDAP directory
environment = new Hashtable(11);
environment.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
environment.put(Context.PROVIDER_URL,"ldap://" + serverName);
environment.put("java.naming.ldap.version",Integer.toString(ldapVersion));
ldapContext = null;
environment.remove(Context.SECURITY_PRINCIPAL);
environment.remove(Context.SECURITY_CREDENTIALS);
ldapContext = new InitialLdapContext(environment,connCtls);
Compilation of the program:
D:\>javac testipv6.java
Note: testipv6.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Sample Run of the program:
D:\>java testipv6
Exception in thread "main" java.lang.NumberFormatException: For input string: "0
:0:0:200:f8ff:fe25:6eb4:907"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.sun.jndi.toolkit.url.Uri.parse(Unknown Source)
at com.sun.jndi.toolkit.url.Uri.init(Unknown Source)
at com.sun.jndi.ldap.LdapURL.<init>(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source)
at testipv6.main(testipv6.java:46)
D:\>

Hi,
I assume, that the IPv6 URL you're passing looks likeldap://fe80:0:0:0:200:f8ff:fe25:6eb4:907In this case, parsing the URL is difficult: what is part of the IP address? What is the port number? For that reason, the URL format is modified for IPv6 and adds brackets around the address:ldap://[fe80:0:0:0:200:f8ff:fe25:6eb4]:907See RFC2732, e.g. http://rfc2732.x42.com/I have not tested it, but I assume that this is the problem.

Similar Messages

  • How can I disable 1142N from providing IPv6 access ?

    subject says it all, I failed to find the command in configuration..

    Hi Andre,
    As per my knowledge, you cant disable from ur AP.
    Ipv6 is currently not support on any of the Cisco AP's in autonomous mode. However, they will be able to pass ipv6 traffic.
    May be newer IOS version like : Cisco IOS Release 15.2(4)JA supports IPv6 protocols
    Regards

  • PMTU discovery in IPv6 based on IPV6_RECVPATHMTU in Solaris 10

    Our application works with raw sockets and needs to discover PMTU of IPv6 paths.
    According to the RFC-3542 (http://tools.ietf.org/html/rfc3542, section 11) the socket option IPV6_RECVPATHMTU allows applications to know about the change of path MTU by receipt of new ancillary data item (IPV6_PATHMTU) which is delivered to recvmsg() without any actual data. Following construction should be used to enable this option:
        int  on = 1;
        setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPATHMTU, &on, sizeof(on));In the online Sun documentation I found that this socket option is supported since Solaris 10 (http://docs.sun.com/app/docs/doc/816-5177/ip6-7p).
    However, in our test this socket option appears to be not working. After decrease of the PMTU via ifconfig and sending a big enough packet an ICMP (Packet Too Big) is received but there is no event with ancillary data item on the socket.
    One peculiarity that may be essential is that our application binds to a specific port in a raw socket (i.e. to IP address : port pair).
    Does anyone have information if the IPV6_RECVPATHMTU socket option is really supported in Solaris 10?
    Probably, ICMP should be off to be able to receive this event with ancillary data on the socket?
    Will appreciate any ideas how to make it working.
    Thanks in advance,
    Mike.

    Hi,
    I have a Sunfire V100 - and have the exact same problem. The settings are correct; I have configure dual-NIC cards many times in the past - but this issue is simply eluding me. I can swap in a Linux machine in router / ip forwarding mode and there are no problems, but when I put back in the Sunfire I encounter the same issues you have.
    In effect, packets from the LAN arrive at the NIC on the Solaris machine, but then don't get forwarded to the other NIC's gateway. I'm at a loss, but I have seen this problem pop-up (without answer) a half-dozen times in this forum alone, and multiple times on different support sites. Did you (or anyone) ever come across a solution for this? Is this not some easily overlooked yet possibly cryptic flag or variable that I've missed? Anyone?

  • Cannot deploy to localhost:7001  / how to remove the IPV6 from Jdeveloper ?

    Hi,
    Who could help on a deployment issue?
    I have a Weblogic admin server running on http://localhost:7001 and have access to the admin console.
    I developed a test application and deployed it on the Integrated Weblogic server (port 7101) and is running.
    When I try to deploy on the managed admin server, the deployment is correct but it generates an IPV6 addresse
    ( http://[2001:0:4137:9e76:2cd9:2c5e:af7f:ae32]:7001/GoogleMapApp )
    that I cannot use, as I don't use such addresses on the development laptop.
    I want to get the addresses
    http://127.0.0.1:7001/GoogleMapApp
    or
    http://localhost:7001/GoogleMapApp
    Thanks
    [07:23:17 PM] ---- Deployment started. ----
    [07:23:17 PM] Target platform is (Weblogic 10.3).
    [07:23:18 PM] Retrieving existing application information
    [07:23:18 PM] Running dependency analysis...
    [07:23:18 PM] Building...
    [07:23:21 PM] Deploying 2 profiles...
    [07:23:21 PM] Wrote Web Application Module to C:\JDeveloper\mywork\GoogleMap\ViewController\deploy\GoogleMap_ViewController_webapp1.war
    [07:23:21 PM] Wrote Enterprise Application Module to C:\JDeveloper\mywork\GoogleMap\deploy\GoogleMap_application1.ear
    [07:23:22 PM] Redeploying Application...
    [07:23:28 PM] [Deployer:149192]Operation 'deploy' on application 'GoogleMap_application1' is in progress on 'AdminServer'
    [07:23:34 PM] [Deployer:149194]Operation 'deploy' on application 'GoogleMap_application1' has succeeded on 'AdminServer'
    [07:23:34 PM] Application Redeployed Successfully.
    [07:23:34 PM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [07:23:34 PM] http://[2001:0:4137:9e76:2cd9:2c5e:af7f:ae32]:7001/GoogleMapApp
    [07:23:34 PM] Elapsed time for deployment: 17 seconds
    [07:23:34 PM] ---- Deployment finished. ----
    ------------------

    HI,
    In your JDeveloper Init file please set the following JAVA_OPTION to disable IPv6
    -Djava.net.preferIPv4Stack=true"
    You can enable above option in the following file of JDeveloper: *"jdeveloper\jdev\bin\jdev.boot"*
    compiler.vmargs = -Xmx1024m   -Djava.net.preferIPv4Stack=trueThanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/ (Middleware Magic Is Here)

  • Java.lang.NumberFormatException: For input string: "DESCRIPTION="

    Colleagues,
    eBis 11.5.10.2.
    I'm getting a Warning in the concurrent manager when I submit a programme that has an attached xml template. The warning is stating: -
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 2667735 on node BAMBI at 02-SEP-2011 17:32:56.
    Post-processing of request 2667735 failed at 02-SEP-2011 17:32:57 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    When I consult the OPP log in Sysadmin, I can see a not very helpful message: -
    [9/2/11 5:32:57 PM] [UNEXPECTED] [36822:RT2667735] java.lang.NumberFormatException: For input string: "DESCRIPTION="
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:447)
         at java.lang.Integer.parseInt(Integer.java:497)
         at oracle.apps.xdo.generator.pdf.PDFGenerator.setFont(PDFGenerator.java:629)
         at oracle.apps.xdo.generator.pdf.PDFGenerator.setProperties(PDFGenerator.java:468)
         at oracle.apps.xdo.generator.ProxyGenerator.setProperties(ProxyGenerator.java:1373)
         at oracle.apps.xdo.template.fo.FOHandler.startElement(FOHandler.java:262)
         at oracle.apps.xdo.template.fo.FOHandler.startElement(FOHandler.java:204)
         at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:55)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:320)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1051)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    [9/2/11 5:32:57 PM] [36822:RT2667735] Completed post-processing actions for request 2667735.
    Now, this isn't programme specific as it's affecting all our BI Publisher reports. Also the specific report I am working on has the option to email. I'm finding that the emails still work and when I open the attachment, they are displaying in PDF format correctly - even though the concurrent manager completes with the above warning. The above warning doesn't let me view the output in PDF from Oracle Financials.
    Any help would be greatly appreciated.
    Thanks

    Maybe check if Metalink note 764180.1 applies? This appears to be a bug fixed with patch 7669965.

  • 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
    ----------------------------------------------------------------

  • Direct Access on Windows Server 2012 R2 and IPV6

    I have a question about IPV6 and Direct Access in Server 2012 R2. Without using UAG is it still mandatory to have IPV6 enabled in the intranet?
    Kristopher Turner | Not the brightest bulb but by far not the dimmest bulb.

    Hi,
    DirectAccess uses IPv6 with IPsec to create a secure connection between DirectAccess client computers and the internal corporate network.
    However, DirectAccess does not necessarily require connectivity to the IPv6 Internet or native IPv6 support on internal networks. Instead, it automatically configures and uses IPv6 transition technologies to tunnel IPv6 traffic across the IPv4 Internet (6to4,
    Teredo, IP-HTTPS) and across your IPv4-only intranet (NAT64 or ISATAP).
    For detailed information, please view the link below,
    Plan the DirectAccess Infrastructure
    http://technet.microsoft.com/en-us/library/jj574101.aspx
    Hope this helps.
    Steven Lee
    TechNet Community Support

  • Cisco asa 5505: No traffic lan to wan with IPv6

    Hello everybody,
    I have a Cisco ASA 5505, public ipv6 in outside interface, private ipv6 in LAN, from router I can ping any ipv6 in Internet and ping my LAN ipv6. Traffic doesn't go through router.
    This is my configuration.
    interface Vlan1
     nameif inside
     security-level 100
     ip address PRIV-Saturn1 255.255.255.0
     ipv6 address fc00::1/7
     ipv6 enable
    interface Vlan2
     nameif outside
     security-level 0
     ip address PUBLIC26 255.255.255.248
     ipv6 address xxxx:yyyy:67:36::2/64
     ipv6 enable
     ipv6 nd suppress-ra
    access-list Dynamic_Filter_ACL extended permit tcp any6 any6
    ipv6 route outside ::/0 xxx:yyyy:67:36::1
    Am I omitting anything?
    Thanks in advance for the help.
    Jos P

    Since you're using IPv6 private addressing (fc00::) on the inside, you need a dynamic NAT entry to translate your private IPv6 addresses to a public one.
    Alternatively, you could just use a subnet of your registered IPv6 block for the inside network and not worry about NAT.

  • Welcome to the IPv6 Community

    Welcome to the CSC IPv6 Community.  We encourage everyone to share their knowledge and start conversations on issues such as adding IPv6 capability to your networks and discuss challenges and successes around network services migration. All topics are welcome, including routing address management, translation, tunneling, firewall, security, DNS, MTU, applications and protocol stack issues.
    Remember, just like in the workplace, be courteous to your fellow forum participants. Please refrain from using disparaging or obscene language or posting advertisements.
    Cheers,
    Dan Bruhn
    CSC Community Manager

    hiLisa_K8 wrote:
    This is the place where LogMeIn users can ask, learn, and share about LogMeIn products and services. Everyone is invited to participate and we hope that your experience here is positive, fun, and informative. How you can participate:Explore: Use the search box at the top to quickly find what you are looking for.
    Ask: Can’t find an answer? Post your question on the appropriate board. Press the blue NEW MESSAGE button to begin.
    Accept: If someone gives you the right answer, remember to 'Accept' their response as a solution so the next person can find the same solution quickly.
    Appreciate: If someone helps you, give them a Kudos by clicking the star button. Welcome: If you are new, reply to this thread and introduce yourself, or ask a question to help you get started.
    Report: If you find something weird or broken or have an idea on how to improve the community, please let us know in the Community Feedback board.
    Respect: We have some guidelines that we expect all community members to follow, so have a look but more importantly… Have fun! For more tips and tricks read our Getting Started Guide.Thank you for participating in the LogMeIn Community! Happy posting! Sincerely,
    Lisa Kate
    LogMeIn Community Manager   

  • Exception in thread "main" java.lang.NumberFormatException:For input String

    this is a code about arrylist. but when I debug it.it metion:Exception in thread "main" java.lang.NumberFormatException:For input String at java.lang.NumberFormatException.forInputString(numberFomatExceptionio java:48)
    at java.lang.Integer.parseInt(integer.java:468)
    at java.lang.Integer.parseInt(integer.java:497)
    at Get.getInt(manerger.java:208)
    at LinkList.insertFirst(manager.java:94)
    at manager.main(manager.java;20)
    this is my code:
    import java.io.*;
    import java.lang.*;
    public class manager
         public static void main(String args[]) throws IOException
         LinkList list=new LinkList();
         System.out.println("input S can scan the grade\ninput D can delete one entry\ninput U can update the entry\ninput A can add one entry\ninput E can end");
         int cr=System.in.read();
    switch(cr)
         case 'A':
         list.insertFirst();break;//this is 20 row
         case 'S':
         System.out.println("input the s");break;
         case 'D':
         System.out.println("input the d");break;
         case 'U':
         System.out.println("input the u");break;
    class Link
    public int number;
    public String name=new String();
    public int chs;
    public int eng;
    public int math;
    public Link next;
    public Link(int number,String name, int chs,int eng,int math)
    this.number=number;
    this.name=name;
    this.chs=chs;
    this.eng=eng;
    this.math=math;
    public Link()
         this(0,"",0,0,0);
    public void displayLink()
    System.out.println(number + " "+name+ " "+chs+ " "+eng+ " "+math+ " ");
    class LinkList
    public Link first;
    public LinkList()
    first = null;
    public boolean isEmpty()
    return first==null;
    public void displayList()
         System.out.println("");
         Link current=first;
         while(current!=null)
              current.displayLink();
              current=current.next;
         System.out.println("");
    public Link insertFirst() throws IOException
         Get getdata=new Get();
         int number=getdata.getInt();//this is 94 row
         String name=getdata.getString();
         int chs=getdata.getInt();
         int eng=getdata.getInt();
         int math=getdata.getInt();
         Link newLink = new Link(number,name,chs,eng,math);
         first=newLink;
         return first;
    public Link find(int key)
         Link current=first;
         while(current.number!=key)
              if(current.next==null)
              return null;
              else
              current=current.next;
         return current;
    public Link update(int key) throws IOException
         Link current=first;
         while(current.number!=key)
         if(current.next==null)
         return null;
         else
              System.out.println("Input the first letter of the subject:");
         int c=System.in.read();
         Get get=new Get();
              switch(c)
                   case 'c':
                   current.chs=get.getInt();break;
                   case 'e':
                   current.eng=get.getInt();break;
                   case 'm':
                   current.math=get.getInt();break;
         return current;
    public float average(char key)
         Link current=first;
         float total=0;
         float average=0;
         float counter=0;
         if(current==null)
         return 0;
         while(current!=null)
              switch(key)
                   case 'c':
                   total=current.chs+current.next.chs;break;
                   case 'e':
                   total=current.eng+current.next.eng;break;
                   case 'm':
                   total=current.math+current.next.math;break;
              current=current.next.next;
              counter++;
         average=total/counter;
         return average;
    public Link delete(int key)
         Link current=first;
         Link previous=first;
         while(current.number!=key)
              if(current.next==null)
              return null;
              else
                   previous=current;
                   current=current.next;
              if(current==first)
              first=first.next;
              else
              previous.next=current.next;
              return current;
    class Get
    public static String getString() throws IOException
    System.out.println("Input your name:");
    InputStreamReader str = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(str);
    String s = br.readLine();
    return s;
    public static int getInt() throws IOException
    System.out.println("Input your data:");
    String st = getString();
    return Integer.parseInt(st);//this is 208 row
    }

    It may be that the code in getString() returns a
    String that ends with a newline. If that is the
    problem, you can use
    return (Integer.parseInt(st)).trim();1. getString will never return a String ending in newline. BufferedReader.readLine strips off the newline.
    2. Even if you had a newline, String.trim doesn't trim newlines.
    3. You would need to trim the String, not the int:
    return (Integer.parseInt(st.trim()));As JimDinosaur said, you are passing bad data (the value of "st").
    In getInt, add this before trying to parse "st":
    System.out.println("###"+st+"###");What does it print?

  • How do I configure ISP native IPv6 connectivity?

    Hi!
    I'm a network engineer for SECOM, an ISP in Southeastern Colorado. We will be making native IPv6 connectivity available to residential subscribers soon, and I've been tasked with verifying support for our IPv6 platform on home router products.
    I have an AirPort Extreme purchased new in November of '09 that is running version 7.5.1, which I believe is completely current.
    Under the IPv6 tab in my Advanced settings, I have the following configuration:
    IPv6 Mode: Router
    Block incoming IPv6 connections: NOT checked
    Configure IPv6: Manually
    WAN IPv6 Address: fdXX:XXXX:XXXX:a000::2
    WAN IPv6 Prefix Length: 64
    IPv6 Default Route: fdXX:XXXX:XXXX:a000::1
    LAN IPv6 Address: fdXX:XXXX:XXXX:c000::1
    (As you can see, I'm using ULA's for testing purposes, and I've replaced the global bits with X's for security.)
    The problem is, if I plug a host into one of the LAN ports and assign it an address from the same /64 subnet (e.g. fdXX:XXXX:XXXX:c000::2), the host can't ping the Airport's assigned LAN address.
    It can ping:
    * the Airport's link-local IPv6 address, and
    * the Airport's IPv4 192.168.x.x address
    Also (and I'm gratified that this part is working), my CE router can ping the Airport's WAN IPv6 address!
    So my question is, is there something in the IPv6 configuration I'm misunderstanding? Has anyone else gotten native statically-configured IPv6 working on the AirPort Extreme?
    Thanks very much in advance,
    John E. / SECOM
    P.S. - I have verified with a packet capture that the AirPort extreme is not responding at all for the configured LAN IPv6 address; i.e., the ICMPv6 neighbor solicitation goes unanswered.
    P.P.S. - I have tried a Windows 7 host, a Windows XP host, and an IPv6-certified multitester from JDSU. All exhibit the same symptoms.

    I have follow your instruction to connect to my ISP as it shows the following message:
    Serial connection established.
    using interface sppp0
    connect: sppp0 <--> /dev/ttya
    local IP address xxxxxxxx
    remote IP address 1.1.1.1
    But when I ping www.sun.com, it shows:
    www.sun.com unknown.
    I start Mozilla and it said www.sun.com not found etc...
    What has gone wrong?
    Do I have to configure some files such as:
    /etc/resolv.conf
    /etc/hosts
    /etc/hostname ?
    or any other steps that can help me to connect to the internet?
    Thanks...

  • How to handle changing IPv6 network configurations

    Hi,
    I run a Mac Mini as a server with OS X Server 10.8.5/2.2 on it using an internet connection with DS-lite. The server runs fine on a private IPv4 and a public IPv6 assigned by the ISP thrugh my router. Now from time to time (on some really odd days 5 times a day) my ISP decides to change my IPv6 prefix and as a consequence the IPv6 of my server. This results in a warning and some services seem to work not always properly. When I handle the warning and update the network configuration (although all relevant pieces of configuration that are shown along this proces remain unchanged), everything is back to normal.
    Now I wonder whether there is better way to handle changing IPv6 prefixes while everything else is unchanged? Any thougths? Thanks. Steffen

    I'll add my 2 cents too Sudheer...
    I suppose your versioning strategy should take into account your particular circumstances, impact analysis, ESB architecture  etc...
    In our case it makes sense to version the service operations because we have some consumers that want to stay on the older version & other that want to move with the changing versions...
    We've noticed that SAP, with the standard delivered enterprise services also version step the service operations so you esentially have 2 service contracts but one that caters for additional fields/functionality. The consumer uses the service operation that they prefer.
    The other possibility, if you are in a position to make the new fields 'optional' then you could do that without impacting all the consumers, the consumers that have the additional info to pass in the request can do so & the other consumers can carry on business as usual.
    Then you could also version step the entire service, that would entail making use of a new software component version but this would entail new endpoints & depending on your architecture it could impact all your consumers. If you're using an integrated ESB architecture, your consumers would have one endpoint & the ESB would route the request to the relevant service version.
    So you could minise impact on the consumers & develop a good versioning strategy depending on what your current situation is.
    Regards, Trevor

  • How can I disable IPv6 EUI randomization with group policy?

    I need to turn off IPv6 EUI address randomization. It can be done in netsh (a few commands) or powershell (Set-NetIPv6Protocol -RandomizeIdentifiers Disabled).  How can I do this in group policy without scripting?

    Hi Jordan,
    Before going further, I hope that the suggestion provided by Martin can be helpful.
    It seems that we can't configure this setting via native policy.To configure IPv6 settings,
    we need to download ADMX files for IPv6. However, per the following article, the IPv6 settings that can be configured are:
    Enable all IPv6 components
    (Windows default)
    Disable all IPv6
    components (the setting you probably want)
    Disable 6to4
    Disable ISATAP
    Disable Teredo
    Disable Teredo and 6to4
    Disable all tunnel
    interfaces
    Disable all LAN and PPP
    interfaces
    Disable all LAN, PPP and tunnel
    interfaces
    Prefer IPv4 over IPv6
    How to Disable IPv6 through Group Policy
    http://social.technet.microsoft.com/wiki/contents/articles/5927.how-to-disable-ipv6-through-group-policy.aspx
    TechNetSubscriber Support
    If you are TechNetSubscription user and have any feedback on our support quality, please
    send your feedback here
    Best regards,
    Frank Shen
    Please read the question before marking things as answers.

  • How can i disable ipv6 in OL7?

    Hi everybody,
    how can i disable ipv6 on my OL7 box?
    In /etc/sysctl.d i have test it with the file: ipv6.conf:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.<interface>.disable_ipv6 = 1
    But this doesnt work.
    Does anybody know how can i disable IPv6 in Oracle Linux 7?

    What I would recommend is not to set implicit or redundant parameters:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    There is no need to disable the "default" interface, since it is already included in the "all" statement.
    I do not know, but there could be a possibility that such statements disable the network card in question, but in turn enable every other. In such case, your 2nd statement invalidates the first. Perhaps that was was part of the problem when using your other configuration.

  • How can I turn off IPv6 temporary addresses in a enterprise environment

    So in a default configuration Vista and Windows 7 clients will use IPv6 temporary address (per RFC 3041), but I would like to be able to disable this with a GPO.
    I know I can do this by using a startup script tied to a GPO using the netsh interface ipv6 set privacy state=disabled store=persistent but I really do not want to run a logon script especially when as you can see in the command it is a persistent
    setting.
    Any ideas on using a registry based GPO for this?

    Hi,
    OK, I understand what you want. But after I use the Process Monitor to capture the behavior, I found that a lot of registry keys would be changed. So you can not set it via registry unless the IPv6 is disabled.
    Thanks for understanding.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
    Thank you again for the answer.
    As a follow up question... How does one suggest/request a change in default behavior in a MS product?
    While the RFC 3041 addresses might be nice to have for the average consumer they are not ideal in a enterprise environment. I have found that the temporary addresses will register in DNS, but this doesn't completely solve the issue of tracking and accountability,
    you would still need a application to query, correlate and store that information.
    So it would be nice if the business versions of Windows Vista/7/2K8 and the next client OS would not have this behavior by default.

Maybe you are looking for