Error: No return type for constructor?

import java.swing.*;
public class firstWindow extends JFrame
     public static final int WIDTH = 300;
     public static final int HEIGHT = 200;
     public FirstWindow()
          super();
          setSize(WIDTH,HEIGHT);
          JLabel newLabel = new JLabel("My Medical Record.");
          getContentPane().add(newLabel);
          WindowDestroyer listener = new WindowDestroyer();
          addWindowListener(listener);
}I figure this is a syntax error but can't see it. WindowsDestroyer class below
import java.awt.*;
import java.awt.event.*;
     comments for window destroyer class
public class WindowDestroyer extends WindowAdapter
     public void windowClosing(WindowEvent e)
          System.exit(0);
}

Hi,
I just got back into town and saw all the heartfelt response. Thanks.
I have no idea why I reposted this. It's not my norm and in no way was I trying to scrape out an answer. But I did it and I take the hit for it. I really apologize for that.
The error was basic, but it's where I'm freaking AT. Basic. Go back to your initial steps into your FIRST programming language and review all the clumsy errors you made. I'm sure I'm going to make a few more thousand before I'm through.
Java's error messages and syntax may seem very familiar to you but it's brand new to me. Many of the error messages and syntax aren't always clear, at least initially.
From the ignorant knob butthole
Edited by: Zarnon on Mar 13, 2008 7:13 AM
Edited by: Zarnon on Mar 13, 2008 7:21 AM
Edited by: Zarnon on Mar 13, 2008 7:23 AM

