Java.lang.NoSuchMethodError but method is found in both java and class file

Hi All,
  I am working on adding a new component to Trips and Expense but I'm getting an exception and I have no idea why.  Its claiming a java.lang.NoSuchMethodError in class IPrivateVcTraAllMyTrips yet the method is there.
  When I step through the code I can get to the point where it tries to attach the component then before it actually crashes, I hold ctrl and click on the method that it claims does not exist.  The code brings me to the IPrivateVcTraAllMyTrips java code and to the method ... so it is there in my sources.  I then went to my bin directory and decompiled the IPrivateVcTraAllMyTrips class and found the method there as well.  It seems as tho its not actually being deployed.
  Does anyone have any suggestions?
Exception Stack ##
Root Cause
The initial exception that caused the request to fail, was:
   java.lang.NoSuchMethodError: com.sap.xss.tra.vc.allmytrips.wdp.IPrivateVcTraAllMyTrips.wdGetFcObjectSelectionComponentUsage()Lcom/sap/tc/webdynpro/progmodel/api/IWDComponentUsage;
    at com.sap.xss.tra.vc.allmytrips.VcTraAllMyTrips.onInit(VcTraAllMyTrips.java:262)
    at com.sap.xss.tra.vc.allmytrips.wdp.InternalVcTraAllMyTrips.onInit(InternalVcTraAllMyTrips.java:408)
    at com.sap.xss.tra.vc.allmytrips.VcTraAllMyTripsInterface.onInit(VcTraAllMyTripsInterface.java:175)
    at com.sap.xss.tra.vc.allmytrips.wdp.InternalVcTraAllMyTripsInterface.onInit(InternalVcTraAllMyTripsInterface.java:205)
    at com.sap.xss.tra.vc.allmytrips.wdp.InternalVcTraAllMyTripsInterface$External.onInit(InternalVcTraAllMyTripsInterface.java:399)

I wish it were that simple.  I have restarted but it still threw the same exception.
I ended up reimporting everything again and starting from scratch (a 4 hour process to get back to where I was).  The issue is no more.
thx for your reply

