SFTP java.util.NoSuchElementException in OSB

Hi,
I am trying to setup SFTP connection between servers, I have done below but getting java.util.NoSuchElementException, Any help would be appreciated
1. Copy public key of SFTP server into known_hosts file as per below format
getafix,172.22.52.130 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAtR+M3Z9HFxnKZTx66fZdnQqAHQcF1vQe1+EjJ/HWYtgAnqsn0hMJzqWMatb/u9yFwUpZBirjm3g2I9Qd8VocmeHwoGPhDGfQ5LQ/PPo3esE+CGwdnCOyRCktNHeuKxo4kiCCJ/bph5dRpghCQIvsQvRE3sks+XwQ7Wuswz8pv58=
2. Created service account as per the username/password
3. Created Business Service
But when I am trying to test the business service, I am repeatedly getting above error.
<Mar 20, 2015 3:52:34 PM EST> <Error> <SFTPTransport> <BEA-381801> <Error occured for endpoint java.util.NoSuchElementException java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at java.util.StringTokenizer.nextElement(StringTokenizer.java:390)
        at com.bea.wli.sb.transports.sftp.client.KnownHostVerifier.validateKnownHosts(KnownHostVerifier.java:81)
        at com.bea.wli.sb.transports.sftp.client.SFTPClient.authenticate(SFTPClient.java:108)
        at com.bea.wli.sb.transports.sftp.connector.SFTPResource.<init>(SFTPResource.java:78)
        at com.bea.wli.sb.transports.sftp.resource.SFTPUtils.createSFTPResource(SFTPUtils.java:170)
        at com.bea.wli.sb.transports.sftp.resource.SFTPConnectionPool.getResource(SFTPConnectionPool.java:104)
        at com.bea.wli.sb.transports.sftp.connector.SFTPTransportProvider.getSFTPResource(SFTPTransportProvider.java:958)
        at com.bea.wli.sb.transports.sftp.connector.SFTPTransportProvider.sendMessage(SFTPTransportProvider.java:145)
        at com.bea.wli.sb.transports.sftp.connector.SFTPTransportProvider.sendMessageAsync(SFTPTransportProvider.java:110)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
        at $Proxy123.sendMessageAsync(Unknown Source)        at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)        at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)        at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)        at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:566)        at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:434)        at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:380)        at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)        at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)        at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
        at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
        at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.
Cheers

OSB version is 11.1.1.6
known_hosts file location is $domain_home/config/osb/transports/sftp
Cheers

