Cannot understand small method

I have being looking at this method and while I undertand what the overall job of the method is I cannot understand what some of the lines do.
Here it is:
private static void helloifyClassName(JavaClass java_class )
        class_name = java_class.getClassName() + "_hello";          //Adds _hello to the class name
        int index = java_class.getClassNameIndex();
        index = ((ConstantClass)cp.getConstant(index)).getNameIndex();
        cp.setConstant(index, new ConstantUtf8(class_name.replace('.', '/')));
    }I have not been able to find a description of getClassNameIndex() in documentation, what is a class name index?
He then changes the value of index on the next line so is there any point in having the getClassNameIndex() line?

I have not been able to find a description of
getClassNameIndex() in documentation, what is a class
name index?You'll need to check with the author of the JavaClass class, or consult the documentation.
He then changes the value of index on the next line
so is there any point in having the
getClassNameIndex() line?Perhaps he's saving up that valuable variable allocation space... :o)

Similar Messages

  • Cannot change payment method on subscription and C...

    I am posting the transcript for the 45 minute chat I just suffered through. I simply needed to change my credit card as the old card had been replaced due to a security breach. Others on forums have complained about this issue but this is a stellar example of Skype's poor business and customer service practices. You are now chatting with 'Laarni M'. Laarni M: Hello! Welcome to Skype Live Support! My name is Laarni. Laarni M: If incase we got disconnected, simply click on the Chat Support Link and you will be reconnected to us in no time. Laarni M: https://support.skype.com/support_selection. Laarni M: With that being said, how may I help you? [Removed for privacy]: I need to update my credit card information because the credit card I have on file is expired. The update payment page does not give me the option to enter a new credit card. I started to delete my old card so I could add a new one, but I got an error message saying I must cancel my subscription before removing my credit card. Laarni M: Oh! [Removed for privacy]: I have a subscription already. [Removed for privacy]: I have had it for years. Laarni M: I am sorry to hear that you are having problems with updating your credit card. Laarni M: I will be glad to help you with this. Laarni M: To start with, can I have your Skype name and your name so that I can address you properly? [Removed for privacy]: I have already entered that information to begin this chat. It is required. Laarni M: I understand. [Removed for privacy]: the Skype name is [Removed for privacy] and my first name is [Removed for privacy] Laarni M: I just need to verify it. Laarni M: Thank you, [Removed for privacy]. Laarni M: Nice to meet you. Laarni M: Let me just pull up your account. Laarni M: Anyway how's your day so far? [Removed for privacy]: OK, I have found it. Apparently I am forced to buy Skype credit in order to change my payment to a new method? This is ridicuous. Laarni M: I am now pulling up your account, [Removed for privacy]. Laarni M: Thank you for waiting. Laarni M: Yes, that is correct. In order to change your payment method you need to either wait for your subscription to expire so you can purchase using the new card or you can buy Skype Credit. [Removed for privacy]: Now that I have bought 10.00 of skype credit and added the new payment information that way, it is appearing in my payment settings and I can delete the old card. But again, this is the only way to add a new payment method, which is very wrong. Laarni M: I am sorry if you feel this way, [Removed for privacy]. [Removed for privacy]: Oh, just lovely. I just tried to delete the old card and I have the same error message that "this card is being used to fund your Unlimited US and Canada 12 months. If you want to delete this card you have to cancel your subscription first." Is this some kind of nasty way of forcing me to lose my unlimited subscription? Laarni M: I see. Laarni M: Because the best way to add a new payment details is for you to let the subscription linked to the credit card expire first. Laarni M: After that, you can reactivate your subscrption using the new credit card. Laarni M: That is the best thing that I can recommend, [Removed for privacy]. [Removed for privacy]: I went into change payment settings and changed the payment method to the new card. The page saved and said it had changed the setting. But then I went back in and it had not. It still defaults to the old card. I still get the "cancel subscription" message when I tried to delete the old card again. Laarni M: Yes, [Removed for privacy]. [Removed for privacy]: I can't let it expire or it won't pay for my subscription in August. Anyway the card will not expire. It was replaced due to a security breach at the issuing bank. Laarni M: Because you really need to let your subscription expire first by cancelling it before you update your card. Laarni M: I see. [Removed for privacy]: Why would I want to do that when I probably won't be able to get the same plan? I have had that unlimited plan for years. [Removed for privacy]: I am certainly not cancelling that plan. Laarni M: I understand, [Removed for privacy]. [Removed for privacy]: This is really insane, you know. One should easily be able to update payment information when a card needs to be changed. [Removed for privacy]: I had this same problem last year, but there was a workaround. If you do not know what the current workaround is then please transfer me to a supervisor who does.l Laarni M: I understand, [Removed for privacy]. [Removed for privacy]: I doubt that you do understand. Since the forums indicate this is an ongoing problem, I am forced to assume this situation is intentional and is a way of forcing people to give up older and less expensive plans, and that you are fully aware of that. Laarni M: I am sorry but as much as I want to help you, we can't do anything but to let the subscription expire first by cancelling it before you update the credit card. [Removed for privacy]: I need to speak to a supervisor, please. Laarni M: I am sorry but as of the moment, my supervisor is engaged to a different activity. [Removed for privacy]: I am sorry but that is not the case. That is just what you have been told to say. I can continue to open new chats and waste representative's time for hours, or you can arrange for me to communicate with a supervisor. Laarni M: I am sorry for the inconvenience caused you. info: Your chat transcript will be sent to [Mod edit: Please do not include personal/private information when making a public post. Thanks!] at the end of your chat. Laarni M: I understand that it is really important for you ad upon further checking, we can try this step that may work for you. Laarni M: Do you have another browser aside from the one that you are using right now? [Removed for privacy]: Yes, I do Laarni M: Great! Laarni M: Internet Explorer would be the best. Laarni M: Can you please open it and go the link that I will provide to you? [Removed for privacy]: It is already open, please send the link Laarni M: Alright. [Removed for privacy]: I still do not have the link. Laarni M: Once you click on the link, and click Skype credit, please do not forget to click the change payment method when you buy Skype credit. [Removed for privacy]: I still do not have the link Laarni M: I am sorry for the delay, I am just having a system error as of the moment. Laarni M: But on your end, you can go to the page where you can buy Skype credit. Laarni M: By the way, there are 2 cards saved on your account. Laarni M: May I know the last 4 digit of the card that you want to use? [Removed for privacy]: 1591. And yes, I already explained to you that I bought Skype credit (which I do not need as I have a subscription!!) just to add the new credit card. Laarni M: I see. Laarni M: I can delete first the old credit card saved on our system. [Removed for privacy]: Please do that, but do NOT delete or cancel my subscription when you do this. Laarni M: Alright, [Removed for privacy]. Laarni M: Thank you for patiently waiting, [Removed for privacy]. [Removed for privacy]: I hope that what you are doing is successful. Laarni M: Please hang on, [Removed for privacy] as we are still doing some workaround for this. Laarni M: We are also getting an error doing this. [Removed for privacy]: That is not confidence-inspiring. Laarni M: I am sorry if you feel this way. [Removed for privacy]: I imagine that anyone would feel that way. Laarni M: Thank you for waiting, [Removed for privacy]. Laarni M: Here's what we can do to help you now, [Removed for privacy]. Laarni M: We really need to cancel your subscription so it will cancel the recurring payment. Laarni M: This does not mean that the subscrition will be cancelled. Laarni M: You can still use your subscription until the end of the billing period. Laarni M: So once we cancel your subscription now, you can try to go to the payment settings and update your credit details. Laarni M: Is everything okay? Haven't heard from you in a while. [Removed for privacy]: I am sure that you realize this is unacceptable. I am very surprised that you would suggest this as a solution. As I stated above, I am well aware that this is a method Skype is using to force people to give up better subscriptions. I will not be forced to accept a suboptimal subscription by this method. I am also aware that a supervisor can correct this problem in the system by hand. Please put me in communication with a supervisor. Also--I have ALREADY updated my credit details as I explained above. You or a supervisor simply need to change the subscription payment method to the new card that is already on file. Laarni M: I understand where you are coming from, [Removed for privacy]. Laarni M: But I am trying to help you with giving the best solution for this. [Removed for privacy]: We are going in circles. I have been on this chat for 45 minutes trying to get a simple payment method change that with any other company, I could do by myself online in two minutes. You are not offering me any kind of solution at all. You are insulting my intelligence by claiming that the payment method cannot be replaced. Laarni M: I am sorry if you feel this way, [Removed for privacy]. [Removed for privacy]: Please stop this. The system is clearly set up to block a payment change. A supervisor can override this and that is what I expect you to arrange. Laarni M: But as of the moment, there is no available supervisor. [Removed for privacy]: Please do not tell me things that are not true. [Removed for privacy]: Please connect me with a supervisor. Laarni M: And If I will transfer you to my supervisor, he will give the same information that I provided to you. Laarni M: This is because it is the only workaround for this, [Removed for privacy]. Laarni M: You do not need to worry, cancelling your subscription is just cancelling the recurring payment or auto renewal. [Removed for privacy]: He may, but if he does, he will also be stating something that is not true. It is always possible for a supervisor or manager to make changes in the system. Laarni M: You can still use your subscription until the end of the billing period. [Removed for privacy]: I'm sorry, but in August when the billing period ends, I will receive notification that my subscription has cancelled due to non-payment and that I must choose a new plan. That is what I do not want. Therefore your solution is unacceptable. I have stated this clearly. Laarni M: I am sorry [Removed for privacy], I really want to help you but this is only the work around or soultion that we can do. [Removed for privacy]: Then apparently after 8 years, I will be searching for new phone service. I am very sorry that this is the case. Laarni M: If the auto renewal will cancel, you can still reactivate your subscrition and that time, the new payment method will be use for that subscription. [Removed for privacy]: Do I have your word that I will be allowed to keep the same plan with no changes to my subscription? Laarni M: Yes, [Removed for privacy]. You can still reactivate the same subscription. Laarni M: You do not need to wory about this. [Removed for privacy]: If that is not the case I will be cancelling. And Skype needs to change its payment method practices. This is very poor customer service. I will be going on every forum I can find and posting a poor review of the service. This is a shame since I have been a loyal Skype customer for more than 8 years. I was a customer when Skype was the only internet phone company in business. info: Your chat transcript will be sent to [Mod edit: Please do not include personal/private information when making a public post. Thanks!] at the end of your chat. Laarni M: I am sorry if you feel this way, [Removed for privacy]. Laarni M: Thnak you for being loyal with Skype.

    Well, it happened again.  This time I'm done with Skype.  A ten-year customer, and they've finally worn me down and worn me out.  Yes, after 30 minutes of constant escalation, requesting a supervisor, and finally threatening to walk, they offered another annual contract at 6 cents more a year.  But at the cost of making me sign up all over again, and after wasting my time both last year and this year.  And I am DONE.  I will use my remaining Skype credit for the few online teaching video conferences I have to do, but no more subscriptions.  Bye, Skype.  I would provide adjectives for how horrible your customer service is, but they would all be profane.
    Transcription of today's chat:
    Close chat
    info: at 18:59:56
    Please wait for an agent to respond. You are currently '1' in the queue.
    info: at 19:01:56
    All agents are currently assisting others. Thank you for your patience. An agent will be with you shortly. You are currently '1' in the queue.
    info: at 19:01:58
    Privacy Statement 
    You are now chatting with 'Gian C'.
    Gian C: at 19:02:11
    Hello! Welcome to Skype Live Support! My name is Gian. If incase we got disconnected, simply click on the Chat Support Link and you will be reconnected to us in no time.https://support.skype.com/support_selection .
    Gian C: at 19:02:11
    With that being said, how may I help you?
    Customer: at 19:02:24
    I chatted with an agent 2 days ago re: failure to apply my credit card to my subscription. He said it was taken care of and my online account should show the subscription renewed in 24 hours. it is still not renewed.
    Gian C: at 19:02:41
    I am sorry to know that
    Gian C: at 19:02:47
    What is your Skype name?
    Customer: at 19:03:49
    customer
    Gian C: at 19:04:04
    Thanks
    Gian C: at 19:04:08
    Let me check the account
    Gian C: at 19:05:50
    Thank you for patiently waiting
    Gian C: at 19:06:07
    Is this for the Unlimited Us and Canada?
    Customer: at 19:06:13
    yes
    Gian C: at 19:07:12
    I see
    Gian C: at 19:07:23
    Can you go to this site right now?
    Customer: at 19:07:30
    i'm there
    Gian C: at 19:07:33
    http://www.skype.com/en/
    Gian C: at 19:07:39
    https://www.skype.com/en/rates/?nu=subs-calling
    Gian C: at 19:07:49
    Look for Unlimites Us and Canada
    Customer: at 19:07:58
    why?
    Gian C: at 19:08:21
    Just want to make sure if repurchasing the subscription would be avaialble
    Customer: at 19:08:36
    I was told last year that it would be available. And two nights ago.
    Gian C: at 19:08:36
    That is the best work around to get the subscription back using the new card details
    Gian C: at 19:08:45
    I understand
    Gian C: at 19:08:53
    Can you please go and check it first
    Customer: at 19:08:59
    No, thank you. Please just apply my card. This is what happened last year.
    Gian C: at 19:09:02
    So I can assure the resolutiong
    Customer: at 19:09:34
    The subscription shows that it expires today. It is on my account. Simply renew it with the card information that is also on my account.
    Gian C: at 19:09:40
    Can you help me on this to solve your issue please?
    Gian C: at 19:09:53
    I understand
    Customer: at 19:10:02
    You have directed me to your sales site to search for the plan I already have all over again. I have no time for this.
    Gian C: at 19:10:06
    However the time you change the card did not worked on the system
    Gian C: at 19:10:15
    That is why the renewal did not push trough
    Customer: at 19:10:41
    It didn't work last year either because the system is a mess. But a rep fixed it last year. If you cannot do this please pass me to a supervisor.
    Gian C: at 19:10:59
    ok.
    Gian C: at 19:11:19
    Before we do that, can you please try to check if the subscription is available first.
    Customer: at 19:11:40
    I do not understand how you expect ME to check if a subscription is available!
    Customer: at 19:12:04
    The subscription is ON MY ACCOUNT AND SAYS IT NEEDS TO BE RENEWED.
    Gian C: at 19:12:09
    Basically it is simple
    Gian C: at 19:12:10
    Go to this website
    Gian C: at 19:12:10
    https://www.skype.com/en/rates/?nu=subs-calling
    Gian C: at 19:12:10
    Click on U.S.
    Customer: at 19:12:16
    Please pass me to a supervisor.
    Gian C: at 19:12:20
    Then check if US and Canada is part of the list
    Gian C: at 19:12:39
    Before I pass you to our supervisor
    Gian C: at 19:12:47
    Let me give you a heads up on your case
    Customer: at 19:12:57
    it is there for $2.99 per month. I have a locked in annual charge for that subscription for $29.99. Not $36.00.
    Gian C: at 19:13:11
    I see
    Gian C: at 19:13:28
    Thanks for the information
    Gian C: at 19:13:38
    When did you change your card detail? For this subscription?
    Customer: at 19:15:08
    Last year. At which time the system refused to remove the earlier invalid card and charge the 2nd (correct) one. This year the system allowed me to remove the old card. The rep 2 days ago told me the card was fine. When I looked at the detail this evening, the expiration date was missing, so I filled it in. The rep said NOTHING about this two days ago. Frankly I think Skype is trying to sabotage my re-order to try to force me off of my annual plan and onto a monthly. I will not do it.
    Gian C: at 19:15:13
    Thanks
    Gian C: at 19:15:48
    Just to make sure we will be solving this issue, can you please provide me your call back number
    Customer: at 19:15:59
    You do not need to call me.
    Gian C: at 19:16:07
    Just incase this chat got disconnected so our supervisor can call you
    Customer: at 19:16:19
    (###) ###-#### (REDACTED FOR PRIVACY)
    Gian C: at 19:16:25
    Let me get you our supervisor as you have requested
    Gian C: at 19:16:29
    Thank you
    Customer: at 19:25:17
    ?hello
    Gian C: at 19:27:42
    I will get back to you once the Supervisor is ready to take this chat. For a moment
    Gian C: at 19:27:50
    Sorry to keep you waiting
    Gian C: at 19:28:08
    Our Supervisor is still engaged with the call
    Gian C: at 19:28:10
    Anyway
    Gian C: at 19:28:20
    Here is what we have found out on the subscription
    Gian C: at 19:28:41
    The renewal has passed already, so we can't renew it manually other than repurchasing the subscription
    Gian C: at 19:28:54
    Checking the price of the subscription
    Customer: at 19:28:59
    It has not passed yet. it expires 5/7. Today is 5/6.
    Gian C: at 19:29:12
    Let me give you a heads up
    Gian C: at 19:29:39
    Auto-renewal only happens once. And that is 3 days before the subscription expire
    Customer: at 19:30:09
    I give up. This is done. No subscription. Of any type. And I have been a Skype customer for over 10 years. Goodbye.
    Gian C: at 19:30:23
    I am sorry if you feel that way
    Gian C: at 19:30:34
    I am explaining to you all the things you need to know
    Gian C: at 19:31:27
    But you refused to listen nor cooperate. As much as I wanted you to get your subscription back. However it is within your call if you want to follow my advised to get this resolved quickly
    Gian C: at 19:31:47
    The new subscription prices is just 30.50USD for 1 year
    Gian C: at 19:32:12
    It is just few cents higer compare to the old price $29.99
    Gian C: at 19:32:37
    I hope that won't be a problem for you to get the 12 months subscription for the Unlimited US and Canada.
    Customer: at 19:32:51
    This is flatly ridiculous. The rep 2 days ago told me this was taken care of. Now you tell me it is not, keep me on chat for 30 minutes, make me look up subscription prices on your OWN website, and then tell me my subscription has expired when it has not. Yet I am the one being called uncooperative.
    Gian C: at 19:33:02
    If the auto renewal failed because of card used
    Customer: at 19:33:05
    That is a problem. I will not resubscribe. I don't care that it is only 6 cents a year more.
    Gian C: at 19:33:21
    Then Repurchasing the same subscription will be best to get it back
    Customer: at 19:33:30
    That is not why. If Skype did not have the information required I should have received an early email. I got SEVEN EMAILS IN ONE DAY INSTEAD.
    Customer: at 19:33:42
    The 7th one said the subscription was cancelled.
    Gian C: at 19:34:05
    That is the notification sent by Skype to tell you that we are still trying to accept the payment
    Customer: at 19:34:30
    It makes no sense to notify a customer every two hours on a SINGLE day, but not before.
    Gian C: at 19:34:33
    6 times the sytem try to renew the subscription
    Customer: at 19:34:43
    Yes. ON the same day. None on any other day.
    Gian C: at 19:35:01
    If only there is no problem with your card then the subscription should renew without a problem
    Customer: at 19:35:10
    You expect people who are at work to sign in from their work PC for personal business and renew within 8 hours. Ridiculous.
    Gian C: at 19:35:08
    Yes correct
    Customer: at 19:35:12
    I am done.
    Gian C: at 19:35:10
    As I said
    Gian C: at 19:35:30
    3 days before the subscription expire is the only day to renew the subscription automatically
    Gian C: at 19:35:32
    That is how the system works
    Customer: at 19:35:34
    As I said, the rep 2 days ago told me the card was fine but would take 24 hours for teh change to apply to the syste.
    Gian C: at 19:35:37
    It is part of the terms of use
    Customer: at 19:35:43
    Read what I said.
    Gian C: at 19:36:01
    Yes I already documented this case and I already escalated those previous representative
    Gian C: at 19:36:08
    For providing you false information
    Customer: at 19:36:12
    The terms of use don't say you bombard people with emails every 2 hours on a single day.
    Customer: at 19:36:44
    And then cut them off at the end of the day. When their subscription has not even expired yet. And then tell them it's their own fault their card didn't work. When they were told it was fine.
    Gian C: at 19:36:50
    The email notification is our way to make sure customer will be notified that they need to renew the subscription to avoid this kind of issue
    Customer: at 19:37:07
    Then why not send it once a day for six days instead?
    Customer: at 19:37:13
    that would make a lot more sense!
    Gian C: at 19:37:38
    Here is the thing Kim the system works that way for 10 years already
    Gian C: at 19:38:12
    And only few customers are having this kind of issue, common issue was cause by problem with the card associated to the subscription.
    Customer: at 19:38:18
    See this? this was last year:
    Customer: at 19:38:20
    http://community.skype.com/t5/Rates-and-subscripti​ons/Cannot-change-payment-method-on-subscription-a​...
    Gian C: at 19:38:26
    Ok
    Customer: at 19:38:45
    You'll get an update on that thread, believe me. Which will make it clear why I'm done with Skype.
    info: at 19:38:52

  • Cannot understand Security element wsu:Timestamp error

    I got the below error while trying to call the GetEvents method. I generated a Web Service proxy in Jdeveloper 11g and I'm using Weblogic 10.X. Below are my code. Do you have any idea?
    IntegrationEventWS integEventService = new IntegrationEventWS_Impl("IntegrationEventWS_saved_wsdl.wsdl");
    InputStream inbound = new Object().getClass().getResourceAsStream("/weblogic/wsee/policy/runtime/Wssp1.2-2007-Https-UsernameToken-Plain.xml");
    Default_Binding_IntegrationEventWS port = integEventService.getDefault(inbound, true, false);
    Stub portStub = (Stub)port;
    ArrayList credentialproviders = new ArrayList();
    CredentialProvider cp = new ClientUNTCredentialProvider(username.getBytes(),password.getBytes());
    credentialproviders.add(cp);
    portStub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST,credentialproviders);
    IntegrationEventWS_GetEvents_Input getEventsInput = new IntegrationEventWS_GetEvents_Input();
    getEventsInput.setEventCount(null);
    getEventsInput.setQueueName("Opportunity");
    IntegrationEventWS_GetEvents_Output getEventsOutput = port.getEvents(getEventsInput);
    Error
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand] FaultString [Cannot understand Security element wsu:Timestamp] FaultActor [null]No Detail; nested exception is:
         weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand] FaultString [Cannot understand Security element wsu:Timestamp] FaultActor [null]No Detail; nested exception is:
         weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
         at oracle.e1.bssv.JC57M007.proxy.Default_Binding_IntegrationEventWS_Stub.getEvents(Default_Binding_IntegrationEventWS_Stub.java:87)
         at oracle.e1.bssv.JC57M007.IBS_CRMODProcessor.manageOpportunity(IBS_CRMODProcessor.java:63)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.e1.bssvfoundation.impl.jdenet.CallSBFHandler.callSBF(Unknown Source)
         at oracle.e1.bssvfoundation.impl.jdenet.CallSBFMsgHandler.process(Unknown Source)
         at oracle.e1.bssvfoundation.impl.jdenet.SBFServerJavaKernel.process(Unknown Source)
         at com.jdedwards.system.net.ProcessKernel.run(Unknown Source)
    Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
         at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:357)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:118)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:103)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:91)
         at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
         at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
         at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
         at oracle.e1.bssv.JC57M007.proxy.Default_Binding_IntegrationEventWS_Stub.getEvents(Default_Binding_IntegrationEventWS_Stub.java:82)
         ... 9 more

    Thank you for the replys. However, when running the command:
    *$ java -classpath /export/home/jtownsen/java/ojdbc14_g.jar Connect*
    I got the following error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: Connect
    In case anyone is interested, I did figure out a solution. First, I set the environment variable like so: (using Korn shell)
    *$ CLASSPATH=/export/home/jtownsen/java/ojdbc14_g.jar:/export/home/jtownsen/java/Connect.class:*
    *$ export CLASSPATH*
    Then I compiled the program with:
    *$ javac Connect.java*
    ...which created the Connect.class file.
    And ran the program with:
    *$ java Connect*
    ...and the program ran with no errors returned.
    Now I can begin on the next step. Thanks again to those who have replied.

  • JAX-WS web service - "Cannot find dispatch method"

    I'm getting the same error response every time I send a request to my JAX-WS web service:
    <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
       <faultcode>ns2:Client</faultcode>
       <faultstring>Cannot find dispatch method for {http://www.w3.org/2003/05/soap-envelope}Envelope</faultstring>
    </ns2:Fault>I've tried using JAX-WS RI 2.1.7 and 2.2 on my Tomcat server, but both return the same error response. It will return the WSDL just fine (when "?wsdl" is appended to the endpoint URL). I used "wsimport" to generate the necessary Java classes from my WSDL--it used JAX-WS RI 2.1.6 (the one included with the JDK I guess) to generate the Java source files.
    Other people online have had similar problems, but never with the SOAP element "{http://www.w3.org/2003/05/soap-envelope}Envelope", always with things specific to their WSDLs like "{}reqParams" or "{http://www.telekom.at/eai/WSToCramerCSIRead}CSIRead". I set a debug breakpoint at the start of my SIB method and it doesn't even get that far.
    Any ideas? Thanks for your help.
    WSDL:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This wsdl file is for an XDS-I.b Imaging Document Source Actor
         It can be used 'as is' to support Imaging Document Source Retrieve Imaging Document Set Transaction
         using Synchronous Web Services. 
         -->
    <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ihe="urn:ihe:iti:xds-b:2007" xmlns:iherad="urn:ihe:rad:xdsi-b:2009" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
      targetNamespace="urn:ihe:rad:xdsi-b:2009" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
      xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" name="ImagingDocumentSource">
      <documentation>IHE XDS-I.b Imaging Document Source</documentation>
      <types>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:ihe:iti:xds-b:2007"
          xmlns:ihe="urn:ihe:iti:xds-b:2007">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/IHE/XDS.b_DocumentRepository.xsd"/>
        </xsd:schema>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:ihe:rad:xdsi-b:2009"
          xmlns:ihe="urn:ihe:iti:xds-b:2007"
          xmlns:iherad="urn:ihe:rad:xdsi-b:2009">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/IHE/XDSI.b_ImagingDocumentSource.xsd"/>
        </xsd:schema>
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
          xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/rs.xsd"/>
        </xsd:schema>
        <!-- While no elements are directly used from these schema in the WSDL,
          they need to be present here in order for
          code generating toolkits to work properly -->
        <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
          xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/lcm.xsd"/>
        </xsd:schema>
       <xsd:schema elementFormDefault="qualified"
          targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
          xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
          <!-- Include the message schema -->
          <xsd:include schemaLocation="../schema/ebRS/rim.xsd"/>
        </xsd:schema>
      </types>
      <message name="RetrieveImagingDocumentSetRequest_Message">
        <documentation>Retrieve Imaging Document Set</documentation>
        <part name="body" element="iherad:RetrieveImagingDocumentSetRequest"/>
      </message>
      <message name="RetrieveDocumentSetResponse_Message">
        <documentation>Retrieve Document Set Response</documentation>
        <part name="body" element="ihe:RetrieveDocumentSetResponse"/>
      </message>
      <portType name="ImagingDocumentSource_PortType">
        <operation name="ImagingDocumentSource_RetrieveImagingDocumentSet">
          <input message="iherad:RetrieveImagingDocumentSetRequest_Message"
            wsaw:Action="urn:ihe:rad:xdsi-b:2009:RetrieveImagingDocumentSet"/>
          <output message="iherad:RetrieveDocumentSetResponse_Message"
            wsaw:Action="urn:ihe:iti:2007:RetrieveDocumentSetResponse"/>
        </operation>
      </portType>
      <binding name="ImagingDocumentSource_Binding" type="iherad:ImagingDocumentSource_PortType">
        <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="ImagingDocumentSource_RetrieveImagingDocumentSet">
          <soap12:operation soapAction="urn:ihe:rad:xdsi-b:2009:RetrieveImagingDocumentSet"/>
          <input>
            <soap12:body use="literal"/>
          </input>
          <output>
            <soap12:body use="literal"/>
          </output>
        </operation>
      </binding>
      <service name="ImagingDocumentSource_Service">
        <port name="ImagingDocumentSource_Port_Soap12" binding="iherad:ImagingDocumentSource_Binding">
          <soap12:address location="http://localhost:8080/webservice-test/ridsService"/>
        </port>
      </service>
    </definitions>
    Request:
    <soap:Envelope
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:urn="urn:ihe:rad:xdsi-b:2009"
    xmlns:urn1="urn:ihe:iti:xds-b:2007"
    xmlns:a="http://www.w3.org/2005/08/addressing">
       <soap:Header>
         <a:Action soap:mustUnderstand="1">urn:ihe:rad:2009:RetrieveImagingDocumentSet</a:Action>
         <a:MessageID>urn:uuid:0fbfdced-6c01-4d09-a110-2201afedaa02</a:MessageID>
         <a:ReplyTo soap:mustUnderstand="1">
              <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
         </a:ReplyTo>
         <a:To>http://localhost:8080/webservice-test/ridsServer</a:To>
       </soap:Header>
       <soap:Body>
          <urn:RetrieveImagingDocumentSetRequest>
             <!--1 or more repetitions:-->
             <urn:StudyRequest studyInstanceUID="test1">
                <!--1 or more repetitions:-->
                <urn:SeriesRequest seriesInstanceUID="test2">
                   <!--1 or more repetitions:-->
                   <urn1:DocumentRequest>
                      <!--Optional:-->
                      <urn1:HomeCommunityId>test3</urn1:HomeCommunityId>
                      <urn1:RepositoryUniqueId>test4</urn1:RepositoryUniqueId>
                      <urn1:DocumentUniqueId>test5</urn1:DocumentUniqueId>
                   </urn1:DocumentRequest>
                </urn:SeriesRequest>
             </urn:StudyRequest>
             <urn:TransferSyntaxUIDList>
                <!--1 or more repetitions:-->
                <urn:TransferSyntaxUID>?</urn:TransferSyntaxUID>
             </urn:TransferSyntaxUIDList>
          </urn:RetrieveImagingDocumentSetRequest>
       </soap:Body>
    </soap:Envelope>
    Response (HTTP 500):
    <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
       <faultcode>ns2:Client</faultcode>
       <faultstring>Cannot find dispatch method for {http://www.w3.org/2003/05/soap-envelope}Envelope</faultstring>
    </ns2:Fault>

    I posted here to benefit anybody who is looking for a solution.
    The solution is to use WebServiceContext to get ServletContext, then use ServletContext to get parameters defined in web.xml.
    @Resource private WebServiceContext m_wsCxt;
    Then in method
    SOAPMessageContext soapCxt = (SOAPMessageContext) m_wsCxt.getMessageContext();
    ServletContext servletCxt = (ServletContext) soapCxt.get(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT);
    }

  • Pi 7.1: Exception when contacting WS - "Cannot find dispatch method"

    Hi All,
    I have been receiving the following error message as shown in ICM log, where the trace level is set to 3, when a request is sent to a Web Server.
    ...<SOAP:Faultmlns:SOAP='htt//schemas.xmlsp.org/soap/envope/'><faultco>SOAP:Client</ultcode><faultring>Cannot find dispatch method for arg0</faultstring/SOAP:Fault>..
    No error message is returned using a soap client (as soapUI), after loading the same wsdl file.
    About the configuration of the SOAP Communication Channel, no conversion parameter have been set and no SOAP Action has been set because the seme exception is also raised by setting "arg0" as SOAP Action.
    The structure of the response message is like this.
    <Field1>
       <arg0>
           <field2>
           <field3>
    Any help will be well appreciated.
    Many thanks in advacne for your kind support.
    Regards,
           Giovanni

    Hi All !!
    This problem has been solved with the last SAP_XI* Patches.
    We install:
    SAP_XIESR  SP06 Patch 11
    SAP_XIAF   SP06 Patch 11
    SAP_XITOOL SP06 Patch 10
    and the problem...... SOLVED !!!
    Regards,
    Juan.

  • Cannot find symbl method update Date(int,java.util.Date)

    I get following error
    cannot find symbl method update Date(int,java.util.Date) on compling class called GuestDataBean at line ( rowSet.updateDate( 4, guest.getDate() ); ).
    GustBean.java. I need help on why I get it.
    // JavaBean to store data for a guest in the guest book.
    package com.deitel.jhtp6.jsp.beans;
    import java.util.*;
    public class GuestBean
       private String firstName;
       private String lastName;
       private String email;
       private Date date;
       private String message;
       //Constructors
       public GuestBean(){
            public GuestBean(String firstname, String lastname, String email,Date date,String message){
                 this.firstName=firstname;
                 this.lastName=lastName;
                 this.email=email;
                 this.date=date;
                 this.message=message;
       // set the guest's first name
       public void setFirstName( String name )
          firstName = name; 
       } // end method setFirstName
       // get the guest's first name
       public String getFirstName()
          return firstName; 
       } // end method getFirstName
       // set the guest's last name
       public void setLastName( String name )
          lastName = name; 
       } // end method setLastName
       // get the guest's last name
       public String getLastName()
          return lastName; 
       } // end method getLastName
       // set the guest's email address
       public void setEmail( String address )
          email = address;
       } // end method setEmail
       // get the guest's email address
       public String getEmail()
          return email; 
       } // end method getEmail
       public void setMessage( String mess)
          message = mess;
       } // end method setEmail
       // get the guest's email address
       public String getMessage()
          return message; 
       } // end method getEmail
       public void setDate( Date dat )
          date = dat;
       } // end method setEmail
       // get the guest's email address
       public Date getDate()
          return date; 
       } // end method getEmail
    } // end class GuestBean
    GuestDataBean.java/**
    * @(#)GuestDataBean.java
    * @author
    * @version 1.00 2008/7/18
    // Class GuestDataBean makes a database connection and supports
    // inserting and retrieving data from the database.
    package com.deitel.jhtp6.jsp.beans;
    import java.sql.SQLException;
    import javax.sql.rowset.CachedRowSet;
    import java.util.ArrayList;
    import com.sun.rowset.CachedRowSetImpl; // CachedRowSet implementation
    import java.sql.*;
    public class GuestDataBean
       private CachedRowSet rowSet;
       // construct TitlesBean object
       public GuestDataBean() throws Exception
          // load the MySQL driver
          Class.forName( "org.gjt.mm.mysql.Driver" );
          // specify properties of CachedRowSet
          rowSet = new CachedRowSetImpl(); 
          rowSet.setUrl( "jdbc:mysql://localhost:3306/virsarmedia" );
          rowSet.setUsername( "root" );
          rowSet.setPassword( "" );
           // obtain list of titles
          rowSet.setCommand(
             "SELECT firstName, lastName, email,date,message FROM guest" );
          rowSet.execute();
       } // end GuestDataBean constructor
       // return an ArrayList of GuestBeans
       public ArrayList< GuestBean > getGuestList() throws SQLException
          ArrayList< GuestBean > guestList = new ArrayList< GuestBean >();
          rowSet.beforeFirst(); // move cursor before the first row
          // get row data
          while ( rowSet.next() )
             GuestBean guest = new GuestBean();
             guest.setFirstName( rowSet.getString( 1 ) );
             guest.setLastName( rowSet.getString( 2 ) );
             guest.setEmail( rowSet.getString( 3 ) );
             guest.setDate( rowSet.getDate( 4 ) );
             guest.setMessage( rowSet.getString( 5 ) );
             guestList.add( guest );
          } // end while
          return guestList;
       } // end method getGuestList
       // insert a guest in guestbook database
       public void addGuest( GuestBean guest ) throws SQLException
          rowSet.moveToInsertRow(); // move cursor to the insert row
          // update the three columns of the insert row
          rowSet.updateString( 1, guest.getFirstName() );
          rowSet.updateString( 2, guest.getLastName() );
          rowSet.updateString( 3, guest.getEmail() );
          rowSet.updateDate( 4, guest.getDate() );
          rowSet.updateString( 5, guest.getMessage() );
          rowSet.insertRow(); // insert row to rowSet
          rowSet.moveToCurrentRow(); // move cursor to the current row
          rowSet.commit(); // propagate changes to database
       } // end method addGuest
    } // end class GuestDataBean

    This isn't a JSP question, it better belongs in the JavaProgramming, or JDBC forums.
    But the problem is because the updateDate method uses a java.sql.Date object and you are giving it a java.util.Date object. You have to convert from java.util.Date to java.sql.Date. See: [the api for java.sql.Date|http://java.sun.com/javase/6/docs/api/java/sql/Date.html] .
    Edited by: stevejluke on Jul 21, 2008 5:43 PM

  • Cannot understand what creative are doi

    Go to station-drivers and there are 2 sets of Audigy drivers that are newer and better than anything on this site.
    This is what I am using ATM and as you can see they are WHQL.
    Digital signer Microsoft Windows Hardware Compatibility Publisher
    Sound Devices------------- Description: SB Audigy 2 ZS Audio [DF00] Default Sound Playback: Yes Default Voice Playback: Yes Hardware ID: PCI\VEN_02&DEV_0004&SUBSYS_200202&REV_04 Manufacturer ID: Product ID: 00 Type: WDM Driver Name: ctaud2k.sys Driver Version: 5.2.000.62 (English) Driver Attributes: Final Retail WHQL Logo'd: Yes Date and Size: 8/29/2005 8:46:4, 438784 bytes Other Files: Driver Provider: Creative HW Accel Level: Full Cap Flags: 0xF5F Min/Max Sample Rate: 4000, 92000Static/Strm HW Mix Bufs: 64, 62 Static/Strm HW 3D Bufs: 64, 62 HW Memory: 0 Voice Management: Yes EAX(tm) 2.0 Listen/Src: Yes, Yes I3DL2(tm) Listen/Src: No, NoSensaura(tm) ZoomFX(tm): No Registry: OK
    Now its clear that the guys from creative programmed these drivers and they did a FANTASTIC JOB!!!!
    What is it going to take to get these drivers released on this site? To be honest I could care less where I get drivers from but for the love of god I dont understand Creatives methods of releaseing drivers.
    They create drivers ( Perfect drivers, i say perfect simply because they are, I have had ZERO issues with them ) but they dont\wont release them.
    If anyone could help me understand the insane way creative do things that would be great.
    PS: to the creative team who made these drivers, simply awesome job.

    Hi xmn
    Creative have officially released those drivers for ALL Audigy based cards
    http://files.europe.creative.com/man..._2_08_0002.exe
    You can find these in your download area, note that these are described as BETA and unsupported drivers.

  • Abstract classes and constructors - cannot call abs. methods in CONSTRUCTOR

    Let me explain the scenario:
    I'm building a program in which I need to read a file (among other things) and I intend to use object orientation to it's fullest in doing so. I thought of creating an abstract FILE class which has the commonalities, and two subclasses SERVER_FILE and PC_FILE, which implement the abstract method GET_CONTENTS in different ways (OPEN DATASET / GUI_UPLOAD), same for the CHOOSE method which allows to select the file from it's corresponding source.
    Initially I've used an interface but since another tasks like setting the file path are common for both, switched to an ABSTRACT class.
    Now, the problem is, from the main code I intend to use a FILE reference to handle either type of file. At the instantiation moment I'd like the path attribute to be set; if it was not set by parameter, i'd like to call the CHOOSE method which is abstract for the superclass. Since this is common for either subclass, I need a way to code it once in the superclass. But I get an error because the CHOOSE method is abstract.
    This is the problem code (extracts):
    *       CLASS lcl_file DEFINITION
    CLASS lcl_file DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS:
          constructor
            IMPORTING
              i_path  TYPE string OPTIONAL
            EXCEPTIONS
              no_path_chosen,
          get_contents ABSTRACT
            RETURNING
              value(rt_contents) TYPE string_table
            EXCEPTIONS
              read_error.
      PROTECTED SECTION.
        DATA:
          _v_path        TYPE string.
        METHODS:
          choose ABSTRACT
            EXCEPTIONS
              no_path_chosen,
          set_path
            IMPORTING
              i_path  TYPE string.
    ENDCLASS.                    "lcl_file DEFINITION
    *       CLASS lcl_file IMPLEMENTATION
    CLASS lcl_file IMPLEMENTATION.
      METHOD constructor.
        IF i_path IS SUPPLIED.
          CALL METHOD set_path
            EXPORTING
              i_path = i_path.
        ELSE.
    *---->>>> PROBLEM CALL - CAN'T BE DONE!!
          CALL METHOD choose
            EXCEPTIONS
              no_path_chosen = 1.
          IF sy-subrc = 1.
            RAISE no_path_chosen.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "constructor
      METHOD set_path.
        _v_path = i_path.
      ENDMETHOD.                    "set_path
    ENDCLASS.                    "lcl_file IMPLEMENTATION
    *       CLASS lcl_server_file DEFINITION
    CLASS lcl_server_file DEFINITION
                          INHERITING FROM lcl_file.
      PUBLIC SECTION.
        METHODS:
          get_contents REDEFINITION.
      PROTECTED SECTION.
        METHODS:
          choose       REDEFINITION.
    ENDCLASS.                    "lcl_server_file  DEFINITIO
    *       CLASS lcl_server_file IMPLEMENTATION
    CLASS lcl_server_file IMPLEMENTATION.
      METHOD choose.
        DATA:
          l_i_path     TYPE dxfields-longpath,
          l_o_path     TYPE dxfields-longpath.
        CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
          EXPORTING
            i_location_flag = 'A'  " Application server
            i_path          = l_i_path
            fileoperation   = 'R'  " Lectura
          IMPORTING
            o_path          = l_o_path
          EXCEPTIONS
            rfc_error       = 1
            OTHERS          = 2.
        IF sy-subrc = 0 AND l_o_path <> l_i_path.
          MOVE l_o_path TO _v_path.
        ELSE.
          RAISE no_path_chosen.
        ENDIF.
      ENDMETHOD.                    "choose
      METHOD get_contents.
        DATA: l_line   LIKE LINE OF rt_contents,
              l_osmsg  TYPE string.
        CHECK NOT _v_path IS INITIAL.
        OPEN DATASET _v_path FOR INPUT
                                 IN TEXT MODE
                                 MESSAGE l_osmsg.
        IF sy-subrc <> 0.
          MESSAGE e000(oo) WITH l_osmsg
                           RAISING read_error.
        ELSE.
          DO.
            READ DATASET _v_path INTO l_line.
            IF sy-subrc = 0.
              APPEND l_line TO rt_contents.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
          CLOSE DATASET _v_path.
        ENDIF.
      ENDMETHOD.                    "get_contents
    ENDCLASS.                    "lcl_server_file IMPLEMENTATION
    *       CLASS lcl_pc_file DEFINITION
    CLASS lcl_pc_file  DEFINITION
                       INHERITING FROM lcl_file.
      PUBLIC SECTION.
        METHODS:
          get_contents REDEFINITION.
      PROTECTED SECTION.
        METHODS:
          choose       REDEFINITION.
    ENDCLASS.                    "lcl_pc_file  DEFINITIO
    *       CLASS lcl_pc_file IMPLEMENTATION
    CLASS lcl_pc_file IMPLEMENTATION.
      METHOD choose.
        DATA:
          l_i_path     TYPE dxfields-longpath VALUE 'C:\',
          l_o_path     TYPE dxfields-longpath.
        CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
          EXPORTING
            i_location_flag = 'P'  " PC
            i_path          = l_i_path
            fileoperation   = 'R'  " Lectura
          IMPORTING
            o_path          = l_o_path
          EXCEPTIONS
            rfc_error       = 1
            OTHERS          = 2.
        IF sy-subrc = 0 AND l_o_path <> l_i_path.
          MOVE l_o_path TO _v_path.
        ELSE.
          RAISE no_path_chosen.
        ENDIF.
      ENDMETHOD.                    "choose
      METHOD get_contents.
        CHECK NOT _v_path IS INITIAL.
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename                = _v_path
          CHANGING
            data_tab                = rt_contents
          EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
        IF sy-subrc <> 0.
          RAISE read_error.
        ENDIF.
      ENDMETHOD.                    "get_contents
    ENDCLASS.                    "lcl_pc_file IMPLEMENTATION
    * Data
    DATA: gr_file          TYPE REF TO lcl_file.
    * Main Program
    START-OF-SELECTION.
    *   Get text lines from file
        IF p_srv = abap_true.
          CREATE OBJECT gr_file
            TYPE
              lcl_server_file
            EXCEPTIONS
              no_path_chosen  = 1.
        ELSE.
          CREATE OBJECT gr_file
            TYPE
              lcl_pc_file
            EXCEPTIONS
              no_path_chosen = 1.
        ENDIF.
    On a 4.6c system this code gave me a dump, while on my NW7.0 SP it doesn't even activate with the following error:
    You cannot call abstract methods in the "CONSTRUCTOR" method.
    - Following some suggestions from Java forums i've tried to define the constructor in the base class as PROTECTED or PRIVATE instead, then calling super->constructor from the subclasses, but I get this error in german:
    Sichtbarkeit des Konstruktors darf nicht spezieller als die Sichtbarkeit der Instanzerzeugung (CREATE-Zuzatz) sein.
    which Altavista translates like:
    Visibility of the constructor may not be more special than the
    visibility of the instance production (CREATE Zuzatz).
    - I've also thought of defining the CHOOSE method as a class (not instance) one, then calling it before creating the file object which maybe solves the problem, but I see that approach more "procedural oriented" which i'm trying to avoid.
    - Of course I could define a constructor for each subclass, but both would have exactly the same code.
    I'm really lost on how should I code this. My main focus is on avoiding code dupplication.
    I hope someone with more OO experience can see what I'm trying to do and sheds some light.
    Many thanks for reading all this!

    Dear Alejandro,
        When i saw your code, you are trying to access an astract method CHOOSE(which is actually implemented in sub class) from the constructor of the base class which is not possible.  By this time, we don't know which sub class it is refering to, so it gives an error.   I see two solutions for this..
    1.  To define constructor in sub class and call the choose method from the consturctor of the sub class(which in this case is reputation of the same again for each sub class)
    2.  Remove the calling of choose method from the constructor of the main class and call it separately(after creating the object).   By now we know which sub class we are refering to.   I would have designed the program in the following way.
    *       CLASS lcl_file DEFINITION
    CLASS lcl_file DEFINITION ABSTRACT.
      PUBLIC SECTION.
        METHODS:
          constructor
            IMPORTING
              i_path  TYPE string OPTIONAL
            EXCEPTIONS
              no_path_chosen,
          get_contents ABSTRACT
            RETURNING
              value(rt_contents) TYPE string_table
            EXCEPTIONS
              read_errorm,
          set_path ABSTRACT
            EXCEPTIONS
              no_path_chosen.
      PROTECTED SECTION.
        DATA:
          _v_path        TYPE string.
    *    METHODS:
    *      choose ABSTRACT
    *        EXCEPTIONS
    *          no_path_chosen,
    *      set_path ABSTRACT
    *        IMPORTING
    *          i_path  TYPE string.
    ENDCLASS.                    "lcl_file DEFINITION
    *       CLASS lcl_file IMPLEMENTATION
    CLASS lcl_file IMPLEMENTATION.
      METHOD constructor.
        IF i_path IS SUPPLIED.
          _v_path = i_path.
    *      CALL METHOD set_path
    *        EXPORTING
    *          i_path = i_path.
    *    ELSE.
    **---->>>> PROBLEM CALL - CAN'T BE DONE!!
    *      CALL METHOD choose
    *        EXCEPTIONS
    *          no_path_chosen = 1.
    *      IF sy-subrc = 1.
    *        RAISE no_path_chosen.
    *      ENDIF.
        ENDIF.
      ENDMETHOD.                    "constructor
    * METHOD set_path.
    *    _v_path = i_path.
    * ENDMETHOD.                    "set_path
    ENDCLASS.                    "lcl_file IMPLEMENTATION
    *       CLASS lcl_server_file DEFINITION
    CLASS lcl_server_file DEFINITION
                          INHERITING FROM lcl_file.
      PUBLIC SECTION.
        METHODS:
          get_contents REDEFINITION,
          set_path     REDEFINITION.
    *  PROTECTED SECTION.
    *    METHODS:
    *      choose       REDEFINITION.
    ENDCLASS.                    "lcl_server_file  DEFINITIO
    *       CLASS lcl_server_file IMPLEMENTATION
    CLASS lcl_server_file IMPLEMENTATION.
      METHOD set_path.
        DATA:
          l_i_path     TYPE dxfields-longpath,
          l_o_path     TYPE dxfields-longpath.
        CHECK _v_path IS INITIAL.
        CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
          EXPORTING
            i_location_flag = 'A'  " Application server
            i_path          = l_i_path
            fileoperation   = 'R'  " Lectura
          IMPORTING
            o_path          = l_o_path
          EXCEPTIONS
            rfc_error       = 1
            OTHERS          = 2.
        IF sy-subrc = 0 AND l_o_path  = l_i_path.
          MOVE l_o_path TO _v_path.
        ELSE.
          RAISE no_path_chosen.
        ENDIF.
      ENDMETHOD.                    "set_path
      METHOD get_contents.
        DATA: l_line   LIKE LINE OF rt_contents,
              l_osmsg  TYPE string.
        CHECK NOT _v_path IS INITIAL.
    *    OPEN DATASET _v_path FOR INPUT
    *                             IN TEXT MODE
    *                             MESSAGE l_osmsg.
        IF sy-subrc  = 0.
    *      MESSAGE e000(oo) WITH l_osmsg
    *                       RAISING read_error.
        ELSE.
          DO.
            READ DATASET _v_path INTO l_line.
            IF sy-subrc = 0.
              APPEND l_line TO rt_contents.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
          CLOSE DATASET _v_path.
        ENDIF.
      ENDMETHOD.                    "get_contents
    ENDCLASS.                    "lcl_server_file IMPLEMENTATION
    *       CLASS lcl_pc_file DEFINITION
    CLASS lcl_pc_file  DEFINITION
                       INHERITING FROM lcl_file.
      PUBLIC SECTION.
        METHODS:
          get_contents REDEFINITION,
          set_path     REDEFINITION.
    *  PROTECTED SECTION.
    *    METHODS:
    *      choose       REDEFINITION.
    ENDCLASS.                    "lcl_pc_file  DEFINITIO
    *       CLASS lcl_pc_file IMPLEMENTATION
    CLASS lcl_pc_file IMPLEMENTATION.
      METHOD set_path.
        DATA:
          l_i_path     TYPE dxfields-longpath VALUE 'C:\',
          l_o_path     TYPE dxfields-longpath.
        CHECK _v_path IS INITIAL.
        CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
          EXPORTING
            i_location_flag = 'P'  " PC
            i_path          = l_i_path
            fileoperation   = 'R'  " Lectura
          IMPORTING
            o_path          = l_o_path
          EXCEPTIONS
            rfc_error       = 1
            OTHERS          = 2.
        IF sy-subrc = 0 AND l_o_path  = l_i_path.
          MOVE l_o_path TO _v_path.
        ELSE.
          RAISE no_path_chosen.
        ENDIF.
      ENDMETHOD.                    "set_path
      METHOD get_contents.
        CHECK NOT _v_path IS INITIAL.
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename                = _v_path
          CHANGING
            data_tab                = rt_contents
          EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
        IF sy-subrc  = 0.
    *      RAISE read_error.
        ENDIF.
      ENDMETHOD.                    "get_contents
    ENDCLASS.                    "lcl_pc_file IMPLEMENTATION
    * Data
    DATA: gr_file          TYPE REF TO lcl_file.
    * Main Program
    START-OF-SELECTION.
    *   Get text lines from file
      IF abap_true = abap_true.
        CREATE OBJECT gr_file
          TYPE
            lcl_server_file
          EXCEPTIONS
            no_path_chosen  = 1.
      ELSE.
        CREATE OBJECT gr_file
          TYPE
            lcl_pc_file
          EXCEPTIONS
            no_path_chosen = 1.
      ENDIF.
      gr_file->set_path( ).
    Regards
    Kesava
    Edited by: Kesava Chandra Rao on Mar 19, 2008 11:44 AM

  • I cannot find the method in this interface!

    Is service an interface and query its method in the following scrips? But I cannot find the method query in this interface. What is the function of new?
    Map map = service.query(new FreeMemAgent(), null);
    Thank you
    Edited by: jetq on Jun 7, 2009 9:05 PM

    Hi Frank,
    service is a reference variable and refers to an instance of a class that implements the query() method that returns a reference to an instance of a class that implements the Map interface. If service happens to refer to an instance of a class that implements the InvocationService interface, you can find the Coherence 3.4.2 documentation of the method at InvocationService. The new keyword is a Java operator that creates an object. Continuing with the assumption that service refers to an instance of a class that implements the InvocationService interface, the FreeMemAgent class must implement the Invocable interface. A reference to a "new" FreeMemAgent object is being passed to the query() method.
    Regards,
    Harv

  • Dont understand Synchronized method to complete program

    I'm trying to finish theis program but i don't understand synchronized methods. I checked the java tutorial and i am still confused. Can someone help me approach finishing this program. Here is the spec and the first part of the program i have done.
    ===================================================================================
    When the above is working, create a class called Food. The objective here is to demonstrate the behavior of threads that share data, and use synchronized methods.
    Simulating an animal eating, simply means that the thread will sleep for some length of time.
    There is one instance of the Food class that is shared by both of the animals. Pass it to the constructor of the Animal class.
    There is a method in the Food class called eat(). This method is synchronized, i.e., only one Animal can be eating at a time.
    The rabbit eats the food (the thread will sleep) for a longer time than the turtle, thus giving an advantage to the rabbit.
    But, the turtle must wait until the rabbit is done eating until it can eat, so the advantage is reduced. Print out a message in the eat method when the animal begins to eat, and when it is done eating. Indicate which animal it is that starts to eat.
    Try making the eat method not synchronized, and observe the different behavior if the eat method allows the rabbit to begin eating before the turtle is done eating
       import java.util.Random;
        public class Animal extends Thread implements Runnable{
          private String name;
          private int position;
          private int speed;
          private int restMax;
          public static boolean winner = false;
          Random random = new Random();
           public Animal (String name, int position, int speed,int restMax){
             this.name = name;
             this.position = position;
             this.speed = speed;
             this.restMax = restMax;
           public void run(){
             try{
                while( winner == false){
                   if(position < 100){
                      Thread.sleep(random.nextInt(restMax));
                      position += speed ;
                      System.out.println(name+" is in "+ position+" position ");
                   if (position >= 100){
                      winner = true;
                      System.out.println(name+" is the winner");
                      System.exit(0);
                 catch(InterruptedException e){
           public static void main(String[] args){
             Animal rabbit = new Animal("trix", 0, 5, 150);
             Animal turtle = new Animal("maury",0, 3, 100);
             rabbit.start();
             turtle.start();
       }

    Example:class Donkeyphile implements Runnable {       
        private Donkey donkey;
        private long time;
        Donkeyphile(Donkey donkey, long time) {
            this.donkey = donkey;
            this.time = time;
        public void run() {
            for (int i = 0; i < 10; i++) {
                donkey.love(time);
        public static void main(String[] args) {
            Donkey donkey = new Donkey();
            Donkeyphile jverd = new Donkeyphile(donkey, 500);
            Donkeyphile yawmark = new Donkeyphile(donkey, 100);
            Thread j = new Thread(jverd, "Jverd");
            Thread y = new Thread(yawmark, "Yawmark");
            j.start();
            y.start();
    class Donkey {
        synchronized void love(long time) {
            String name = Thread.currentThread().getName();
            System.out.println(name + " hugs the donkey.");
            try { Thread.sleep(time); } catch (InterruptedException e) { }
            System.out.println(name + " releases the donkey.");
    }

  • Other Party Cannot Understand Me When I Switch too Speaker Mode

    I have an iPhone 4. Prior to the upgrade to 4.2.1, I was able to use the Speaker Mode and the other party could hear/understand me. Now, whenever I try to use Speaker Mode, the other party immediately complains that they cannot understand me. I can hear the other party fine on the speaker. If I switch back to normal mode, everything is OK.
    Obviously, this is not a speaker problem. I assume the mic is the same for both Speaker Mode and normal mode, so I am wondering if something changed in the software.
    Any thoughts or suggestions would be appreciated. I don't have an Apple Store nearby.

    I have this exact same problem on my iPhone 4, but since the very beginning I am using it.
    Which of the microphones is used for speaker mode?
    Is there any way I can know if the mike is damaged?
    Thanks!

  • Cannot access instance method

    I want to get a Vector obj result (inside my JSP page) by accessing an instance method of a class I've put in a package and I keep getting a java.lang.NullPointerException.
    The skeleton of the class in the package is:
    MyClass.java
    package myPackage;
    import java.util.*;
    public class myClass {
    String string_A;
    String string_B;
    public myClass(String s_A, String s_B) {
    string_A = s_A;
    string_B = s_B;
    public Vector getVector() {
    Vector myVector = new Vector();
    myVector.add(string_A);
    myVector.add(string_B);
    return myVector;
    ... and the JSP that goes the wrong way is:
    Page.jsp
    <%@ page contentType="text/html;charset=WINDOWS-1253"%>
    <%-- The following String comes from HTTP POST--%>
    <% String request_A = request.getParameter("foo"); %>
    <% String request_B = request.getParameter("bar"); %>
    <html><body><p>
    <% try {
    myPackage.myClass myClassObj =
    new myPackage.myClass(request_A, request_B);
    try {
    Vector v = myClassObj.getVector();
    } catch (Exception e) {
    out.println("Cannot access Obj Method: " + e); (*)
    } catch (Exception e) {
    out.println("Cannot Initialize Obj: " + e);
    %>
    </p></body></html>
    When I run the above JSP page I get:
    "Cannot access obj method : java.lang.NullPointerException" (*)
    Why can't I access this method?!?

    it doesn't matter whether they are in same package or different packages as long as we can resolve the scope properly . Here I assum e that Prog1.java is top level container which is holding the instacnes of prog2 and prog3 . now some action of prog2 should invoke some method on prog3 . Here prog2 doesn't know the existence of prog3 as two are independent and only thing thats linking both of them is Prog1.So its staright forward that any such communication should happen through Prog1. While instantiating Porg2 set the reference of Prog1 in prog2 . soemthing like Prog2 p2 = new Prog2(); p.setTop(this);
    Ofcourse this involves code change in Porg2 . then from the listenere you can simply call method m3 in prog3 like p2.getTop().p3.m3(); hope this helps..

  • Cannot resolve symbol: method getCodeBase ()

    I`m creating a dice game that makes a sound when player wins or looses. Instaed I`m getting the following error message: Cannot resolve symbol: method getCodeBase (). I think this depends on the fact that I have a separate applet launcher but cannot figure out how to solve this, please help!!
    This is the applet launcher
    import javax.swing.*;
    import java.awt.*;
    // [MC] Public class DiceApplet
    public class DiceApplet extends JApplet
         // [MC] Constructor.
         public DiceApplet()
              // [MC] Sets the contentPane property. This method is called by the constructor.
              this.setContentPane(new DicePanel());
    This is the die class
    import java.awt.*;
    import javax.swing.*;
    // [MC] Public class Die
    public class Die extends JPanel
        // ======================================================================
        // [MC] Instance variable.
        private int myFaceValue;     // [MC] Value that shows on face of die.
        // [MC] End instance variable.
        // ======================================================================
        // [MC] Constructor.
        // [MC] Initialises die to blue background and initial roll.
        public Die()
              // [MC] Sets the background colour of the die to blue.
              setBackground(Color.blue);
              // [MC] Sets the foreground colour of the die to gray.
              setForeground(Color.gray);
              // [MC] Sets the border colour of the die to white.
              setBorder(BorderFactory.createMatteBorder(4, 4, 4, 4, Color.white));
              // [MC] Sets to random initial value.
              roll();
         }     // [MC] End constructor.
        // ======================================================================
        // [MC] Method roll.
        // [MC] Produces random roll in the range of 1 to 6.
        public int roll()
            int val = (int)(6*Math.random() + 1);   // [MC] Range from 1 to 6.
            setValue(val);
            return val;     // [MC] Returns a value from 1 to 6.
        }     // [MC] End method roll.
        // [MC] Method setValue
        // [MC] Sets the value of the die. Causes repaint.
        public void setValue(int dots)
            myFaceValue = dots;
            repaint();    // [MC] Value has changed, must repaint.
        } // [MC] End method setValue.
        // ======================================================================
        // [MC] Method getValue.
        // [MC] Returns result of last roll.
        public int getValue()
            return myFaceValue;
        } // [MC] End method getValue.
        // ======================================================================
        // [MC] Method paintComponent.
        // [MC] Draws dots of die face.
        public void paintComponent(Graphics g)
              // [MC] Call superclass's paint method.
            super.paintComponent(g);
              // [MC] Sets panel width.
            int w = getWidth();
            // [MC] Sets panel height.
            int h = getHeight();
              // [MC] Draws border.
            g.drawRect(0, 0, w-1, h-1);
            // Switch
            switch (myFaceValue)
                case 1: drawDot(g, w/2, h/2);
                        break;
                case 3: drawDot(g, w/2, h/2);
                case 2: drawDot(g, w/4, h/4);
                        drawDot(g, 3*w/4, 3*h/4);
                        break;
                case 5: drawDot(g, w/2, h/2);
                case 4: drawDot(g, w/4, h/4);
                        drawDot(g, 3*w/4, 3*h/4);
                        drawDot(g, 3*w/4, h/4);
                        drawDot(g, w/4, 3*h/4);
                        break;
                case 6: drawDot(g, w/4, h/4);
                        drawDot(g, 3*w/4, 3*h/4);
                        drawDot(g, 3*w/4, h/4);
                        drawDot(g, w/4, 3*h/4);
                        drawDot(g, w/4, h/2);
                        drawDot(g, 3*w/4, h/2);
                        break;
            } // [MC] End switch.
        }     // [MC] End method paintComponent.
        // [MC] Method drawDot.
        /** Utility method used by paintComponent(). */
        private void drawDot(Graphics g, int x, int y)
            // [MC] Gets panel width.
              int w = getWidth();
              // [MC] Gets panel height.
              int h = getHeight();
              // [MC] Local variable.
            int d;
            // [MC] Sets diameter of dot proportional to panel size.
            d = (w + h)/10;
              // [MC] Sets colour for dot to white.
              Color myDotColor = new Color(255, 255, 255);
              g.setColor(myDotColor);
             // [MC] Draws dot.
             g.fillOval(x-d/2, y-d/2, d, d);
        } // [MC] End method drawDot.
    This is the class giving the error message
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.applet.AudioClip;
    import java.applet.Applet;
    import java.net.*;
    // [MC] Public class DicePanel
    public class DicePanel extends JPanel
        // ======================================================================
        // [MC] Instance variables.
        // [MC] Creates new instances of the component for the die.
        private Die myLeftDie;     // [MC] Component for left die.
        private Die myRightDie;     // [MC] Component for right die.
         // [MC] Creates the button (rollButton) to roll the dice.
         private     JButton rollButton = new JButton("Roll Dice");
         // [MC] Creates the text fields. Creates new instance of JTextField.
         // [MC] Creates the text field (rollNumberTextField) to display number of rolls.
         private JTextField rollNumberTextField = new JTextField(20);
         // [MC] Creates the text field (rollResultTextField) to display result of roll.
         private JTextField rollResultTextField = new JTextField(20);
         // [MC] Creates the text field (rollPointsTextField) to display the player`s points.
         private JTextField rollPointsTextField = new JTextField(20);
         // [MC] Creates the text field (gameFinalResultTextField) to display the final game result.
         private JTextField gameFinalResultTextField = new JTextField(20);
        // [MC] Initialises instance variables declared in the inner listeners.
        private int result = 0, resultLeft = 0, resultRight = 0;
         private int rolls = 0;
         private int finalResult = 0;
         private int points = 0;
         private boolean first = true;
         private AudioClip winClip = null;
         private AudioClip looseClip = null;
        // ======================================================================
        // [MC] Constructor. Creates border layout panel.
        DicePanel()
            // [MC] Creates the dice
            myLeftDie  = new Die();
            myRightDie = new Die();
        // ======================================================================
              // [MC] Creates the buttons.
              // [MC] Creates the button (newGameButton) to start new game.
            JButton newGameButton = new JButton("New Game");
              // *[MC] Creates the button (rollButton) to roll the dice.
            // *JButton rollButton = new JButton("Roll Dice");
            // [MC] Sets the font of the buttons.
            // [MC[ Sets the font of the button newGameButton.
            newGameButton.setFont(new Font("Batang", Font.BOLD, 20));
            // [MC[ Sets the font of the button rollButton.
            rollButton.setFont(new Font("Batang", Font.BOLD, 20));
                // [MC] Sets the button border format.
              // [MC] Sets the button with compound borders.
            Border compound;
              // [MC] Border format local variables.
            Border blackline, raisedetched, loweredetched, raisedbevel, loweredbevel, empty;
              // [MC] Initialises border formats.
              //blackline = BorderFactory.createLineBorder(Color.gray);
              raisedetched = BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
              loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
              raisedbevel = BorderFactory.createRaisedBevelBorder();
              //loweredbevel = BorderFactory.createLoweredBevelBorder();
              // [MC] Sets compound border format.
            compound = BorderFactory.createCompoundBorder(raisedetched, raisedbevel);
            // [MC] Sets the button (newGameButton) with compound border format.
            newGameButton.setBorder(compound);
            // [MC] Sets the button (rollButton) with compound border format.
              rollButton.setBorder(compound);
            // [MC] Adds listener.
            // [MC] Adds listener to rollButton.
            rollButton.addActionListener(new RollListener());
            // [MC] Adds listener to newGameButton.
            newGameButton.addActionListener(new NewGameListener());
        // ======================================================================
              // [MC] Creates the labels. Creates new instance of JLabel.
              // [MC] Creates the label (rollNumberLabel) for the number of rolls.
              JLabel rollNumberLabel = new JLabel("Roll Number");
              // [MC] Creates the label (rollResultLabel) for the result of roll.
              JLabel rollResultLabel = new JLabel("Roll Result");
              // [MC] Creates the label (rollPointsLabel) for the player`s points.
              JLabel rollPointsLabel = new JLabel("Player Points");
              // [MC] Creates the label (gameFinalResult) for the final game result.
              JLabel gameFinalResultLabel = new JLabel("Final Result");
              // [MC] Sets the label font.
              rollNumberLabel.setFont(new Font("Sansserif", Font.PLAIN, 10));
              rollResultLabel.setFont(new Font("Sansserif", Font.PLAIN, 10));
              rollPointsLabel.setFont(new Font("Sansserif", Font.PLAIN, 10));
              gameFinalResultLabel.setFont(new Font("Sansserif", Font.PLAIN, 10));
              // [MC] Sets the label title alignment.
              rollNumberLabel.setHorizontalAlignment(JLabel.CENTER);
              rollResultLabel.setHorizontalAlignment(JLabel.CENTER);
              rollPointsLabel.setHorizontalAlignment(JLabel.CENTER);
              gameFinalResultLabel.setHorizontalAlignment(JLabel.CENTER);
              // [MC] Sets the label border format.
              //rollNumberLabel.setBorder(loweredetched);
              //rollResultLabel.setBorder(loweredetched);
              //rollPointsLabel.setBorder(loweredetched);
              //gameFinalResultLabel.setBorder(loweredetched);
        // ======================================================================
              // [MC] Sets the text field font.
              rollNumberTextField.setFont(new Font("Sansserif", Font.PLAIN, 16));
              rollResultTextField.setFont(new Font("Sansserif", Font.PLAIN, 16));
              rollPointsTextField.setFont(new Font("Sansserif", Font.PLAIN, 16));
              gameFinalResultTextField.setFont(new Font("Sansserif", Font.BOLD, 16));
              // [MC] Sets the text field text alignment.
              rollNumberTextField.setHorizontalAlignment(JTextField.CENTER);
              rollResultTextField.setHorizontalAlignment(JTextField.CENTER);
              rollPointsTextField.setHorizontalAlignment(JTextField.CENTER);
              gameFinalResultTextField.setHorizontalAlignment(JTextField.CENTER);
              // [MC] Sets the text field text colour.
              gameFinalResultTextField.setForeground(Color.blue);
              // [MC] Sets the text field to not editable.
              rollNumberTextField.setEditable(false);
              rollResultTextField.setEditable(false);
              rollPointsTextField.setEditable(false);
              gameFinalResultTextField.setEditable(false);
        // ======================================================================
              // [MC] Gets sounds.
              winClip =  getAudioClip(getCodeBase(), "bunny1.au");
              looseClip =  getAudioClip(getCodeBase(), "bunny1.au");
        // ======================================================================
              // [MC] Sets the layout manager (GridBagLayout) for this container.
              this.setLayout(new GridBagLayout());
              // [MC] Creates new instance of GridBagConstraints.
              GridBagConstraints c = new GridBagConstraints();
              // [MC] Makes the component fill its display area entirely.
              c.fill = GridBagConstraints.BOTH;
              // [MC] Layouts components.
              // [MC] Adds the component newGameButton to this container.
              c.gridx = 0;     // [MC] Makes this component the leftmost column (column 1).
              c.gridy = 0;     // [MC] Makes this component the uppermost row (row 1).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 2;     // [MC] Specifies the number of columns the component uses (2 columns).
              this.add(newGameButton, c);     // [MC] Adds the button newGameButton.
              // [MC] Adds the component rollButton to this container.
              c.gridx = 2;     // [MC] Makes this component the third column from left (column 3).
              c.gridy = 0;     // [MC] Make this component the uppermost row (row 1).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 rows).
              c.gridwidth = 2;     // [MC] Specifies the number of columns the component uses (2 columns).
              this.add(rollButton, c);     // [MC] Adds the button rollButton.
              // [MC] Adds the component rollNumberLabel to this container.
              c.gridx = 0;     // [MC] Makes this component the leftmost column (column 1).
              c.gridy = 3;     // [MC] Makes this component the third row from top (row 3).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              c.weightx = 0.1;     // [MC] Requests any extra vertical (column) space.
              this.add(rollNumberLabel, c);     // [MC] Adds the label rollNumberLabel.
              // [MC] Adds the component rollResultLabel to this container.
              c.gridx = 1;     // [MC] Makes this component the second column from left (column 2).
              c.gridy = 3;     // [MC] Makes this component the third row from top (row 3).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(rollResultLabel, c);     // [MC] Adds the label rollResultLabel.
              // [MC] Adds the component rollPointsLabel to this container.
              c.gridx = 2;     // [MC] Makes this component the third column from left (column 3).
              c.gridy = 3;     // [MC] Makes this component the third row from top (row 3).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(rollPointsLabel, c);     // [MC] Adds the label rollPointsLabel.
              // [MC] Adds the component gameFinalResultLabel to this container.
              c.gridx = 3;     // [MC] Makes this component the fourth column from left (column 4).
              c.gridy = 3;     // [MC] Makes this component the third row from top (row 3).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(gameFinalResultLabel, c);     // [MC] Adds the label gameFinalResultLabel.
              // [MC] Adds the component rollNumberTextField to this container.
              c.gridx = 0;     // [MC] Makes this component the leftmost column (column 1).
              c.gridy = 4;     // [MC] Makes this component the fourth row from top (row 4).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              c.weightx = 0.1;     // [MC] Requests any extra vertical (column) space.
              this.add(rollNumberTextField, c);     // [MC] Adds the text field rollNumberTextField.
              // [MC] Adds the component rollResultTextField to this container.
              c.gridx = 1;     // [MC] Makes this component the second column from left (column 2).
              c.gridy = 4;     // [MC] Makes this component the fourth row from top (row 4).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(rollResultTextField, c);     // [MC] Adds the text field rollResultTextField.
              // [MC] Adds the component rollPointsTextField to this container.
              c.gridx = 2;     // [MC] Makes this component the third column from left (column 3).
              c.gridy = 4;     // [MC] Makes this component the fourth row from top (row 4).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(rollPointsTextField, c);     // [MC] Adds the text field rollPointsTextField.
              // [MC] Adds the component gameFinalResultTextField to this container.
              c.gridx = 3;     // [MC] Makes this component the fourth column from left (column 4).
              c.gridy = 4;     // [MC] Makes this component the fourth row from top (row 4).
              c.gridheight = 1;     // [MC] Specifies the number of rows the component uses (1 row).
              c.gridwidth = 1;     // [MC] Specifies the number of columns the component uses (1 column).
              this.add(gameFinalResultTextField, c);     // [MC] Adds the text field gameFinalResultTextField.
              // [MC] Adds the component myLeftDie to this container.
              c.gridx = 0;     // [MC] Makes this component the leftmost column (column 1).
              c.gridy = 1;     // [MC] Makes this component the second row from top (row 2).
              c.gridheight = 2;     // [MC] Specifies the number of rows the component uses (2 rows).
              c.gridwidth = 2;     // [MC] Specifies the number of columns the component uses (2 columns).
              c.weightx = 1.0;     // [MC] Requests any extra vertical (column) space.
              c.weighty = 1.0;     // [MC] Requests any extra horizontal (row) space.
              this.add(myLeftDie, c);     // [MC] Adds the component myLeftDie.
              // [MC] Adds the component myRightDie to this container.
              c.gridx = 2;     // [MC] Makes this component the third column from left (column 3).
              c.gridy = 1;     // [MC] Makes this component the second row from top (row 2).
              c.gridheight = 2;     // [MC] Specifies the number of rows the component uses (2 rows).
              c.gridwidth = 2;     // [MC] Specifies the number of columns the component uses (2 column).
              c.weightx = 1.0;     // [MC] Requests any extra column (vertical) space.
              c.weighty = 1.0;     // [MC] Requests any extra horizontal (row) space.
              this.add(myRightDie, c);     // [MC] Adds the component myRightDie.
        }     // [MC] end constructor
        // ======================================================================
        // [MC] Private class RollListener
        // [MC] Inner listener class for rollButton.
        private class RollListener implements ActionListener
            public void actionPerformed(ActionEvent e)
                // [MC] Rolls the dice.
                myLeftDie.roll();     // [MC] Rolls left die.
                myRightDie.roll();     // [MC] Rolls right die.
                   finalResult = 0; // [MC] If result = 0 then game is not over.
                   rolls++;     // [MC] Increments the number of rolls.
                  // [MC] Displays the roll number.
                    rollNumberTextField.setText(" " + rolls + " ");
                   // [MC] Returns the result (number of dots) of last roll.
                   resultLeft = myLeftDie.getValue();     // [MC] Returns the result of the left die.
                   resultRight = myRightDie.getValue();     // [MC] Returns the result of the right die.
                   result = resultLeft + resultRight;     // [MC] Returns the total result of dice.
                   // [MC] Displays the result of last roll.
                   rollResultTextField.setText(" " + result + " ");
                   // [MC] Sets the rules for the game.
                   // [MC] Sets the rules for the first roll of dice.
                   if (first)
                       // [MC] If the result is 2, 3 or 12 on the first throw, the player loses.
                       if (result == 2 || result == 3 || result == 12)
                             finalResult = 2; // [MC] If result = 2 then the player loses and the game is over.
                             gameFinalResultTextField.setText("LOOSE");
                             Toolkit.getDefaultToolkit().beep();
                           rollButton.setEnabled(false);     // [MC] Disable rollButton.
                             first = true; // [MC] Game over after first roll.
                       // [MC] If the result is 7 or 11 on the first throw, the player wins.
                        else if (result == 7 || result == 11)
                             finalResult = 1; // [MC] If result = 1 then the player wins and the game is over.
                             gameFinalResultTextField.setText("WIN");
                             //Toolkit.getDefaultToolkit().beep();
                           rollButton.setEnabled(false);     // [MC] Disable rollButton.
                             first = true;     // [MC] Game over after first roll.
                        // [MC] If the player didn`t win or lose then the results 4, 5, 6, 8, 9 or 10 become the player`s point.
                        else if (result == 4 || result == 5 || result == 6 || result == 8 || result == 9 || result == 10);
                             // [MC] Returns the player`s points.
                             points = result;     // [MC] Returns the player`s points.
                             // [MC] Displays the player`s points.
                             rollPointsTextField.setText(" " + points + " ");
                             first = false;     // [MC] Game is not over after first roll.
                   // [MC] Sets the rules for the next rolls (from second roll onwards) of the dice.
                   // [MC] If the result is 7, then the player loses.
                   else if (result == 7)
                        finalResult = 2;     // [MC] If result = 2 then the player loses and the game is over.
                        gameFinalResultTextField.setText("LOOSE");
                        Toolkit.getDefaultToolkit().beep();
                      rollButton.setEnabled(false);     // [MC] Disable rollButton.
                   // [MC] If the result is equal to the player`s point, then the player wins.
                   else if (result == points)
                        finalResult = 1;     // [MC] If result = 1 then the player wins and the game is over.
                        gameFinalResultTextField.setText("WIN");
                        winClip.play();
                        //Toolkit.getDefaultToolkit().beep();
                      rollButton.setEnabled(false);     // [MC] Disable rollButton.
              }     // [MC] End public void actionPerformed(ActionEvent e).
         }     // [MC] End private class RollListener.
        // ======================================================================
        // [MC] Private class NewGameListener
        // [MC] Inner listener class for newGameButton.
        private class NewGameListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   // [MC] Initialises instance variables.
                   first = true;     // [MC] Initialise dice roll to first roll.
                   rolls = 0;     // [MC] Initialises number of rolls to 0.
                   // [MC] Initialises text fields.
                   rollResultTextField.setText("");
                   rollNumberTextField.setText("");
                   rollPointsTextField.setText("");
                   gameFinalResultTextField.setText("");
                   rollButton.setEnabled(true);     // [MC] Enable rollButton.
            } // [MC] End public void actionPerformed(ActionEvent e).
         }// [MC] End private class NewGameListener implements ActionListener.
    } // [MC] End public class DicePanel extends JPanel.

    make a backup copy before these changes
    it now compiles, but I haven't run/tested it
    changed constructor to init(), extending Applet, not JApplet
    // [MC] Public class DiceApplet
    public class DiceApplet extends Applet
      // [MC] Constructor.
      public void init()
        // [MC] Sets the contentPane property. This method is called by the constructor.
        add(new DicePanel());
    }then the 'error lines' become
        winClip =  ((Applet)getParent()).getAudioClip(((Applet)getParent()).getCodeBase(), "bunny1.au");
        looseClip =  ((Applet)getParent()).getAudioClip(((Applet)getParent()).getCodeBase(), "bunny1.au");there might be additional problems when you run/test it, but this might get you started

  • Cannot use clone() method of LinkedList...That's strange

    I got a very strange problem. I wrote the following statement:
    Integer[] nums = generateRandomIntegerArray();
    List<Integer> list = new LinkedList<Integer>(Arrays.asList(nums));
    List<Integer> clone = list.clone();
    .....I got an error statement: cannot find symbol-method clone().
    When I use other methods it's fine, but I cannot use clone().
    That's really strange. I've checked many times, clone() method does exist
    in the LinkedList class.

    Your list variaiable is to an object implementing the interface List and clone is not part of the List interface. To get to the clone method you must cast it back to LinkedList, or use a LinkedList reference.

  • Error to invoke service by soap  : Cannot find dispatch method

    i m using jdevelopper 11g and oracle 10g , i write a fonction soap like that:
    -- create or replace function get_naissance(id in varchar2, url in varchar2) return varchar2 as soap_request varchar2(30000);
    declare
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    begin
    soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
    *<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://communes/"> <env:Header/>*
    *<env:Body> <ns1:getNaissanceFindById> <arg0>272001</arg0> </ns1:getNaissanceFindById> </env:Body> </env:Envelope> ';*
    http_req:= utl_http.begin_request ( 'http://localhost:7101/naissances-Naissances-webapp/naissanceWS' , 'POST' , 'HTTP/1.1' );
    utl_http.set_header(http_req, 'Content-Type', 'application/soap+xml');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', '');
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    utl_http.read_text(http_resp, soap_respond);
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond);
    DBMS_OUTPUT.PUT_LINE ('naissance is : '||soap_respond);
    resp:= resp.extract('//ns2:getNaissanceFindByIdResponse/return' , 'xmlns:ns2="http://communes/"' );
    -- dbms_output.put_line('naissance: '||resp.getStringVal());
    -- return resp.getStringVal();
    end;
    there generate an error
    *naissance is : <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"><S:Body><S:Fault xmlns:ns4="http://schemas.xmlsoap.org/soap/envelope/"><S:Code><S:Value>S:Sender</S:Value></S:Code><S:Reason><S:Text xml:lang="fr">Cannot find dispatch method for {http://communes/}getNaissanceFindById</S:Text></S:Reason></S:Fault></S:Body></S:Envelope>*
    the method getNaissanceFindById is correctly implement , the web service run correctly :
    */** <code>select o from Naissance o where o.naissanceid like :id</code> */*
    *@RequestWrapper(className = "jaxws.overloaded.GetNaissanceFindById2")*
    *@ResponseWrapper(className = "jaxws.overloaded.GetNaissanceFindById2_Response")*
    *@WebMethod(operationName = "getNaissanceFindById_2")*
    *public Naissance getNaissanceFindById(String id) {*
    RETURN (Naissance)em.createNamedQuery("Naissance.findById").setParameter("id", id).getSingleResult();
    the result when i put id= 272001 when the service is running :
    *<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://communes/">*
    *<env:Header/>*
    *<env:Body>*
    *<ns1:getNaissanceFindById_2>*
    *<arg0>271002</arg0>*
    *</ns1:getNaissanceFindById_2>*
    *</env:Body>*
    *</env:Envelope>*
    *<?xml version = '1.0' encoding = 'UTF-8'?>*
    *<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">*
    *<S:Body>*
    *<ns2:getNaissanceFindById_2Response xmlns:ns2="http://communes/">*
    *<return>*
    *<addrid>1</addrid>*
    *<communeid>27100</communeid>*
    *<datnais>1962-11-09 00:00:00.0</datnais>*
    *<gender>f</gender>*
    *<idMere>270000</idMere>*
    *<idPere>270000</idPere>*
    *<naissanceid>271002</naissanceid>*
    *<nom>amamra</nom>*
    *<objectVersionId>0</objectVersionId>*
    *<prenom>zahia</prenom>*
    *</return>*
    *</ns2:getNaissanceFindById_2Response>*
    *</S:Body>*
    *</S:Envelope>*
    so i need your help to resolve this error it's amazing , if you want athers details i 'll give u
    thank you

    Please note you're on the SQL Developer forum, so I doubt you'll get answers here...
    Have fun,
    K.

Maybe you are looking for

  • Call Transaction In ABAP WDP

    Hi,             I Created a Transactional Iview for TC:PA20 in the Portal Content , In portal as well i was able to look into the preview of the transaction code PA20. I used the follwing code to navigate this Transactional IView in the ABAP WEBDYNP

  • Macbook Pro 17 - Version differences

    I am looking at purchasing a MBP 17. I'm looking at a 2.4Ghz high res MBP 17 from either MacMall or as a refurb from Apple. Being new to the Mac world, I am trying to understand the differences between the 2.4Ghz MBP 17 and the new 2.5/2.6Ghz MBP 17.

  • Java.lang.ExceptionInInitializer error using db2 ud

    package LoadDriver; import java.sql.*; public class LoadDriver      public Statement driver() throws Exception           String dbUrl = "jdbc:db2:deal://extreme:50000";           String user ="";           String password ="";           Statement s;

  • Maybe bug : ListCollectionView.addAll with a filter function

    Hi, I think I found a bug in the flex SDK. I've checked in JIRA and it seems that it is not yet reported. This simple code raise a "out of bouds exception" (flex SDK 4.1) : var list:ArrayCollection = new ArrayCollection(); list.filterFunction = filte

  • Role upload into BI portal pointing to 3.x version

    Hi, sap BI Bakend menu roles uploaded into BI Portal, But When I check iview property BWVersion its pointing to 2.x/3.x instead of Netweaver BI 7.0 And I assumed queries developed in 3.x pointing to 2.x/3.x. to avoid that I opened query in 7.x tool a