Similar Messages

  • Java.lang.NoSuchMethodError from CMP bean

    Hello guys,
    Iam trying to convert some of my BMP beans to CMP. I removed all the SQL from the EJB and changed my deployment profile. My deployment went fine..(i was able to generate the SQL's) and the tables were successfully created...but when i run the application it throws:
    java.lang.NoSuchMethodError: BookEJB: method ejbFindByPrimaryKey(Ljava/lang/String;)Ljava/lang/String; not found
    on ejbFindByPrimaryKey method..The primary key is of type java.lang.String which gets mapped to a VARCHAR2(255) on my table..Iam using J2EE RI with Oracle8i on win2000... My EJB doesn't contain the ejbFindByPrimaryKey method but my HOME interface contains the findByPrimaryKey method..
    ANy help would be appreciated!!
    TIA
    Clement

    hi!
    i think you should define ejbFindByPrimaryKey() method yourself, because its a requirment that you have to define ejbFindByPrimaryKey () .
    bye.

  • JWSC ant task  getting java.lang.NoSuchMethodError

    Hi all,
    I am trying to build a webservice with JWSC ant task in JDK 1.6 which uses JWS annotations and a few weblogic specific annotations.
    I am getting the following error while building it.
    However, when I build it from my IDE (eclipse) it works fine.
    i tried copying the libraries from eclipse and ran the build. But it didn't work.
    any one have faced this issue and resolved it ? Please let me know your suggestions.
    I am using weblogic 10.3 libraries to build the web service.
    jwsctest:
    [jwsc] JWS: processing module /CaseStatusWebService
    BUILD FAILED
    java.lang.NoSuchMethodError: weblogic.wsee.tools.anttasks.DelegatingJavacTask$ExposingJavac.getTempdir()Ljava/io/File;
    at weblogic.wsee.tools.anttasks.DelegatingJavacTask.getTempdir(DelegatingJavacTask.java:170)
    at weblogic.wsee.tools.anttasks.JwsModule.initialize(JwsModule.java:303)
    at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:252)
    at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:229)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)
    Thanks,
    Sriram

    Hi Sriram,
    Before running the ant task did you run the following startup script?
    /setWLSEnv.sh
    I found one of the customer in oracle knowledge base facing the similar issue like you and issue was solved after running the setWLSEnv startup script.
    If the issue is still not resolved after trying the above suggestion, please attach the build.xml to this thread to review the same.
    Thanks,
    Vijaya

  • Java.lang.NoSuchMethodError: setBasename

    Hi All
    I recently migrated to jsf 1.2 while trying to access the login page i get the following error
    Can anyone help me out on this??
    com.sun.faces.lifecycle.LifecycleImpl phase
    WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@84a5c3) threw exception
    javax.faces.FacesException: javax.servlet.ServletException: java.lang.NoSuchMethodError: setBasename
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:427)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:454)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:134)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: javax.servlet.ServletException: java.lang.NoSuchMethodError: setBasename
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:324)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:394)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:525)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:261)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:422)
         ... 25 more
    Caused by: java.lang.NoSuchMethodError: setBasename
         at jsp_servlet.__login._jsp__tag1(__login.java:396)
         at jsp_servlet.__login._jspService(__login.java:179)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:394)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:525)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:261)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:422)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:454)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:134)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    Edited by: user11096200 on Jun 24, 2009 5:06 AM

    Thanks for the reply,
    I tried rebuilding the application with JSF 1.2 jars in classpath ,but i get another exception and i'm using weblogic 10.1 MP1 and JSF1.2 that comes with weblogic 10.
    com.sun.faces.lifecycle.LifecycleImpl phase
    WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@8b24fa) threw exception
    java.lang.ClassCastException: java.lang.String
         at jsp_servlet.__login._jsp__tag1(__login.java:442)
         at jsp_servlet.__login._jspService(__login.java:180)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:394)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:525)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:261)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:422)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:454)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:134)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         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:3392)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

  • Java.lang.NoSuchMethodError at at weblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)

    I am getting this xml parser error after migrating to weblogic7.0 from wl 6.1
    I am using the sax parser. I am using the jaxp.jar and xalan.jar for compilation
    as well as running the application. However I am also using the weblogic.jar for
    compilation and runtime in the classpath. I am wandering if there are any changes
    to the version of SAX parser which weblogic 7.0 is using. Does anybody has any
    idea..
    Thanks,
    This is the error which I am getting on the server.
    java.lang.NoSuchMethodError
    at weblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)
    at weblogic.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:366)
    at weblogic.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:190)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactory
    Impl.java:232)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactory
    Impl.java:331)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImp
    l.java:875)
    at weblogic.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryI
    mpl.java:757)
    at weblogic.xml.jaxp.WebLogicTransformerFactory.newTransformer(WebLogicTransformerFactory.ja
    va:195)
    at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.ja

    The version of the xalan in weblogic7.0 is 2.2 transformer.
    You can refer to the following upgrade guide.
    Ajay
    "sameer" <[email protected]> wrote in message
    news:3e78d50e$[email protected]..
    >
    I am getting this xml parser error after migrating to weblogic7.0 from wl6.1
    I am using the sax parser. I am using the jaxp.jar and xalan.jar forcompilation
    as well as running the application. However I am also using theweblogic.jar for
    compilation and runtime in the classpath. I am wandering if there are anychanges
    to the version of SAX parser which weblogic 7.0 is using. Does anybody hasany
    idea..
    Thanks,
    This is the error which I am getting on the server.
    java.lang.NoSuchMethodError
    atweblogic.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:356)
    atweblogic.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:366)
    atweblogic.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:190)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(Trans
    formerFactory
    Impl.java:232)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.processFromNode(Trans
    formerFactory
    Impl.java:331)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transfor
    merFactoryImp
    l.java:875)
    atweblogic.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transf
    ormerFactoryI
    mpl.java:757)
    atweblogic.xml.jaxp.WebLogicTransformerFactory.newTransformer(WebLogicTransfor
    merFactory.ja
    va:195)
    atweblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransfor
    merFactory.ja

  • Java.lang.NoSuchMethodError: java.lang.Float: method parseFloat(Ljava/lang/

    java.lang.NoSuchMethodError: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found
    WHAT WOULD MAKE THIS HAPPEN. THIS SEEMS TO WORK IN JDK1.3.1 BUT NOT IN BLACKDOWN 1.1.3_V3
    THIS IS MY CODE:
    try{
    DecimalFormat dfp = new DecimalFormat( "0.00" );
    if(!Price.equals("")) {
    float MyFloat = Float.parseFloat(Price);
    Price = dfp.format(MyFloat);
    }catch(NumberFormatException nfe){
    PriceValid = 1;

    This error says:
    - There is no method called "parseFloat" that receives a String as parameter in class java.lang.Float.
    Look the method "parseFloat" at the class java.lang.Float!!

  • Java.lang.NoSuchMethodError while invoking web service method

    Hi, I have a web service which has two methods exposed as
    A and B.
    I deployed it on weblogic server (7.0 SP4) and fired teh request when I got this error:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header/>
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring/>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.NoSuchMethodError
    I tried deploying the web service on another instance and there the method A was invoked but I got the same error when I tried invoking B.
    I tried it on third instance and there both the methods were successfully invoked.
    The methods A and B name start with capital letter (someone told me that method name should not start with capital letter but that does not hold good here)
    Any idea why this starnge behavior of web service?

    Hi Guys,
    I have solved the above issue by applying the PATCH 1 & PATCH 2 of the
    BPEL 10.1.2 version .
    Thanks
    Kalyan

  • Java.lang.NoSuchMethodError: sqlj.tools.Sqlj: method resetStaticVariables()V not foun

    I would like to retrieve data from Oracle8.0.5 using sqlj.
    i tried:
    <%@page language="sqlj
    import= sqlj.runtime.ref.DefaultContext,oracle.sqlj.runtime.Oracle"%>
    and i've got the error:
    java.lang.NoSuchMethodError: sqlj.tools.Sqlj: "method resetStaticVariables()V not found"
    someone helps?
    thanx

    This uses a feature which is only found in post 8.1.6.1 versions of Oracle SQLJ. You have two choices:
    (1) Download ojsp 1.0.0.6.1 or later from OTN. This contains an updated SQLJ version.
    (2) Or wait for the SQLJ 8.1.7 release (or later) in the next couple of weeks.
    null

  • Java.lang.NoSuchMethodError: java/util/Vector method revove...

    After using jexegen from microsoft to make EXE. I receive this error when i execute the my EXE :
    java.lang.NoSuchMethodError: java/util/Vector method revove...
    Any body know why?
    If i execute from JBuilder i have no problem!

    hi, i don't have much experience with M$ java products, but as far as i remember, M$ java stopped developping since jdk 1.1.4 (or 1.1.7).
    maybe that's the reason for throwing this exception. if you want to "exe" your class-file, try JToExe.
    greetzzz
    chris

  • DoInit() Method error - java.lang.NoSuchMethodError: com.sap.tc.webdynpro.m

    Hello,
       Im having trouble running a Web Dynpro Application. When running, the application is showing me the following exception,
    java.lang.NoSuchMethodError: com.sap.tc.webdynpro.model.webservice.gci.WSTypedModel.<init>(Ljava/lang/String;Ljava/lang/String;Ljavax/xml/namespace/QName;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Lcom/sap/tc/webdynpro/model/webservice/gci/IWSTypedModelInfo;Ljava/util/Map;Ljava/util/Map;)V
      at pe.com.minsur.wd_po_ws.wd_po_ws_model.Wd_po_ws_Model.<init>(Wd_po_ws_Model.java:124)
      at pe.com.minsur.wd_po_ws.wd_po_ws_app.comp.Wd_po_ws_Comp.wdDoInit(Wd_po_ws_Comp.java:120)
      at pe.com.minsur.wd_po_ws.wd_po_ws_app.comp.wdp.InternalWd_po_ws_Comp.wdDoInit(InternalWd_po_ws_Comp.java:195)
      at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:160)
    This is in the DoInit() method, In the line,
    Wd_po_ws_Model wd_po_ws_ModelModel = new Wd_po_ws_Model();
      It could be the METADATA or MODELDATA destination configuration?
    Thanks
    SU

    Hello,
    The problem is solved following these steps,
    "NWDS IDE is in SP04 whereas the WebDynpro Runtime is in SP01. So yo have to upgrade your WebDynpro in WebAS to SP04.
    All WebDynpro for Java patches are available on SAP Service Marketplace.Note 330793 explains how to download patches from SAP Service Marketplace. Note 1395865 explains how to find the Web Dynpro for Java related SCAs.
    Update your system via JSPM.
    Please refer the link to the official documentation for JSPM
    http://help.sap.com/saphelp_nwpi711/helpdata/en/1f/c45b4211aac353e10000000a1550b0/frameset.htm
    From WebDynpro perspective, we recommend you to apply both WD-RUNTIME.SCA and FRAMEWORK.SCA. So if any one of the archive is not mentioned in the 'SP Patch Level' tab, it is recommended to apply the same which is available in the service market place."
    Regards
    SU

  • Incompatible types - found java.lang.String but expected int

    This is an extremely small simple program but i keep getting an "incompatible types - found java.lang.String but expected int" error and dont understand why. Im still pretty new to Java so it might just be something stupid im over looking...
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class Lab
    public static void main(String []args)
    int input = JOptionPane.showInputDialog("Input Decimal ");
    String bin = Integer.toBinaryString(input);
    String hex = Integer.toHexString(input);
    System.out.println("Decimal= " + input + '\n' + "Binary= " + bin + '\n' + "Hexadecimal " + hex);
    }

    You should always post the full, exact error message.
    Your error message probably says that the error occurred on something like line #10, the JOptionPane line. The error is telling you that the compiler found a String value, but an int value was expected.
    If you go to the API docs for JOptionPane, it will tell you what value type is returned for showInputDialog(). The value type is String. But you are trying to assign that value to an int. You can't do that.
    You will need to assign the showInputDialog() value to a String variable. Then use Integer.parseInt(the_string) to convert to an int value.

  • Javax.naming.NamingException.  Root exception is java.lang.NoSuchMethodError

    I am using WLS5.1 inside visualage environment. I am trying to run
    a Simple EJB which connects to the database and executes two simple
    queries. The client code is as shown below:
    try{
    Context ic = getInitialContext();
    System.out.println("Initial Context created......"); java.lang.Object
    objref = ic.lookup("simpleBean.AtmHome"); System.out.println("objref
    created......");
    AtmHome home = (AtmHome) PortableRemoteObject.narrow(objref, AtmHome.class);
    System.out.println("home created......");
    Atm atm = home.create();
    System.out.println("atm created......");
    atm.transfer(8, 9, 100000);
    catch (NamingException ne)
    ne.printStackTrace(System.out);
    finally {
         try {
              ic.close();
              System.out.println("Closed the connection");
         catch (Exception e) {
              System.out.println("Exception while closing context....." );
    The above code executes fine for the first time but second time
    it throws an exception "javax.naming.NamingException.
    Root exception is java.lang.NoSuchMethodError"
    javax.naming.NamingException. Root exception is java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    --------------- nested within: ------------------
    weblogic.rmi.ServerError: A RemoteException occurred in the server
    method
    - with nested exception:
    [java.lang.NoSuchMethodError:
    Start server side stack trace:
    java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    End  server side stack trace
         weblogic.rmi.extensions.WRMIInputStream weblogic.rmi.extensions.AbstractRequest.sendReceive()
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.WLContextStub.lookup(java.lang.String)
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
         void simpleBean.AtmClient.main(java.lang.String [])
    NamingException is caught....
    I found out that it hangs at lookup function in the above code.
    Please let me know if I am missing any environment settings.
    Thanks
    Shailaja

    This problem is solved after installing service pack 8 for weblogic
    5.1
    -shailaja
    "shailaja" <[email protected]> wrote:
    >
    I am using WLS5.1 inside visualage environment. I am trying
    to run
    a Simple EJB which connects to the database and executes
    two simple
    queries. The client code is as shown below:
    try{
    Context ic = getInitialContext();
    System.out.println("Initial Context created......"); java.lang.Object
    objref = ic.lookup("simpleBean.AtmHome"); System.out.println("objref
    created......");
    AtmHome home = (AtmHome) PortableRemoteObject.narrow(objref,
    AtmHome.class);
    System.out.println("home created......");
    Atm atm = home.create();
    System.out.println("atm created......");
    atm.transfer(8, 9, 100000);
    catch (NamingException ne)
    ne.printStackTrace(System.out);
    finally {
         try {
              ic.close();
              System.out.println("Closed the connection");
         catch (Exception e) {
              System.out.println("Exception while closing context....."
    The above code executes fine for the first time but second
    time
    it throws an exception "javax.naming.NamingException.
    Root exception is java.lang.NoSuchMethodError"
    javax.naming.NamingException. Root exception is java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    --------------- nested within: ------------------
    weblogic.rmi.ServerError: A RemoteException occurred in
    the server
    method
    - with nested exception:
    [java.lang.NoSuchMethodError:
    Start server side stack trace:
    java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    End  server side stack trace
         weblogic.rmi.extensions.WRMIInputStream weblogic.rmi.extensions.AbstractRequest.sendReceive()
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.WLContextStub.lookup(java.lang.String)
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
         void simpleBean.AtmClient.main(java.lang.String [])
    NamingException is caught....
    I found out that it hangs at lookup function in the above
    code.
    Please let me know if I am missing any environment settings.
    Thanks
    Shailaja

  • Java.lang.NoSuchMethodError:java/io/File:

    hi all,
    i have just a dbf file and no database server, can i still use the JDBC driver to make a connnection?
    If yes, i put my dbf file in the Tomcat root directory and write con=DriverManager.getConnection("jdbc:DBF://localhost:8080/","","");
    but it always returns an error
    java.lang.NoSuchMethodError:java/io/File: method getCanonicalFile()Ljava/io/File ; not found
    Anyone know what's wrong?
    Below is the driver readme for the URL format:
    URL format:
    Direct Access:
    jdbc:DBF:[/]/[DatabasePath]
    For example: "jdbc:DBF:/." "jdbc:DBF:/../dbffiles"
    Access by DBF Server: Skip it if you don't use RMI or JINI.
    jdbc:DBF:[/][host][:port]/[DatabasePath]
    Default host:localhost port:2129 DatabasePath:
    For example: "jdbc:DBF://domain.com:3099/../dbffiles" if one DBFServer is run on the 3099 port of domain.com
    */

    We got a similar error the other day trying to grab the Meta-Data.
    Once I took those lines out everything else worked fine. Ie our connection and loading code was fine.
    It seems that not all methods are supported on all implementations of the jdbc/odbc drivers.
    Our current issue has to do with having a lot of different databases, and not wanting to set up ODBC links to all of them (or wanting to find an easy way to do that).

  • AMA Dialog throws Exception : java.lang.NoSuchMethodError

    Hi,
    I am trying to create my own Search Rules for the Application Migration Assistant v1.0, I am following the online tutorial. I am using JDev 10.1.2.0.0 ( Build 1811 ).
    If I try to specify the New Search Rules File, the dialog throws this error :-
    Exception occurred during event dispatching:
    java.lang.NoSuchMethodError: oracle.xml.parser.schema.XSDBuilder.build(Ljava/io/
    InputStream;Ljava/net/URL;)Ljava/lang/Object;
            at oracle.mtg.sqllocator.addin.analyzer.RulesValidator._buildXMLSchema(U
    nknown Source)
            at oracle.mtg.sqllocator.addin.analyzer.RulesValidator.validateXML(Unkno
    wn Source)
            at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel._comm
    it(Unknown Source)
            at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel.acces
    s$000(Unknown Source)
            at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel$1.vet
    oableChange(Unknown Source)
            at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
    port.java:300)
            at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSup
    port.java:217)
            at oracle.bali.ewt.dialog.JEWTDialog.fireVetoableChange(Unknown Source)
            at oracle.bali.ewt.dialog.JEWTDialog.dismissDialog(Unknown Source)
            at oracle.bali.ewt.dialog.JEWTDialog$UIListener.actionPerformed(Unknown
    Source)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
            at java.awt.Component.processMouseEvent(Component.java:5100)
            at java.awt.Component.processEvent(Component.java:4897)
            at java.awt.Container.processEvent(Container.java:1569)
            at java.awt.Component.dispatchEventImpl(Component.java:3615)
            at java.awt.Container.dispatchEventImpl(Container.java:1627)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
            at java.awt.Container.dispatchEventImpl(Container.java:1613)
            at java.awt.Window.dispatchEventImpl(Window.java:1606)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:141)
            at java.awt.Dialog$1.run(Dialog.java:540)
            at java.awt.Dialog.show(Dialog.java:561)
            at java.awt.Component.show(Component.java:1133)
            at java.awt.Component.setVisible(Component.java:1088)
            at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
            at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
            at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel._modi
    fySearchRulesFile(Unknown Source)
            at oracle.mtg.sqllocator.addin.project.ui.EditSearchRulesFilePanel.creat
    eCOMBean(Unknown Source)
            at oracle.mtg.sqllocator.addin.project.ui.SearchRulesListPanel._newCOMBe
    an(Unknown Source)
            at oracle.mtg.sqllocator.addin.project.ui.SearchRulesListPanel$UIObserve
    r.actionPerformed(Unknown Source)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
    31)
            at java.awt.Component.processMouseEvent(Component.java:5100)
            at java.awt.Component.processEvent(Component.java:4897)
            at java.awt.Container.processEvent(Container.java:1569)
            at java.awt.Component.dispatchEventImpl(Component.java:3615)
            at java.awt.Container.dispatchEventImpl(Container.java:1627)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
            at java.awt.Container.dispatchEventImpl(Container.java:1613)
            at java.awt.Window.dispatchEventImpl(Window.java:1606)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:141)
            at java.awt.Dialog$1.run(Dialog.java:540)
            at java.awt.Dialog.show(Dialog.java:561)
            at java.awt.Component.show(Component.java:1133)
            at java.awt.Component.setVisible(Component.java:1088)
            at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
            at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
            at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:276
            at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
    ingsPanel.java:185)
            at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
    ingsPanel.java:110)
            at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSett
    ingsPanel.java:101)
            at oracle.jdeveloper.model.JProjectStructureController.handleEvent(JProj
    ectStructureController.java:342)
            at oracle.ide.IdeAction.performAction(IdeAction.java:649)
            at oracle.ide.IdeAction$1.run(IdeAction.java:857)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)I am not sure what other relevant information is necessary to debug this. I found the procedure really straightforward, but it's just this naggin error which is stopping me from completing my work.
    Can you please help me with this ?
    Regards,
    Sandeep

    Hi Donal,
    Thanks for your response. I found an archived version of JDeveloper v 9.0.4.1.1 ( Build 1436 ). However, AMA refuses to show up in this versiontoo.
    I even tried to add AMA as an "External Tool" , by trying to invoke the class oracle.mtg.sqllocator.addin.SQLLocatorExtension that is listed in jdev-ext.xml. I even tried with oracle.mtg.sqllocator.addin.sqlnav.SqlNavigatorAddin, but it still doesn't work.
    If I try to call one of the two classes directly, I get this error :-
    java.io.IOException: CreateProcess: D:\JDev9.0.4\jdev\lib\ext\ama.jar!\oracle\mtg\sqllocator\addin\SQLLocatorExtension.class error=3
            at java.lang.Win32Process.create(Native Method)
         at java.lang.Win32Process.<init>(Win32Process.java:66)
         at java.lang.Runtime.execInternal(Native Method)
         at java.lang.Runtime.exec(Runtime.java:566)
         at oracle.ide.runner.Starter.start(Starter.java:195)
         at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:524)
         at oracle.ide.runner.RunProcess.start(RunProcess.java:477)
         at oracle.ide.runner.SimpleProcess.exec(SimpleProcess.java:203)
         at oracle.jdevimpl.toolmanager.Tool.invoke(Tool.java:355)
         at oracle.jdevimpl.toolmanager.ToolManager.handleEvent(ToolManager.java:581)
         at oracle.ide.IdeAction$1.run(IdeAction.java:634)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)We'll be soon engaged in a major effort to revamp a big Java Application & AMA will be of big help to us.
    Regards,
    Sandeep

  • Java.lang.NoSuchMethodError: getSocket using JavaMail inside JBoss

    Hi,
    i built a library to easily send emails with JavaMail, via SMTP. When i use my lib in a stand-alone java application, it works fine, but when i need to use it inside my web application, deployed on JBoss AS, i get the following error:
    Servlet.service() for servlet action threw exception
    java.lang.NoSuchMethodError: getSocket
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
         at javax.mail.Service.connect(Service.java:233)
         at it.compit.mail.helper.send.SMTPSender.send(SMTPSender.java:39) where it.compit.mail.helper.send.SMTPSender.send is the method i use to send email in my lib. SMTPSender.java at line 39 is
    SMTPTransport tr = (SMTPTransport) session.getTransport("smtp"); I don't want to use SessionBean to send email from JBoss AS. I did not include mail.jar in server/default/lib dir because JBoss has got a built-in implementation of JavaMail. Using javamail debugging, i've noticed that javamail inside my JBoss is "JavaMail version 1.3.1", while i used version 1.4ea to build my lib.
    So, any ideas to solve my problem?
    Thanks in advance.
    Elisa Distefano a.k.a Etha

    Hi bshannon,
    i looked for other javamail libs in my JBoss dir: found nothing but the only mail.jar located in server/default/lib/ (provided by default installation). I tried to specify the classpath into mail-service.xml without success.
    I also noticed that when JBoss starts, logs print "DEBUG: JavaMail version 1.3.1 " while the MANIFEST.MF inside my mail.jar contains "Implementation-Version: 1.4".
    My JBoss version is 4.0.4 GA. Any idea?!?

Maybe you are looking for