Similar Messages

  • Complex return type for operations in Application Services

    Hi all,
    I am trying to create a complex return type for one of operation in CAF Application service.I have created a complex dataStructure  named productList and added product bussiness object as its attribute with cardinality 0--n. And used product dataType as my return type.
    But I am not getting any output but its work fine with cardinality 0--1.
    I am using CE 7.1 SP5 trial version.......
    Can anyone

    Hi,
    And used product dataType as my return type.
    Are you sure you did not forgot to change you operations return type to "productList"?
    Best regards
    Philipp

  • Error handling return code for Provide Statement

    Hi Experts,
    For select statement we have error handling return code sy-subrc.
    What is the error handling return code for provide.. end provide statement.
    Thanks,
    Ragu

    Ragu,
    Same thing.
    Check sy-subrc.
    sy-subrc is the return code for all ABAP statements as far as I know.
    Regards,
    Dilek

  • Asking for return type with constructor

    import java.swing.*;
    public class firstWindow extends JFrame
         public static final int WIDTH = 300;
         public static final int HEIGHT = 200;
         public FirstWindow()
              super();
              setSize(WIDTH,HEIGHT);
              JLabel newLabel = new JLabel("My Medical Record.");
              getContentPane().add(newLabel);
              WindowDestroyer listener = new WindowDestroyer();
              addWindowListener(listener);
    }Continue to get a 'method with no return type'. I looked for a syntax error but can't see it.
    Edited by: Zarnon on Mar 2, 2008 2:07 PM

    radiorx wrote:
    public FirstWindow()Class name is firstWindow, so the constructor should be re-named :
    public firstWindow()In the former case, the FirstWindow identifier creates a method rather than a constructor, and methods in Java need a return type.
    Hope this helpsInstead of renaming the constructor, rename the class file public class firstWindow extends JFrame into public class FirstWindow extends JFrame

  • What is the default return type for a constructor

    I tried and found out that it should not be void, what is it? I am confused. Any clue? thanks

    constructors do not have return types. it is implicit that it is initializing a newly created object of the class of which it is a member.
    --p                                                                                                                                                                                                                                                                                               

  • Non-void return type for Application Module Clients Interface

    Hello, can anyone guide me on how will I solve my problem.
    first of all, I'm using JDeveloper 10.1.3, I use JSF, ADF Faces, ADF Model, ADF Business Components.
    I made a web page that has a Transactional Capabilities, all is going smoothly, all data's can be saved to oracle database. I created a Custom Method in my Application Module and can be used in Clients Interface, that method is for saving data's to database.
    My problem is I dont know how to create a custom method that returns a value in my Application Module. Which means if I set it to non-void return type, it is not visible to Client Interface. If you're going to ask me why I need it to return a value? Well since that method is for saving data's, if there's an Error Occured, I can return the Error Message and show it to my user interface.
    Please help. thanks

    If you want to return your own type then simply define it as serializable and you will find that it will appear in the Client Interface dialog of your AM.
    eg, you could return this type from your application module to progagate a meaningful message to your UI:
    package com.delexian.model;
    import java.io.Serializable;
    public class MyMessage implements Serializable {
        private String _severity;
        private String _message;
        public MyMessage() {
        public void setSeverity(String severity) {
            this._severity = severity;
        public String getSeverity() {
            return _severity;
        public void setMessage(String message) {
            this._message = message;
        public String getMessage() {
            return _message;
    }regards,
    Brenden

  • Return type for count queries

    Hello,
    My entity manager executes a native query for a count(*) operation to get the row count from a table. But I am confused to see that while executing I get different datatypes such BigInteger, BigDecimal etc on different runs of the same query. Why is this so?
    What is the deciding factor for count queries data type??
    Please help....

    The whole point of a constructor is to create an object on the heap and return a reference to that memory block. In fact the call to the constructor will return a reference to the instantiated object. Thus there is no point in specifying a return type to a constructor.
    If you think about the way we call the constructor then it's obvious that it's not a regular method which goes inside an object.
    Hope this will do what you want :)

  • CFC Explorer Error (xml return type)

    I am having an issue with the self documentation that ColdFusion displays in the CFC Explorer.
    Below is the simplest code that will reproduce the issue on my server.
    test.cfc
    <cfcomponent displayname="Test Component" output="no">
      <cffunction name="echoFunction" access="remote" returntype="xml">
        <cfargument name="echoArgument" type="string" required="yes">
        <cfset xmlToReturn = XMLNew()>
        <cfset xmlToReturn.xmlRoot = XMLElemNew(xmlToReturn, "TestXML")/>
        <cfset xmlToReturn.xmlRoot.xmlText = echoArgument />
        <cfreturn myResult>
      </cffunction>
    </cfcomponent>
    When I hit this in a browser with no parameters I am promted for my CFAdmin password and I am prested with a page that looks like this.
    At this point evertying looks correct.  The error happens when I click on the "xml" link that indicates the return value for the echoFunction().
    This link brings up a page with the following text.
    Component not found
    The component definition file for component 'MoMo.xml' cannot be  found on this server.
    It appears that it is looking for a MoMo\xml.cfc file.  I can confirm that by creating that file with the following code.
    xml.cfc
    <cfcomponent displayname="XML.cfc" output="no">
    </cfcomponent>
    Now when I click on the xml link in the CFC Explorer I get a page that looks like this.
    So it appears that CFC's don't know how to document themselves when the returntype of a function is set to "XML".  It is treating the returntype of XML as an cfc object named XML.  Or am I missing someting that allows me to define what the XML is supposed to be?  IMHO this should not be a link at all OR there should be a way of pointing it to the XSD file for the XML that funciton returns.

    Hi
    The EXTRACT function returns XMLType data but you can't use TO_CHAR to XMLType data. This causes the error.
    Try the getClobVal() function:
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb04cre.htm#i1024803
    Ott Karesz
    http://www.trendo-kft.hu

  • Error: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request

    Hi Gurus,
    i am hardly fighting with this error in Communication Channel Monitoring:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    This is my scenario.
    I do a File to SOAP Scenario. in SXI_MONITOR everything is fine.
    My CommChan is a SOAP Receiver
    HTTP
    SOAP 1.1
    Central Adapter Engine
    Target URL is https --> i check url for correctness
    Configure User Authentication is checked and username and pw are given and are correct.
    Configure Certificate Authentication is checked are working
    Configure Proxy is checked and Host and port are povided.
    SOAP Action is provided
    In Tab Module
    if have this Processing Sequence
    1     localejbs/AF_Modules/MessageTransformBean     Local Enterprise Bean     transform
    2     sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean     Local Enterprise Bean     1
    and this Module configuration (and only this)
    transform     Transform.ContentType     text/xml;charset=utf-8
    (according to /people/sobhithalaxmi.kata/blog/2009/07/21/cost-free-edi-integration-using-message-transformation-bean)
    As far as i understand that my http header should have Content-Type: text/xml;charset=utf-8 now. I don't understand why Communication Channel Monitoring shows an error according to content TEXT/HTML.
    Can anyone help me with that?
    Is it possible that Transform.ContentType does not work for SOAP Receiver Adapter?
    is there any chance to view the HTTP-Header of the outgoing SOAP Request (with PI Transaction / Java Enironment) to convince myself that the HTTP Header is text/xml?
    Thank you in advance and Best Regards
    Udo

    Hi Thanks for your fast replies.
    The Provider of the Endpoint tells me that he needs text/xml as content-type. When I sent a message to the given Endpoint via SOAP UI I can see in the HTTP LOG of SOAP UI that the Endpoint is also sending text/xml back.
    Below you find the Details log out of the CommChan Monitoring.
    2011-04-29 11:37:45 Information The message status was set to TBDL.
    2011-04-29 11:37:45 Information Retrying to deliver message to the application. Retry: 3
    2011-04-29 11:37:45 Information The message was successfully retrieved from the receive queue.
    2011-04-29 11:37:45 Information The message status was set to DLNG.
    2011-04-29 11:37:45 Information Delivering to channel: getxxxxx_In  <---- name of my SOAP Receiver CommChan
    2011-04-29 11:37:45 Information Transform: using Transform.Class:  $identity
    2011-04-29 11:37:45 Information Transform: transforming the payload ...
    2011-04-29 11:37:45 Information Transform: successfully transformed
    2011-04-29 11:37:45 Information SOAP: request message entering the adapter with user J2EE_GUEST
    2011-04-29 11:37:46 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Information SOAP: sending a delivery error ack ...
    2011-04-29 11:37:46 Information SOAP: sent a delivery error ack
    2011-04-29 11:37:46 Error SOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Error Adapter Framework caught exception: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Error Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request.
    2011-04-29 11:37:46 Error The message status was set to NDLV.
    What i am missing is a hint on the Message Transform Bean and a on a successfull sending process.
    What i also tried already:
    i also activated the checkbox "Do not use SOAP Envelop" in CommChan Configuration. The Result you see below (the last log entry is on first line - so read from bottom to top)
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request
    error in response
    call completed
    request entering
    Message processing started
    As you can see there is a "call completed" and "error in response" log entry. This is missing in in the first Log. So i guess the error is still in the sending process.
    Installing additional Software on the PI and use them to find out what the HTTP Request is is not possible as system access is very strict and limited :/

  • SOAP adapter error: invalid content type for SOAP: TEXT/HTML.

    Dear SAP experts,
    Need your help again here.
    Currently, i am getting this specific error in my RWB logs.
    The connection is from SAP XI going to Trading Partner via SOAP adapter.
    The specific error is:
    Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: invalid content type for SOAP: TEXT/HTML.
    I've already searched on what is causing the issue and it seems majority of the information is that, the error might be due to incorrect/wrong URL that was set in the configurations in the SAP XI communication channel.
    Can you confirm this one?
    DO you have any thoughts on this error?
    Please help.
    Thank you very much!
    Fred

    Hi Freddiesan,
    First of all, test your URL acessing it from SAP PI server's local browser to check firewall and router settings.
    If it works, check these blogs:
    Regards,
    Rogério
    Edited by: Rogério Tambellini on Jul 3, 2009 12:52 PM

  • Getting error"invalid content type for SOAP: TEXT/PLAIN; HTTP 503 Not Ready

    Hi,
    I am getting the below error in Comminication channel
    'Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/PLAIN; HTTP 503 Not Ready: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 503 Not Ready
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 503 Not Ready

    Hello,
    Have you checked if you are passing the correct content type by validating the generated SOAP request against the format the receiver is expecting? You can try using an HTTP diagnostic tool to analyze the HTTP header e.g fiddler.
    Hope this helps,
    Mark

  • File Error: Wrong File Type for Project File

    Just had our 2nd LaCie 2tb hard drive crash. Just completed a project and was about ready to compress it when the drive wouldnt boot up anymore. I tried every program under the sun before eventually sending it off for data recovery.
    $1700 dollars later I have all my files, except one little change.
    My FCP project files are not recognizable by FCP anymore. In the get info box it says they are "Kind: Final Cut Pro Document" The preview picture is a gradient box with exec in the green text in the upper left corner. I tried adding the .fcp extension, but it still wouldn't open it. I keep getting the "File Error: Wrong File Type" when I try opening it with FCP.
    Anything I can do to fix this?
    Thanks

    You might give the following a try...
    1. open the .fcp file with TextEdit
    2. save the file again
    3. open with fcp
    Frank

  • Return type for a PL?SQL function

    Hi,
    I am trying to register a PL/SQL function with discoverer which returns more than one numerical values. What return type should i use for this function....cant see an array or something like it from the Diccover end, when I try to register it.
    Please help.
    -S

    S.
    If you create a function, then you can pass in parameters but only return one value for the function.
    That return datatype cannot be an array, but just one value (ie: varchar, number, etc.).
    Russ

  • SOAP adapter Using XI 3.0 error: invalid content type for SOAP: TEXT/HTML

    Hi All,
      I have the scenario to send a message to proxy via SOAP adapter . My PI server is 7.3 and my BI application server also 7.3. I have created service interface in the ESR and created the ABAP proxy in the Application server. Im using the receiver SOAP adapter with message protocol as XI 3.0. Am running this scenario in the central adapter engine. (That is i didnt create integrated configuration). I am facing the issue in the receiver SOAP channel as 'invalid content type for SOAP: TEXT/HTML: 401 Unauthorized'. But i can able to login into the URL which is given in the channel using the username and password used in the channel.
    Can you please let me know if any addtional settings need to be done in PI side.
    Regards,
    Ramalakshmi.G

    Hi,
      Thanks for your reply. I have done my scenario with the integration configuration. Still i am facing the same issue " SOAP: TEXT/HTML; HTTP 401 Unauthorized". I have given the correct URL, username and password. Is this enough to connect to the receiver integration server from AE. Any settings need to be do in the receiver ABAP system and PI system. If so please share the corressponding note for the same.  What should be the role is assigned to the userid given in the channel.
    I have used sproxy to create the proxy in the receiver ABAP system. In PI i am using the SOAP adapter with XI 3.0 ,message protocol to call to this proxy. I have not done any settings in any of the servers. Do i need to do any settings.
    Regards,
    Ramalakshmi.G

  • Best way to handle Interface Return Type for Web Service Method

    Hi All,
    i have the followinig situation. I would like to create a method as a web service:
    Customer getCustomer(someType){....}
    ie: getCustomer method, with a parameter that indicates some backend data source. The method returns a Customer object. However, depending on the datasource this method uses (which is dependent on the type passed in, ie FooDB, BarDB etc) then i return either a:
    FooCustomer extends AbstractCustomer implements Customer
    BarCustomer extends AbstractCustomer implements Customer
    Now this fails because JAXB cant handle interfaces because when sending XML over the wire it needs a concrete representation (as far as i understand).
    So how should i deal with this?
    Do I need to create a differnet method for each datasource (foo DB, bar DB), ie:
    FooCustomer getFooCustomer()
    BarCustomer getBarCustomer()
    or do i continue calling getCustomer but somehow indicate in the WSDL that I have an AbstractCustomer object and some other bits from FooCusotmer or BarCustomer or ....
    kinda stumpeed here? I wouldve thought itd be handy to be able to do this (ie: call one getCustomer() method and get back Customer objects representing nay type of customer ... in some way...but cant see how to achieve this.
    Any pointers would be greatly appreciated
    cheers
    Marty

    Try to explore abstract schema type.

Maybe you are looking for

  • How to Open a Navigation Link in a new Window?

    Hi guys,    I am trying to add a link to one of my team site. And i have activated the SharePoint server publishing infrastructure service. In the navigation link i am sure the clicked the check box open in new window. But i not getting the new windo

  • Can't update my macbook! HELP please!!

    I have installed the 10.5.2 version and I've been trying to update my mac with the combo update but when it starts installing an error window appears. It says I don't have the access privileges but I'm the administrator and the only account so I shou

  • How to refresh the content of an external file

    Hi guys. I need to use an external file, no matter the extension(txt .xls .xml .mdb .csv) in the oracle BI rpd. I Use this file like a center table in my star schema and this file need to refresh frequently. How i can see, dynamically, the changes in

  • Connecting EP 7.0 to Solman

    Hi All, We are in process of connecting our systems to Solman we have connected the   Web as Abap systems thru RFC but when we try to connect the EP which is Web as Java i am not able to find the way to connect the system. Is there any way to connect

  • Removable Disk For Zen V P

    I just bought a Zen V Plus & have tried to set it to GB for the removable disk. It went to 75% complete & just stayed there, I left it for about an hour & when I checked on it again, it still only said 75% complete. How long should the process take?