Similar Messages

  • SFTP: The invocation resulted in an error: java.util.NoSuchElementException

    I have created a business service using the SFTP protocol.
    When testing the BS, I received the "known_hosts doesn't exist or doesn't have read permission" error, which I resolve by placing the known_host file in $Domain_Home\config\osb\transports\sftp
    But now I have got another error "The invocation resulted in an error: java.util.NoSuchElementException". Does anyone know what this error refers to? I have already set the filename through the transport header.

    I have created a business service using the SFTP protocol.
    When testing the BS, I received the "known_hosts doesn't exist or doesn't have read permission" error, which I resolve by placing the known_host file in $Domain_Home\config\osb\transports\sftp
    But now I have got another error "The invocation resulted in an error: java.util.NoSuchElementException". Does anyone know what this error refers to? I have already set the filename through the transport header.

  • The invocation resulted in an error: java.util.NoSuchElementException

    I am trying to implement sftp protcol for oracle service bus using business service.
    While invocation it is throwing "The invocation resulted in an error: java.util.NoSuchElementException" error.
    Does any one know the reason for it?

    known_hosts file must contain data & hostname and IP address must be separated by a comma.
    e.g. localhost,127.0.0.1 ssh-rsa ABCDEF............==
    Regards,
    Anuj

  • Error on java.util.NoSuchElementException

    Hi,
    I am facing an error "Exception in thread "main" java.util.NoSuchElementException" on my java code but i have no idea on how to solve this error. I have been figuring for very long but still no solution. Below is my code. Can anyone help? Thank in advance=D
    import java.io.FileReader;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.*;
    class Matrix {
          double[][] element;
         public static void getFile(String fileName) throws IOException{
            BufferedReader br = null;
            int numRows,numCols;
            Matrix m1 = new Matrix();
            try{
                  br = new BufferedReader(new FileReader(fileName));
                  String line = br.readLine();
                  //Get the number of rows
                  line = br.readLine();
                  StringTokenizer st = new StringTokenizer(line, "=");
                  st.nextToken();
                  String row = st.nextToken();
                  numRows = Integer.parseInt(row.substring(1));
                  //Get the number of columns
                  line = br.readLine();
                  StringTokenizer st2 = new StringTokenizer(line, "=");
                  st2.nextToken();
                  String col = st2.nextToken();
                  numCols = Integer.parseInt(col.substring(1));
                  line = br.readLine();
                  while ((line = br.readLine()) != null ){
                     //Declare and initialize the 2d array
                     m1.element = new double[numRows][numCols];
                     StringTokenizer st3 = new StringTokenizer(line, "</matrix>");
                     while(st3.hasMoreTokens()){
                          for(int r = 0; r < m1.element.length; r++){
                              for(int c = 0; c <= m1.element.length; c++){
                                 String record = st3.nextToken(" ");
                                 m1.element [r][c] = Double.parseDouble(record);
                      br.close();      
               }catch(FileNotFoundException ex){
                      System.out.println(ex.getMessage());
    }

    Tave wrote:
    Some things occur to me, none of which may be useful.
    Firstly, you have no constructor for your class.
    Secondly, you don't seem to have a main method, though this may be because this class is called by another.
    Thirdly, don't you have a line number or other identification for what is causing the exception?Thank for your reply=D
    Yap this is a class that is called by another class that why there is no main method for it. And for the line that causing the error is
    String record = st3.nextToken(" ");

  • Java.util.NoSuchElementException Error

    when i am executing my servlet program tha i got this error
    java.util.NoSuchElementException
         at Scanning.scan(googlewsd.java:262)
         at googlewsd.doGet(googlewsd.java:67)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    what can i do to remove this error ..
    plz help me..its very urgent
    thanx

    java.lang.NullPointerException
         at java.util.StringTokenizer.(StringTokenizer.java:119)
         at java.util.StringTokenizer.(StringTokenizer.java:135)
         at Scanning.scan(googlewsd.java:237)
    pls tell me solution of this error.
    pls help me
    thanx

  • Cisco Network Assistant - Error java.util.noSuchElementException

    Hi!
    i have a big Problem. the last 3 times i installed the CNA (for 2960X-series) at my custormers, i have the Problem that i can´t edit the Port-Settings in the CNA.
    There always Comes the Message:
    Java.util.noSuchElementException
    i tried different Versions of CNA (5.8.9, 6.1, ...) and different different Software Images on my Switches : (15.0.2.EX2, 15.0.2.EX5)
    can anyone help me please?
    Thx
    Martin

    Hi David,
    Are you migrating a MySQL 4.1 instance? There is a known problem with 4.1 (3, 4.0 and 5.0 are ok, this is unique to 4.1). The fix has been committed but will not be available until our next release.
    If this is the case, your options are to move your db to a 5.0 instance, or wait until out next release.
    Regards,
    Dermot.

  • Bursting ERROR: java.util.NoSuchElementException in 1 level XML (i.e. FSG)

    Hello,
    We are encountering error with 1-level XML(non-RDF reports - i.e. FSG) on bursting. It is happening when the bursting control file ("select" attribute under "request" element) only has 1 level of distribution XML(i.e. /MasterReport).
    I have found similar issue in this forum but got no definite solution - Re: Bursting Fails with java.util.NoSuchElementException after 5.6.3 upgrade
    Start bursting process..
    [032309_032311003][][EXCEPTION] java.util.NoSuchElementException
         at java.util.Vector.lastElement(Vector.java:449)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.removeEndPath(BurstingProcessorEngine.java:1999)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.globalDataEndElement(BurstingProcessorEngine.java:1944)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1124)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         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:201)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingRequest(BurstingProcessorEngine.java:2153)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingEndElement(BurstingProcessorEngine.java:1802)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1127)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         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:227)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingConfigParser(BurstingProcessorEngine.java:959)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.process(BurstingProcessorEngine.java:903)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:269)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Thanks in advance for your help.
    regards,
    Rownald

    Hi Ike,
    Thanks for your reply.
    Although I already went thru a different path on bursting FSG(Financial Statement Generator) reports (creating Java program to fetch/send email - Delivery Manager), I am still very interested in the idea of bursting FSG using the seeded bursting program(XDOBURSTREP) - which I still cannot figure out.
    Anyway, I am stuck having a data definition from FSG with only 1-level to burst on (see in bold below). This kind of XML data is causing the previous error that I've posted above.
    Trying to add another level (i.e. /MasterReport/fsg:SOBName/) won't work either - namespace being not supported by Oracle??
    <?xml version="1.0" encoding="utf-8"?>
    <*MasterReport* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:fsg="http://www.oracle.com/fsg/2002-03-20/"
    xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
    <fsg:SOBName>COMPANY NAME</fsg:SOBName>
    Any idea would be highly appreciated.
    Thanks!

  • Error: java.util.NoSuchElementException while migrating from Mysql

    Hello All,
    I am trying to migrate a Mysql DB to oracle 10g, the following are the steps that I'm following:
    1. - Create an Oracle user named MIGRATIONS and grant it at least RESOURCE, CREATE SESSION, and CREATE VIEW privileges
    2. - Create a database connection named Migration_Repository that connects to the MIGRATIONS user.
    3. - Right-click the Migration_Repository connection, select Manage Migration Repository, and create the repository
    4. - Create an Oracle user whose schema is to be used as the destination for the objects to be migrated
    5. - Create and open an Oracle connection for the schema that I created.
    6. - Create and open a database connection for mysql DB
    7. - Capture the source schema objects to be migrated
    8. - Convert the captured objects to Oracle-format objects.
    9.- When I try to hit "GENERATE" to create the SQL*Plus script, it gets to Sequence 40 and it stops, as soon as I click close. I get the following error message:
    java.util.NoSuchElementException
    I have not been able to find answers in regards to this error, any help would be greatly appreciated.
    David Waizer

    Hi David,
    Are you migrating a MySQL 4.1 instance? There is a known problem with 4.1 (3, 4.0 and 5.0 are ok, this is unique to 4.1). The fix has been committed but will not be available until our next release.
    If this is the case, your options are to move your db to a 5.0 instance, or wait until out next release.
    Regards,
    Dermot.

  • Kodo.util.FatalDataStoreException: java.util.NoSuchElementException

    I am receiving the following exception in our app at what appears to be
    random intervals.
    There were multiple users logged into the system, each getting their own
    persistence manager (by way of pmFactory.getPersistenceManager(), which
    are then stored in the http session and re-used as long as that user is
    logged in) and when they started accessing the system simultaneously
    everything was fine for a while (ranged from 30min to 3 hours) then one
    person would see the exception, then others would see the exception right
    after. Then a few minutes later the problem would be gone again for a
    while
    I have the multithread option set to true in kodo.properties and am using
    pessimistic transactions
    Using kodo 3.3.3
    I am just curious what might cause something like this, it seems as though
    2 threads are trying to commit the same data with the same persistence
    manager to me.
    My next step in debugging this process is extending the persistence
    manager object to add some logging and see if my theory is correct.
    Any pointers to tracking this down would be greatly appreciated
    kodo.util.FatalDataStoreException: java.util.NoSuchElementException
         at
    kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:1020)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:629)
         at
    com.stchome.cdr.actions.SearchCriteriaWizardAction.searchQbe(SearchCriteriaWizardAction.java:345)
         at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at
    org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at
    org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at
    com.stchome.cdr.servlet.CdrActionServlet.process(CdrActionServlet.java:31)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    com.stchome.cdr.servlet.filters.SessionManagerFilter.doFilter(SessionManagerFilter.java:41)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
         at
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
         at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    NestedThrowablesStackTrace:
    java.util.NoSuchElementException
         at serp.util.LookaheadIterator.next(LookaheadIterator.java:57)
         at
    com.solarmetric.apache.commons.collections.iterators.IteratorChain.next(IteratorChain.java:264)
         at kodo.util.CacheMap$EntryIterator.next(CacheMap.java:654)
         at java.util.AbstractCollection.toArray(AbstractCollection.java:174)
         at java.util.ArrayList.<init>(ArrayList.java:136)
         at kodo.datacache.QueryCacheImpl.keySet(QueryCacheImpl.java:165)
         at
    kodo.datacache.AbstractQueryCache.classesChanged(AbstractQueryCache.java:60)
         at
    kodo.datacache.DataCacheStoreManager.updateCaches(DataCacheStoreManager.java:217)
         at
    kodo.datacache.DataCacheStoreManager.commit(DataCacheStoreManager.java:73)
         at
    kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:1317)
         at
    kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:998)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:629)
         at
    com.stchome.cdr.actions.SearchCriteriaWizardAction.searchQbe(SearchCriteriaWizardAction.java:345)
         at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at
    org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at
    org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at
    com.stchome.cdr.servlet.CdrActionServlet.process(CdrActionServlet.java:31)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    com.stchome.cdr.servlet.filters.SessionManagerFilter.doFilter(SessionManagerFilter.java:41)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
         at
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
         at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

    Thank you stephen, that reply is like music to my ears :)
    Stephen Kim wrote:
    I would upgrade to 3.3.4 or 3.4 as they have resolved that bug.
    Damian Bradicich wrote:
    I am receiving the following exception in our app at what appears to be
    random intervals.
    There were multiple users logged into the system, each getting their own
    persistence manager (by way of pmFactory.getPersistenceManager(), which
    are then stored in the http session and re-used as long as that user is
    logged in) and when they started accessing the system simultaneously
    everything was fine for a while (ranged from 30min to 3 hours) then one
    person would see the exception, then others would see the exception right
    after. Then a few minutes later the problem would be gone again for a
    while
    I have the multithread option set to true in kodo.properties and am using
    pessimistic transactions
    Using kodo 3.3.3
    I am just curious what might cause something like this, it seems as though
    2 threads are trying to commit the same data with the same persistence
    manager to me.
    My next step in debugging this process is extending the persistence
    manager object to add some logging and see if my theory is correct.
    Any pointers to tracking this down would be greatly appreciated
    kodo.util.FatalDataStoreException: java.util.NoSuchElementException
         at
    kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:1020)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:629)
         at
    com.stchome.cdr.actions.SearchCriteriaWizardAction.searchQbe(SearchCriteriaWizardAction.java:345)
         at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at
    org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at
    org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at
    com.stchome.cdr.servlet.CdrActionServlet.process(CdrActionServlet.java:31)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    com.stchome.cdr.servlet.filters.SessionManagerFilter.doFilter(SessionManagerFilter.java:41)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
         at
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
         at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    NestedThrowablesStackTrace:
    java.util.NoSuchElementException
         at serp.util.LookaheadIterator.next(LookaheadIterator.java:57)
         at
    com.solarmetric.apache.commons.collections.iterators.IteratorChain.next(IteratorChain.java:264)
         at kodo.util.CacheMap$EntryIterator.next(CacheMap.java:654)
         at java.util.AbstractCollection.toArray(AbstractCollection.java:174)
         at java.util.ArrayList.<init>(ArrayList.java:136)
         at kodo.datacache.QueryCacheImpl.keySet(QueryCacheImpl.java:165)
         at
    kodo.datacache.AbstractQueryCache.classesChanged(AbstractQueryCache.java:60)
         at
    kodo.datacache.DataCacheStoreManager.updateCaches(DataCacheStoreManager.java:217)
         at
    kodo.datacache.DataCacheStoreManager.commit(DataCacheStoreManager.java:73)
         at
    kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:1317)
         at
    kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:998)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:86)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:629)
         at
    com.stchome.cdr.actions.SearchCriteriaWizardAction.searchQbe(SearchCriteriaWizardAction.java:345)
         at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
         at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at
    org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at
    org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at
    com.stchome.cdr.servlet.CdrActionServlet.process(CdrActionServlet.java:31)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    com.stchome.cdr.servlet.filters.SessionManagerFilter.doFilter(SessionManagerFilter.java:41)
         at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
         at
    org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
         at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Java.util.NoSuchElementException when migrating from 10.1.3 to 11g Preview4

    I have migrated my project from Jdeveloper 10.1.3 to JDeveloper with OC4j11g Preview 4.
    I see below exception displaying 5 times.... Can some one help me in getting this project running on 11g....
    Jul 17, 2008 2:01:13 PM oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.jdevimpl.webapp.jsp.taglibraries.trinidad.addin.TrinidadModelListener$UpdateTrinidadNamespaceTask@157342 on model oracle.jdevimpl.webapp.jsp.JspXmlModel@42017c; txn name=Updating html, head, and body, to be under the Trinidad namespace
    java.util.NoSuchElementException
         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
         at java.util.HashMap$KeyIterator.next(HashMap.java:877)
         at oracle.jdevimpl.webapp.jsp.taglibraries.trinidad.addin.TrinidadModelListener$UpdateTrinidadNamespaceTask.performTask(TrinidadModelListener.java:278)
         at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:195)
         at oracle.bali.xml.model.task.StandardTransactionTask.run(StandardTransactionTask.java:103)
         at oracle.jdevimpl.webapp.jsp.taglibraries.trinidad.addin.TrinidadModelListener.modelChanged(TrinidadModelListener.java:109)
         at oracle.bali.xml.model.XmlModel._deliverModelChangeEvents(XmlModel.java:3250)
         at oracle.bali.xml.model.XmlModel._deliverChangeEvents(XmlModel.java:3417)
         at oracle.bali.xml.model.XmlModel.__commitTransaction(XmlModel.java:2940)
         at oracle.bali.xml.model.XmlContext.__commitTransaction(XmlContext.java:1773)
         at oracle.bali.xml.model.XmlModel.__requestCommitTransaction(XmlModel.java:2882)
         at oracle.bali.xml.model.XmlModel.commitTransaction(XmlModel.java:562)
         at oracle.bali.xml.model.task.NonValidatingTransactionTask.__commitWrapperTransaction(NonValidatingTransactionTask.java:32)
         at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:208)
         at oracle.adfdt.view.common.migration.MigrationManager$MigrationCallable.call(MigrationManager.java:618)
         at oracle.ide.model.Node.callUnderWriteLock(Node.java:1555)
         at oracle.adfdt.view.common.migration.MigrationManager$MigrationRunnable.run(MigrationManager.java:550)
         at oracle.adfdt.view.common.migration.MigrationManager.migrate(MigrationManager.java:105)
         at oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper.migrate(MigrationHelper.java:30)
         at oracle.ide.migration.NodeMigrator.callHelperMigrate(NodeMigrator.java:474)
         at oracle.ide.migration.NodeMigrator.callHelpersMigrate(NodeMigrator.java:464)
         at oracle.ide.model.ProjectMigrator.super_callHelpersMigrate(ProjectMigrator.java:38)
         at oracle.ide.model.ProjectMigrator.mav$super_callHelpersMigrate(ProjectMigrator.java:26)
         at oracle.ide.model.ProjectMigrator$1.run(ProjectMigrator.java:54)
         at oracle.javatools.data.Structure.applyBatchChanges(Structure.java:164)
         at oracle.ide.model.HashStructureNode$1.run(HashStructureNode.java:326)
         at oracle.javatools.data.Structure.applyBatchChanges(Structure.java:164)
         at oracle.ide.model.HashStructureNode.applyBatchChanges(HashStructureNode.java:322)
         at oracle.ide.model.ProjectMigrator.callHelpersMigrate(ProjectMigrator.java:50)
         at oracle.ide.migration.NodeMigrator.doMigration(NodeMigrator.java:447)
         at oracle.ide.migration.NodeMigrator$1.run(NodeMigrator.java:400)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:615)
         at java.lang.Thread.run(Thread.java:595)
    I have made needed manual changes and made sure all the libraries are pointing to correct jar files.
    When I perform rebuild I have warning
    class javax.faces.el.ValueBinding has been deprecated
    When I try to run the jspx browser displays error message
    Missing class: oracle.adfinternal.view.faces.renderkit.RenderKitBase
    Embedded OC4J server has message
    Jul 17, 2008 3:12:30 PM com.evermind.server.http.HttpMessages logApplicationStartupFailedMessage
    SEVERE: The application named, current-workspace-app, could not start due to an error. oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.adfinternal.view.faces.renderkit.RenderKitBase

    Yes, I did follow all the steps mentioned at http://www.oracle.com/technology/products/jdev/tips/muench/1013srdemo/index.html
    What surprises me is even though it throws exception(reason i dont know) I see the migration completed message at the end.
    Most of the files I checked are migrated...
    When I try launch jspx by starting the embedded OC4J there is still some reference to ADF instead of TRINIDAD... How do I correct it?
    Thanks,
    -Josephine

  • Java.util.NoSuchElementException

    Hi friends,
    I am retrieving data from SAP to mysql table..
    While doing that i am getting the error of java.util.NoSuchElementException.
    Exact code which error is getting is
    count++;
                        for(com.sap.mw.jco.JCO.FieldIterator fI = tableList.fields(); fI.hasMoreElements(); mb.append("\r\n"))
                            com.sap.mw.jco.JCO.Field tabField = fI.nextField();
                            data = tabField.getString();
                            error = data;
                            StringTokenizer st = new StringTokenizer(data, "|");
                            mb.append("|");
                            for(int i = 0; i < rec_count; i++)
                                try
                                    String tempdata = st.nextToken();
                                    mb.append(tempdata + "\t|");
                                    tempdata = mysap.replace(tempdata, "\\", "\\\\");
                                    sapdata[i] = mysap.replace(tempdata, "'", "\\'");
                                   // System.out.println("Java memory in use = " + ((Runtime.getRuntime().totalMemory()) - (Runtime.getRuntime().freeMemory())));
                                catch(Exception ex1)
                                  //  sb.append("<BR>" + count + "[" + i + "]" + ex1.toString());
                                    System.out.println("Error insertData module:" +"<br>");
                                    System.out.println("<BR>" + count + "[" + i + "]" + ex1.toString());
                        }some part of error is
    Error insertData module:<br>
    <BR>488[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>563[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>700[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>1080[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>1081[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>1110[10]java.util.NoSuchElementException
    Error insertData module:<br>
    <BR>1112[10]java.util.NoSuchElementException
    Error insertData module:<br>
    etc...
    Please help me sort out this error.I am no familier with SAP type things
    thanks in advance

    Hi paul.miner
    Thank a lot for your reply..the problem is there only.
    In SAP table some rows has 10 field values.some rows has 9 field values.So these 9 values row is creating error.Any idea to handle this situation.
    sample output
    1.data0070000205|20050114|ZDR | 12.50 |USD |SG20|10|S01|SG20|0000045934|
    Error insertData module:<br>
    <BR>3877[10]java.util.NoSuchElementException
    2.data0005000557|20050114|ZOR | 500.00 |USD |SG20|20|T01|SG21|0000045941|3000026932
    In the above first record has no last filed
    second record has one more filed.
    so fist one is creating error.Any idea to handle this....
    If i use while (st.hasMoreTokens()) instead of
    for(int i = 0; i < rec_count; i++)
    tempdata = st.nextToken();
    some other part of the program is affecting
    once again thanks

  • Exception in thread "main" java.util.NoSuchElementException

    Hello there,
    I need to store resultset values in arrays.
    Following is my code:
    (Note : The function uses the jdbc connection with mysql that is return from other function.)
    public static void getResultSetInArray(Connection con) throws Exception
    Map list = new HashMap();
    Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
    ResultSet rs = stmt.executeQuery("show columns from launchcomm.events");
    while(rs.next())
    list.put(rs.getString("Field"),rs.getString("Type"));
    rs.close();
    con.close();
    System.out.println("List = " + list + "\n");
    Iterator iter = null;
    iter = list.keySet().iterator();
    System.out.println("iter = " + iter);
    String field;
    String type;
    int i=1;
    System.out.println("list size = " + list.size());
    while(iter.hasNext() != false)
    System.out.println("iter.hasNext() = " + iter.hasNext() +"......" +(i++));
    System.out.println("iter.next() = " + iter.next());
    field = (String)iter.next();
    type = (String)list.get(iter.next());
    Following is my output with error:
    List = {folder_name=varchar(50), is_repeat=tinyint(1), footer=text, thankyou_email=text, box_header_bg_color=varchar(25), organization_id=int(11), attendee_delete_right=tinyint(1), show_ticket_remaining=tinyint(1), order_confirmation_email=text, save_for_later=tinyint(1), start_register=tinyint(4), id=int(11), logo=varchar(100), publish=tinyint(1), end_unregister=datetime, owner_id=int(11), confirmation_email=text, audience_id=int(11), event_color_code=varchar(30), showcalendar=tinyint(1), registration_enddate=datetime, directory_name=varchar(20), eventstatus_id=int(11), contact_id=int(11), password_protect=tinyint(1), include_header=tinyint(1), thankyou_page=text, header=text, is_hotel_capacity=tinyint(1), want_close=tinyint(1), travel_housing_request=tinyint(1), box_header_text_color=varchar(25), default_location_id=int(11), end_reg_modification=datetime, user_id=int(11), passkey_eventcode=varchar(255), page_size=int(11), passkey_password=varchar(255), event_capacity=int(11), box_text_color=varchar(25), updated_on=datetime, link_color=varchar(25), ends_on=datetime, hotel_capacity=int(11), template_id=int(11), allow_overlap_session=tinyint(1), starts_on=datetime, reg_another_button=varchar(50), passkey_partnerid=int(11), personalized_url=tinyint(1), hide_start_date=tinyint(1), hide_end_date=tinyint(1), include_footer=tinyint(1), text_color=varchar(25), allow_another_registrant=tinyint(1), passkey_eventid=int(11), resize=tinyint(1), default_closetemplate=tinyint(1), dateformat=text, personalize_agenda=tinyint(1), cssfile_id=int(11), passkey_information=tinyint(1), confirmation_page=text, activate_waitlist=tinyint(1), box_border_color=varchar(25), google_analytics_code=text, show_iframe_design=tinyint(1), confirmation_mail_format=tinyint(1), url=varchar(100), bg_color=varchar(25), package_id=int(11), name=varchar(200), password=varchar(50), capacity=int(11), modify_registration=tinyint(1), is_event_capacity=tinyint(1), include_css=tinyint(1), passkey_username=varchar(255), created_on=datetime, promote_url=varchar(100), page_views=int(11), box_bg_color=varchar(25), title_text_color=varchar(25), registration_open_text=text, require_login=tinyint(1), closetemplate_description=text, registration_startdate=datetime, domain=varchar(200), timezone_id=varchar(100), description=text, tag=varchar(255), allow_unregister=tinyint(1), order_confirmation_page=text, css=text, showmap=tinyint(1)}
    iter = java.util.HashMap$KeyIterator@18a47e0
    list size = 95
    iter.hasNext() = true......1
    iter.next() = folder_name
    iter.hasNext() = true......2
    iter.next() = footer
    iter.hasNext() = true......3
    iter.next() = box_header_bg_color
    iter.hasNext() = true......4
    iter.next() = attendee_delete_right
    iter.hasNext() = true......5
    iter.next() = order_confirmation_email
    iter.hasNext() = true......6
    iter.next() = start_register
    iter.hasNext() = true......7
    iter.next() = logo
    iter.hasNext() = true......8
    iter.next() = end_unregister
    iter.hasNext() = true......9
    iter.next() = confirmation_email
    iter.hasNext() = true......10
    iter.next() = event_color_code
    iter.hasNext() = true......11
    iter.next() = registration_enddate
    iter.hasNext() = true......12
    iter.next() = eventstatus_id
    iter.hasNext() = true......13
    iter.next() = password_protect
    iter.hasNext() = true......14
    iter.next() = thankyou_page
    iter.hasNext() = true......15
    iter.next() = is_hotel_capacity
    iter.hasNext() = true......16
    iter.next() = travel_housing_request
    iter.hasNext() = true......17
    iter.next() = default_location_id
    iter.hasNext() = true......18
    iter.next() = user_id
    iter.hasNext() = true......19
    iter.next() = page_size
    iter.hasNext() = true......20
    iter.next() = event_capacity
    iter.hasNext() = true......21
    iter.next() = updated_on
    iter.hasNext() = true......22
    iter.next() = ends_on
    iter.hasNext() = true......23
    iter.next() = template_id
    iter.hasNext() = true......24
    iter.next() = starts_on
    iter.hasNext() = true......25
    iter.next() = passkey_partnerid
    iter.hasNext() = true......26
    iter.next() = hide_start_date
    iter.hasNext() = true......27
    iter.next() = include_footer
    iter.hasNext() = true......28
    iter.next() = allow_another_registrant
    iter.hasNext() = true......29
    iter.next() = resize
    iter.hasNext() = true......30
    iter.next() = dateformat
    iter.hasNext() = true......31
    iter.next() = cssfile_id
    iter.hasNext() = true......32
    iter.next() = confirmation_page
    iter.hasNext() = true......33
    iter.next() = box_border_color
    iter.hasNext() = true......34
    iter.next() = show_iframe_design
    iter.hasNext() = true......35
    iter.next() = url
    iter.hasNext() = true......36
    iter.next() = package_id
    iter.hasNext() = true......37
    iter.next() = password
    iter.hasNext() = true......38
    iter.next() = modify_registration
    iter.hasNext() = true......39
    iter.next() = include_css
    iter.hasNext() = true......40
    iter.next() = created_on
    iter.hasNext() = true......41
    iter.next() = page_views
    iter.hasNext() = true......42
    iter.next() = title_text_color
    iter.hasNext() = true......43
    iter.next() = require_login
    iter.hasNext() = true......44
    iter.next() = registration_startdate
    iter.hasNext() = true......45
    iter.next() = timezone_id
    iter.hasNext() = true......46
    iter.next() = tag
    iter.hasNext() = true......47
    iter.next() = order_confirmation_page
    iter.hasNext() = true......48
    iter.next() = showmap
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
    at java.util.HashMap$KeyIterator.next(HashMap.java:877)
    at GetDataTypeFromDB.getResultSetInArray(GetDataTypeFromDB.java:57)
    at GetDataTypeFromDB.main(GetDataTypeFromDB.java:16)
    I am unable to fine the reason for the exception.
    Please help me to solve my problem.
    Regards,
    Thevoice
    Edited by: TheVoice on May 14, 2008 12:01 AM

    TheVoice wrote:
    while(iter.hasNext() != false)
    System.out.println("iter.hasNext() = " + iter.hasNext() +"......" +(i++));
    System.out.println("iter.next() = " + iter.next());
    field = (String)iter.next();
    type = (String)list.get(iter.next());
    }Your major problem is that iter.next() advances one place every time you call it, so in every iteration of that loop, you advance three steps. The first step is guaranteed to be okay, because you checked it with iter.hasNext(), but the other two are not. In addition, you are in effect "skipping" the printing of two out of every three items.
    To print out every item, you probably want to do something like this (call it only one and store it in a variable):
    while(iter.hasNext())
        String field = (String)iter.next();
        System.out.println("iter.hasNext() = " + iter.hasNext() +"......" +(i++));
        System.out.println("iter.next() = " + field);
        String type = (String)list.get(field);
    }For additional clarity, I would recommend using Generics, Map.entrySet(), and the for-each loop:
    public static void getResultSetInArray(Connection con) throws Exception
        Map<String,String> list = new HashMap<String,String>();
        Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
        ResultSet rs = stmt.executeQuery("show columns from launchcomm.events");
        while(rs.next())
            list.put(rs.getString("Field"),rs.getString("Type"));
        rs.close();
        con.close();
        for (Map.Entry<String,String> e : list.entrySet())
            String field = e.getKey();
            String type = e.getValue();
            // do stuff with them
    }Edited by: spoon_ on May 14, 2008 7:34 PM

  • Workshop 9.2 - Web Service Test Client - java.util.NoSuchElementException

    I've found an issue with the Web Services Test Client while developing a web service application in the Weblogic Workshop 9.2 tool. The same schema / code in Workshop 8.1 SP4 works okay in its version of the test client.
    The error seems to manifest itself, when I add the "addresses" element to the "locations" element.
    The error displayed in the weblogic service console is
    <BLOCKQUOTE>
    java.lang.RuntimeException: java.util.NoSuchElementException
    at weblogic.testclient.ConnectionState.createWsdl(ConnectionState.java:63)
    at Controller.refreshWsdl(Controller.java:304)
    at Controller.begin(Controller.java:173)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
            at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
            at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:878)
            at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:808)
            at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:477)
            at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:305)
            at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:335)
            at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:51)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
            at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:95)
            at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2042)
            at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
            at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2114)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
            at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:554)
            at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:851)
            at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:630)
            at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3211)
    Caused by: java.util.NoSuchElementException
            at java.util.AbstractList$Itr.next(AbstractList.java:427)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:341)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.addSoapForParameter(RequestTemplate.java:334)
            at weblogic.testclient.RequestTemplate.createMessageBody(RequestTemplate.java:220)
            at weblogic.testclient.RequestTemplate.buildRequest(RequestTemplate.java:169)
            at weblogic.testclient.RequestTemplate.createRequestTemplate(RequestTemplate.java:103)
            at weblogic.testclient.RequestTemplate.<init>(RequestTemplate.java:85)
            at weblogic.testclient.WebServiceOperation.<init>(WebServiceOperation.java:120)
            at weblogic.testclient.WsdlOperationParser.createOperation(WsdlOperationParser.java:115)
            at weblogic.testclient.WebService.createOperation(WebService.java:242)
            at weblogic.testclient.WebService.<init>(WebService.java:86)
            at weblogic.testclient.Wsdl.parseWsdl(Wsdl.java:127)
            at weblogic.testclient.Wsdl.<init>(Wsdl.java:59)
            at weblogic.testclient.ConnectionState.createWsdlFromHttpUrl(ConnectionState.java:113)
            at weblogic.testclient.ConnectionState.createWsdl(ConnectionState.java:54)
            at Controller.refreshWsdl(Controller.java:304)
            at Controller.begin(Controller.java:173)
            at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
            at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
            at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:878)
            at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:808)
            at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:477)
    </BLOCKQUOTE>
    The code in the Web Service control is...
    <BLOCKQUOTE>
    package services;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import weblogic.jws.WLHttpTransport;
    import au.com.suncorp.services.payment.schema.x0.RequestIdDocument;
    import au.com.suncorp.services.payment.schema.x0.VendorDocument;
    @WebService(targetNamespace="http://suncorp.com.au/services/payment/wsdl/0")
    @WLHttpTransport(serviceUri="services/PaymentService")
    public class Payment {
         @WebMethod
         public RequestIdDocument setupVendor(VendorDocument request) {
              System.out.println(request.xmlText());
              RequestIdDocument result = RequestIdDocument.Factory.newInstance();
              RequestIdDocument.RequestId response = result.addNewRequestId();
              response.setCorrelationId("CorrelationId-" + request.getVendor().getName());
              return result;
    </BLOCKQUOTE>
    The XSD schema is as follows....
    <BLOCKQUOTE>
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://suncorp.com.au/services/payment/schema/0"
    xmlns:tns="http://suncorp.com.au/services/payment/schema/0">
    <!-- ***************************************************************** -->
    <simpleType name="correlationIdType">
    <annotation>
    <documentation>
    The CorrelationId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="estTimeIntervalType">
    <annotation>
    <documentation>
    The Estimated Time Interval field.
    </documentation>
    </annotation>
    <restriction base="integer"></restriction>
    </simpleType>
    <simpleType name="vendorIdType">
    <annotation>
    <documentation>
    The Vendor Id field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="nameType">
    <annotation>
    <documentation>
    The Vendor Name field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="persistenceType">
    <annotation>
    <documentation>
    The Persistence field.
    </documentation>
    </annotation>
    <restriction base="boolean"></restriction>
    </simpleType>
    <simpleType name="ownerType">
    <annotation>
    <documentation>
    The Owner field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="sourceReferenceType">
    <annotation>
    <documentation>
    The vendor Source Reference field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="abnType">
    <annotation>
    <documentation>
    The vendor ABN field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="countryType">
    <annotation>
    <documentation>
    The Country field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="stateType">
    <annotation>
    <documentation>
    The State field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="cityType">
    <annotation>
    <documentation>
    The City field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="postcodeType">
    <annotation>
    <documentation>
    The Postcode field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="gstRegisteredType">
    <annotation>
    <documentation>
    The GST Registered field.
    </documentation>
    </annotation>
    <restriction base="boolean"></restriction>
    </simpleType>
    <simpleType name="withHoldingType">
    <annotation>
    <documentation>
    The WithHolding field.
    </documentation>
    </annotation>
    <restriction base="boolean"></restriction>
    </simpleType>
    <simpleType name="vendorClassType">
    <annotation>
    <documentation>
    The Vendor Class field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="statusType">
    <annotation>
    <documentation>The Status field.</documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="ACTIVE">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="INACTIVE">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>
    <simpleType name="locationIdType">
    <annotation>
    <documentation>
    The Location Id field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="effectiveDateType">
    <annotation>
    <documentation>
    The Effective Date field.
    </documentation>
    </annotation>
    <restriction base="dateTime"></restriction>
    </simpleType>
    <simpleType name="addressIdType">
    <annotation>
    <documentation>
    The AddressId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="addressType">
    <annotation>
    <documentation>
    The Address field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="contactIdType">
    <annotation>
    <documentation>
    The ContactId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="contactMethodType">
    <annotation>
    <documentation>
    The Address field.
    </documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="FAX">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="PHONE">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="EMAIL">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>
    <simpleType name="dispatchMethodType">
    <annotation>
    <documentation>
    The Dispatch Method field.
    </documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="EFT">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="FAX">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="EMAIL">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>
    <simpleType name="currencyType">
    <annotation>
    <documentation>
    The Currency field.
    </documentation>
    </annotation>
    <restriction base="boolean"></restriction>
    </simpleType>
    <simpleType name="payGroupType">
    <annotation>
    <documentation>
    The Pay Group field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="payHoldType">
    <annotation>
    <documentation>
    The Pay Hold field.
    </documentation>
    </annotation>
    <restriction base="boolean"></restriction>
    </simpleType>
    <simpleType name="freightTermsType">
    <annotation>
    <documentation>
    The Freight Terms field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="payHandlingType">
    <annotation>
    <documentation>
    The Pay Handling field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="delayDaysType">
    <annotation>
    <documentation>
    The Delay Days field.
    </documentation>
    </annotation>
    <restriction base="integer"></restriction>
    </simpleType>
    <simpleType name="payFromBankType">
    <annotation>
    <documentation>
    The Pay From Bank field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="paymentInstructionsType">
    <annotation>
    <documentation>
    The Payment Instructions field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="paymentTermsType">
    <annotation>
    <documentation>
    The Payment Terms field.
    </documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="COD">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="SEVEN_DAYS">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="FOURTEEN_DAYS">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="TWENTYONE_DAYS">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="THIRTY_DAYS">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>
    <simpleType name="paymentMethodType">
    <annotation>
    <documentation>
    The Payment Method field.
    </documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="EFT">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    <enumeration value="CHEQUE">
    <annotation>
    <documentation>an enumerated value.</documentation>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>
    <simpleType name="payBankIdType">
    <annotation>
    <documentation>
    The PayBankId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="descriptionType">
    <annotation>
    <documentation>
    The Pay Bank Description field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="bankIdType">
    <annotation>
    <documentation>
    The BankId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="branchIdType">
    <annotation>
    <documentation>
    The BranchId field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <simpleType name="bankAccountType">
    <annotation>
    <documentation>
    The BankAccount field.
    </documentation>
    </annotation>
    <restriction base="string"></restriction>
    </simpleType>
    <!-- ***************************************************************** -->
    <complexType name="payBankDetailsType">
    <sequence>
    <element name="payBankId" type="tns:payBankIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="description" type="tns:descriptionType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="bankId" type="tns:bankIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="branchId" type="tns:branchIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="bankAccount" type="tns:bankAccountType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="effectiveDate" type="tns:effectiveDateType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    </sequence>
    </complexType>
    <complexType name="paymentDetailsType">
    <sequence>
    <element name="paymentTerms" type="tns:paymentTermsType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="paymentMethod" type="tns:paymentMethodType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="dispatchMethod" type="tns:dispatchMethodType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="payGroup" type="tns:payGroupType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="currency" type="tns:currencyType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="payHold" type="tns:payHoldType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="freightTerms" type="tns:freightTermsType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="payHandling" type="tns:payHandlingType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="delayDays" type="tns:delayDaysType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="payFromBank" type="tns:payFromBankType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="paymentInstructions" type="tns:paymentInstructionsType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="bankDetails" type="tns:payBankDetailsType" maxOccurs="1" minOccurs="1"></element>
    </sequence>
    </complexType>
    <complexType name="contactDetailsType">
    <sequence>
    <element name="contactId" type="tns:contactIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="effectiveDate" type="tns:effectiveDateType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="name" type="tns:nameType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="contactMethod" type="tns:contactMethodType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="dispatchMethod" type="tns:dispatchMethodType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="status" type="tns:statusType" maxOccurs="1" minOccurs="1"></element>
    </sequence>
    </complexType>
    <complexType name="arrayOfContactDetails">
    <sequence>
    <element name="contact" type="tns:contactDetailsType" maxOccurs="unbounded" minOccurs="0"></element>
    </sequence>
    </complexType>
    <complexType name="addressDetailsType">
    <sequence>
    <element name="addressId" type="tns:addressIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="effectiveDate" type="tns:effectiveDateType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="name" type="tns:nameType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="address" type="tns:addressType" maxOccurs="1" minOccurs="1"></element>
    <element name="postcode" type="tns:postcodeType" maxOccurs="1" minOccurs="1"></element>
    <element name="city" type="tns:cityType" maxOccurs="1" minOccurs="1"></element>
    <element name="state" type="tns:stateType" maxOccurs="1" minOccurs="1"></element>
    <element name="country" type="tns:countryType" maxOccurs="1" minOccurs="1"></element>
    <element name="contacts" type="tns:arrayOfContactDetails" maxOccurs="1" minOccurs="0"></element>
    </sequence>
    </complexType>
    <complexType name="arrayOfAddressDetails">
    <sequence>
    <element name="address" type="tns:addressDetailsType" maxOccurs="unbounded" minOccurs="0"></element>
    </sequence>
    </complexType>
    <complexType name="locationDetailsType">
    <sequence>
    <element name="locationId" type="tns:locationIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="effectiveDate" type="tns:effectiveDateType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="orderingVendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="invoicingVendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="remittingVendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="returningVendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="status" type="tns:statusType" maxOccurs="1" minOccurs="1"></element>
    <element name="paymentDetails" type="tns:paymentDetailsType" maxOccurs="1" minOccurs="1"></element>
    <element name="addresses" type="tns:arrayOfAddressDetails" maxOccurs="1" minOccurs="0"></element>
    </sequence>
    </complexType>
    <complexType name="arrayOfLocationDetails">
    <sequence>
    <element name="location" type="tns:locationDetailsType" maxOccurs="unbounded" minOccurs="0"></element>
    </sequence>
    </complexType>
    <!-- ***************************************************************** -->
    <element name="Vendor">
    <complexType mixed="true">
    <annotation>
    <documentation>
    The Vendor request object.
    </documentation>
    </annotation>
    <sequence>
    <element name="vendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="1"></element>
    <element name="name" type="tns:nameType" maxOccurs="1" minOccurs="1"></element>
    <element name="persistence" type="tns:persistenceType" maxOccurs="1" minOccurs="1" default="true"></element>
    <element name="owner" type="tns:ownerType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="sourceReference" type="tns:sourceReferenceType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="corporateVendorId" type="tns:vendorIdType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="abn" type="tns:abnType" maxOccurs="1" minOccurs="0" nillable="true"></element>
    <element name="country" type="tns:countryType" maxOccurs="1" minOccurs="1" default="AUS"></element>
    <element name="gstRegistered" type="tns:gstRegisteredType" maxOccurs="1" minOccurs="0" nillable="true" default="true"></element>
    <element name="withHolding" type="tns:withHoldingType" maxOccurs="1" minOccurs="0" nillable="true" default="false"></element>
    <element name="status" type="tns:statusType" maxOccurs="1" minOccurs="1" default="ACTIVE"></element>
    <element name="vendorClass" type="tns:vendorClassType" maxOccurs="1" minOccurs="1"></element>
    <element name="locations" type="tns:arrayOfLocationDetails" maxOccurs="1" minOccurs="0"></element>
    </sequence>
    </complexType>
    </element>
    <element name="RequestId">
    <complexType mixed="true">
    <annotation>
    <documentation>The typical response object for requests.
    </documentation>
    </annotation>
    <sequence>
    <element name="correlationId" type="tns:correlationIdType" maxOccurs="1" minOccurs="1"></element>
    <element name="estTimeInterval" type="tns:estTimeIntervalType" maxOccurs="1" minOccurs="0" nillable="true" default="24"></element>
    </sequence>
    </complexType>
    </element>
    </schema>
    </BLOCKQUOTE>

    Hi Paul
    I believe there is some issue with the TestClient.
    Instead to test, can you please try this?
    1) Right click on Payment.java and choose Webservices -> generate wsdl
    2) Right click on the wsdl and choose Webservices -> Test with WebServices Explorer.
    3) Click on setVendor method
    4) Enter the request parameters
    Sample one:
    <ns:Vendor xmlns="http://www.openuri.org/" xmlns:ns="http://suncorp.com.au/services/payment/schema/0">
    <vendorId xmlns="">Vendor Id</vendorId>
    <name xmlns="">My correlation Id</name>
    <persistence xmlns="">false</persistence>
    <country xmlns="">USA</country>
    <status xmlns="">ACTIVE</status>
    <vendorClass xmlns="">VendorClass</vendorClass>
    </ns:Vendor>
    5) Hit the button 'Go'. The entire soap response will be displayed in the bottom.
    I have tested this and it works fine.
    Output I got:
    <m:setupVendorResponse xmlns:m="http://suncorp.com.au/services/payment/wsdl/0">
    <RequestId xmlns="http://suncorp.com.au/services/payment/schema/0">
    <correlationId>CorrelationId-My correlation Id</correlationId>
    </RequestId>
    </m:setupVendorResponse>
    Thanks,
    Vimala

  • Exception: Scanner - java.util.NoSuchElementException: No line found ???

    Hi there,
    I have the following code:
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class Input {
         public static String readString() {
              return _readString(null, null);
         public static String readString(String title) {
              return _readString(title, null);
         public static String readString(String title, String error) {
              return _readString(title, error);
         private static String _readString(String title, String error) {
              Scanner input = new Scanner(System.in);
              boolean loop = true;
              String str = null;
              while(loop) {
                   try {
                        if(title != null) {
                             System.out.print(title);
                        str = input.nextLine();
                        loop = false;
                   } catch(InputMismatchException e) {
                        if(error != null) {
                             System.out.println(error);
              input.close();
              return str;
    public class Program {
         public static void main(String[] args) {
              String a;
              a = Input.readString("VALUE: ");
              System.out.println(a);
              a = Input.readString("\nVALUE: ");
              System.out.println(a);
    }And the following output:
    VALOR: Hello World!
    Hello World!
    VALUE: Exception in thread "main" java.util.NoSuchElementException: No line found
         at java.util.Scanner.nextLine(Scanner.java:1516)
         at Input._readString(Input.java:29)
         at Input.readString(Input.java:11)
         at Program.main(Program.java:21)The first value is read without any problems but the second throws that exception. Why is this happening? I "fixed" it by removing the input.close(); line but this makes no sense to me. First because I think that I should close the Scanner after using it and second because every time I call the _readString() method, a new Scanner instance will be created, so it doesn't make sense... At least for me, but that's why I'm posting on this forum section, cause I'm new to Java.
    Can someone explain me why exactly does this happen and if possible, a better solution then to remove the input.close()? It just doesn't make any sense to me create a new Scanner instance every time I call the _readString() method and leave it there without closing it...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    First because I think that I should close the Scanner after using it and
    second because every time I call the _readString() method, a new Scanner instance will be createdUmm, NO.
    Let me see if I understand things in the Static world correctly.
    Notice that you have everything declared as "Static" in your Class. A static is only initialized at programs start and everything in your JVM can then us it (well that stuff that has a reference to it). Since it's static, when you close the Scanner, you are closing the only instance that will ever exist in your object.
    For things to work how you think they should, get rid of the Static declarations (excpet in main, where you have to keep them).

  • Errormessage: "java.util.NoSuchElementException"

    Why can't I compile the following code?
    Im using MAC OSX 10.4.10 with the latest J2SE 5.0 Preferences
    import java.util.Scanner;
         class gumballs {
              public static void main(String args[]) {
                   Scanner myScanner = new Scanner(System.in);
                   int gumballs;
                   int kids;
                   int gumballsPerKid;
                   System.out.print("How many gumballs? How many kids? ");
                   gumballs = myScanner.nextInt();     
                   kids = myScanner.nextInt();
                   gumballsPerKid = gumballs / kids;
                   System.out.print("Each kid gets ");
                   System.out.print(gumballsPerKid);
                   System.out.println(" gumballs.");
    } I get the following error when I try to compile the code
    Exception in thread "main" java.util.NoSuchElementException
         at java.util.Scanner.throwFor(Scanner.java:817)
         at java.util.Scanner.next(Scanner.java:1431)
         at java.util.Scanner.nextInt(Scanner.java:2040)
         at java.util.Scanner.nextInt(Scanner.java:2000)
         at gumballs.main(gumballs.java:14)
    How many gumballs? How many kids?
    Program exited with status 1.Please help me! im just a newbie trying to learn java..
    Thanks

    Im on XP and getting the same error message :(
    It compiles fine but when I run it and I am done inputing it gives me that same error message.
    And yes I am running the latest version of JDK
    Also I am having a strange probleming trying to run my files in the command prompt. I can get it to compile fine javac helloworldapp.java and it creates the class. I know my Universal variables are set correctly but when I try java helloworldapp after I have compiled I get a similar error message. I dont know if this is at all related I just started using Java last night so I am a total newb. I would appreciate if one of you pro's could help me out.
    thank you

Maybe you are looking for

  • How do I to modify context value DATABASE.SID on existing web ADI sheet?

    Does anybody know how to modify the connection context value (DATABASE.SID) on an existing web ADI sheet? My original sheet was created against e.g. TESTBASE.TST1, but now I want the same sheet to work on PRD (PRDBASE.PRD). In the old client version

  • EDIT pdf fILE

    how do you edit a pdf file?

  • Graphic inspector color swatch corner darkned ...means what?

    in the inspector, graphic, fill color, the color swatch will sometimes have a upper right corner darkened (like to grab it and turn a page), and other times not. What does this mean? thanks bob

  • I lose internet on my iMac when my mate uses his macbook pro in the same room.

    My wireless internet works absolutley fine with no problems at all, no glitches until my mate turns on his macbook pro. Every couple of minutes I have to turn my wireless connection off and back on again. Sometimes this fixes the problem for another

  • Image in Flash

    If anyone with more intelligence can help I would be extremely grateful. I am creating a flash project that selects at random 25 questions from a MYSQL database. Some of these questions are text, some refer to a diagram that is an image. I am looking