BUG? @Transactional doesn't work on inherited methods

Hi all,
I have to state an odd behaviour:
I have a DAO interface :
public interface UserDAO
..public User save(User user);
In my application I have to use this UserDAO interface to rebuild the DAO layer with a Toplink database access. The new UserDAO implementation is injected into the original ServiceLayer. The according UserService looks like :
public interface UserService
..public User save(User user);
And the implementation :
public class UserServiceImpl
..protected UserDAO userDAO;
..public User save(User user)
....userDAO.save(user);
..public setUserDAO(UserDAO userDAO)
....this.userDAO = userDAO;
However, until I can save my user objects with Toplink I have to annotade the UserService as transactional. Therefore I would write a new UserService class, exending from the original one, like this :
import org.springframework.transaction.annotation.Transactional;
@Transactional
public class TransactionalUserService extends UserServiceImpl
And thats all, since I can inject my JPA UserDAO into this TransactionalUserService and everything will work right.
--> BUT NO ! In this case nothing happens transactional. It only works, when I rewrite the UserService. Then I have :
@Transactional
public class TransactionalUserService implements UserService
..private UserDAO userDAO;
..public User save(User user)
....userDAO.save(user);
..public setUserDAO(UserDAO userDAO)
....this.userDAO = userDAO;
Now my user objects are stored into the database. But why only in this case and not with inherited methods ?

Spring is the one managing your transactions and @Transactional is a Spring annotation so you might get a quick answer to your question on the Spring Data Access Forum.
That being said, instead of subclassing UserServiceImpl just to add @Transactional you could instead use <tx:advice> in your Spring XML configuration to make UserServiceImpl transactional.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • PPCI transaction doesn't work perfectly....WHY??

    Hi experts!!!
    I'm following the steps of OMINFOTYPES docuemntation that I've found in this forum, but transaction PPCI doesn't work, I've created the structure of my new infotype and the table associated to this HRI, after I execute PPCI transaction, and I only received a message, that say... "Infotype 9010 cannot be created. Please look at the following log" and then it shows me the log and I don't have created PT9010 structure, either table HRPT9010, HRP9010 created in the database, Modulpoool....etc,.
    Can anybody explain me why I need to use PPCI transaction? Is this working properly?
    thanlks a lot,
    Regards
    rebeca

    Hello Rebeca.
    I'm getting exactly the same message in PPCI (ECC 6.0)
    Were you able to solve PPCI problem?
    Thank you,
    Irina

  • [BUG]: MakeWritable doesn't work for mac

    I'm trying to use oracle.jdeveloper.refactoring.util.MakeWritableHelper in my plugin, and I found it doesn't work for MAC. The byte code shows it only check the osname for "Windows" and "Linux".
    and some Jdeveloper refactoring feature failed due to can't make file writable, they may also related to this class.

    My MAC version is OSX 10.5.4.
    I don't have a stacktrace. It just fails silently.
    You can easily reproduce this bug by reformat a readonly file.
    Here is the code I reverse engineered from oracle.jdeveloper.refactoring.util.Util.java:
    public static boolean setReadOnly(java.net.URL url, boolean readOnly)
    boolean ret = false;
    java.lang.String cmdarray[] = null;
    java.lang.String platformPathName = oracle.ide.net.URLFileSystem.getPlatformPathName(url);
    java.lang.String osName = java.lang.System.getProperty("os.name", "");
    if(osName.startsWith("Windows"))
    cmdarray = (new java.lang.String[] {
    "ATTRIB", readOnly ? "+R" : "-R", (new StringBuilder()).append('"').append(platformPathName).append('"').toString()
    else
    if(platformPathName.equalsIgnoreCase("Linux"))
    cmdarray = (new java.lang.String[] {
    "chmod", readOnly ? "u-w" : "u+w", (new StringBuilder()).append('"').append(platformPathName).append('"').toString()
    if(cmdarray != null)
    java.lang.Runtime runtime = java.lang.Runtime.getRuntime();
    try
    java.lang.Process process = runtime.exec(cmdarray);
    if(process.waitFor() == 0)
    ret = (new File(platformPathName)).canWrite();
    if(ret)
    oracle.ide.model.Node node = oracle.ide.model.NodeFactory.find(url);
    if(node instanceof oracle.ide.model.TextNode)
    oracle.ide.model.TextNode textNode = (oracle.ide.model.TextNode)node;
    textNode.isReadOnly();
    catch(java.io.IOException e)
    e.printStackTrace();
    catch(java.lang.InterruptedException e)
    e.printStackTrace();
    return ret;
    }

  • On OnPremise, Sending email to multiple recipients doesn't work with SendEmail method

    Hi,
    We are creating a site collection on OnPremise from App by using Sharepoint Client API's (16 version).
    After creation of site collection, we are sending an email to all site collection administrators. But we found that email is being sent to the only first person mentioned in the "To" list. For sending email we are using following method "Microsoft.SharePoint.Client.Utilities.Utility.SendEmail()".
    We tried different scenarios by passing alternately domain username and email address.
    Here are the findings for the different scenarios for the "To" field:
    1) "domain\user1; domain\user1" => sends email to first user
    2) "[email protected]; [email protected]" => sends email to both emails (at least shows in inbox To field, two occurances of email)
    3) "domain\user1; domain\user2" => sends email to first user
    4) "[email protected]; [email protected]" => sends email to first user
    Here is the code we are using:
                    EmailProperties properties = new EmailProperties();
                    properties.To = to.ToList();
                    if (cc != null)
                        properties.CC = cc;
                    properties.Subject = subject;
                    properties.Body = body;
                    Utility.SendEmail(context, properties);
                    context.ExecuteQuery();
    Please let us know what is going wrong here.
    Thanks in advance for your valuable inputs.
    Br,
    Shriram
    Shri07

    According to the R16 Admin preview guide;-
    "Send Email to Multiple Recipients
    Expression Builder is now linked to the email address text field that is presented when the Specific Email Address
    option is selected. Workflow administrators can enter multiple email addresses directly, or click the "fx" icon
    beside the field, and use Expression Builder to define expressions that evaluate to one or more email addresses.
    The benefit of this feature is that emails can be stored on any text field in the base record and multiple emails can
    be sent using one workflow action. "
    But how that works exactly is not clear, I have tried commas, semi-colons, spaces, apostrophes, doublequotes, to separate and try to establish the correct syntax without luck.
    Bob - Perhaps you can do some digging and find out the correct syntax for multiple addresses?

  • BUG: ICE doesn't work with includes

    If you're building a site using includes, you'll find they won't render in ICE.  See screenshot here: 2015-05-03_12-04-56.png - DevTrainer's library
    Would love to keep building in a modern, forward facing way, but the editing experience in BC for our clients is shaky enough as is.  This basically forces us to make the following choices:
    1) Stop using includes in our builds
    2) Stop using ICE, and just point our clients towards the admin page editor (terrifying)
    3) Anyone have a third?
    Is the product team aware of this bug?

    1. Not what I meant no, ICE will always have limits and considering what liquid and the includes and the possibility of how that renders, while BC is working on a newer version of the editor - You need to expect limitations, I am not sure that they will address this and the other issues it has working with liquid in this version - BC may say it never will. I do not know, but it is important to keep this in mind. ICE for me has failed on sites I have tried it way back 3/4 years ago... I have never found it effective on the sites I have to build.
    2. Sqaurespace - Especially the new one - Depends on the person, a lot of people hate the new interface. Wordpress - this is ALL down to who sets it up, I have people hate it, get a new site and love it - Because it was built well, and they were shown how to use it properly. BC is in that exact same boat. People have called, Hated their CMS - had a look and it is BC. Got a new site - Love BC.
    People really need to move on from blaming the tools, all have their faults and positive aspects, BC is far from perfect but so to for the others for different reasons. It is as good as the builder, same with anything else.
    3. The editor is buggy, it is annoying that this is the case at the moment and its not really being addressed. I honestly can not answer why, considering similar issues I have addressed using it for my projects with no real effort and other issues I have not even encountered.
    In terms of your latter point, concrete examples etc... We have, I have been to Adobe Max to talk about things, Pretty does Brass Tacks, I have written heaps of docs on the forums, I help with the BC documentation, I have said a number of times on these forums to people and linked in about training, class dropdown, teaching clients the basics of semantic content.. Our digital marketers help our clients and teach them on that side... So I do and Pretty do and always have helped others even before I came on board
    I am not saying do not use it, the simple point is - Especially with liquid and complex sites, do not be surprised if 1. It breaks , 2. BC do not address it/all of it because maybe they could but its mashing two different ends of the stick together.
    It is like some people expecting Muse to do all this amazing coding at clicks of a button.

  • Adding insult to injury.  Adobe's Wishlist / Bug reporting doesn't work.

    I sure hope Adobe is reading these forums, because I haven't been able to submit a single bug / feature request through the proper channel, and I've given up trying.  It's one thing to make is all BETA testers without warning us.  It's just fanning the flames of fury when Adobe Staff tell us to submit a bug.  It's at least implied that Adobe will not be reading / hearing the messages on this forum.  And I can't even submit a bug report because that form is broken! 
    I've spent around 24 hours so far BETA testing their software for them, so I hope they are reading these forums with gratitude for our free services.
    Unfortunately, I must get back to work, now.  No more time for BETA testing today.

    I haven't been able to submit a single bug / feature request through the proper channel,
    Since it is not mentioned in this thread:
    Copy/pasting is often the culprit when bug report/feature requests fail. The was a problem some time back when we were copy/pasting suggested text from a forum post. While it appeared there was a character limit (and there probably is), I suspected that invisible "junk" (html code or Word stuff) was being pasted. I have better luck pasting from a pure text editor. I have best luck typing it, and copying from the bug/feature form to keep a copy.
    Another thread today complained they could not post a link in a bug report. I have had no difficulty posting a link to a forum thread.
    There are of course times where web submissions fail for no good (apparent) reason. I find that very frustrating; don't get me started on Adobe forums and Jive. But as far as I know, the bug/feature system is not part of that.

  • The solution for Bug 4900349 doesn't work properly?

    Hi friends,
    I think that exists an incorrect behavior at invoices form (TSMINWKB) when we try to change of tab: once the PAYMENT_OVERVIEW_BUTTON is disabled when we change of tab page, is not possible to enable it returning to the same tab.
    Have a look at :
    tab_navigation_pkg.invoice_regions
    at
    IF (event = 'WHEN-TAB-PAGE-CHANGED') THEN....
    app_item_property.set_property('CONTROL_INV_PAY.PAYMENT_OVERVIEW_BUTTON',
                        ENABLED,PROPERTY_FALSE);
    SO.. the button is disabled but it isn't enabled again when you execute the when tab pag changed trigger...
    May be an incorrect solution for the bug?
    Any ideas? Do you have the same behavior?
    It's possible to enable the button, going to INV_SUM_FOLDER block and changing to a record with data on payment metod tab page... but.. obviously that's not the appropiate way to enable the button...
    Jose.

    Hi again, sorry , the screen is:
    APXINWKB.fmb
    Jose.

  • Commit Transaction doesn't work despite using stateful services

    Hi,
    I use the following code to call a BAPI that inserts data and to commit, but unfortunately the commit does not work.
    prov.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, serviceUserName);
    prov.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, servicePassword);
    prov.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE); // use Cookies
    // TURN ON SESSION CREATION
    prov.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceUrl + "?session_mode=1");
    Holder<TableOfBapi1303Data> caseprocedureData = new Holder<TableOfBapi1303Data>();
    Holder<String> worstReturnedMsgty = new Holder<String>();
    TableOfBapiret2 ret = binding.caseProcedureGetList("X", null, null, null, null, null, null, null, null, institution, null, null, patCaseId, caseprocedureData, worstReturnedMsgty);
    maybePrintResult(worstReturnedMsgty, ret);
    TableOfBapi1303Cdata data = new TableOfBapi1303Cdata();
    writeData(caseprocedureData.value, data);
    // TURN OFF SESSION CREATION
    prov.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceUrl);
    Holder<TableOfBapi1303Cdata> newCaseprocedureCdata = new Holder<TableOfBapi1303Cdata>();
    Holder<TableOfBapi1303Assdia> caseprocedureAssdia = new Holder<TableOfBapi1303Assdia>();
    Holder<TableOfBapi1303Asssrv> caseprocedureAsssrv = new Holder<TableOfBapi1303Asssrv>();
    Holder<TableOfBapi1303Data> caseprocedureDataNewOut = new Holder<TableOfBapi1303Data>();
    newCaseprocedureCdata.value = new TableOfBapi1303Cdata();
    newCaseprocedureCdata.value.getItem().add(makeTestProc());
    ret = binding.caseProcedureCreateMultiple(new TableOfBapi1303Cassdia(), new TableOfBapi1303Casssrv(), newCaseprocedureCdata, client, institution, patCaseId, "-",
      caseprocedureAssdia, caseprocedureAsssrv, caseprocedureDataNewOut, worstReturnedMsgty);
    maybePrintResult(worstReturnedMsgty, ret);
    // TURN ON SESSION FINISH
    System.out.println("COMMIT");
    prov.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceUrl + "?session_mode=2");
    Bapiret2 ret2 = binding.bapiServiceTransactionCommit("X");
    System.out.println(ObjectUtil.objectToString(ret2));
    I used "tcpdump" to verify a) the URLs are appropriate, b) SAP sends a cookie and c) the Java program adds the cookie to subsequent service calls. I can provide the dump if it helps.
    I used the ABAP debugger to verify that the function calls "arrive", and I used the "Test Sequence" feature inside SAP with the same parameters to verify the BAPIs work as expected.
    What can I do to tackle down the problem?
    Thanks, Matthias

    Hi,
    We have the same problem. I will try to implement SAP Note 1435326, this sounds like a relevant note.
    Maybe you can try the same?
    Good luck!

  • EJB Transaction does not work

    Hi,
    I have a servlet, a session bean, and an entity bean. A servlet doesn't have any transaction attribute, a session bean has Required, and an entity bean has Required. I have the code like the following:
    Servlet:
    EJBDelegate ed = new EJBDelegate();
    TwoPhaseSB sb = ed.getTwoPhaseSB();
    sb.testTransaction();Session Bean:
    public void testTransaction() {
        try{
            TestInfoLocal testInfo;
            TestInfoLocalHome testInfoHome = TestInfoUtil.getLocalHome();
            testInfo = testInfoHome.create("525252", "353535", "transaction test insert", "etc");
            testInfo.setElement_id("111111");
            //There's no item which has its primary key as 7777, so there's exception error occurs   
            testInfo = testInfoHome.findByPrimaryKey(new Integer(7777));
        }catch(Exception e){
             e.printStackTrace();
    }Since the code in testTransaction is supposed to run in the same transaction, if there's exception occurrs, isn't it supposed to rollback? I mean, creation of item and update should be rollback. But, the data is inserted and created although there's exception. Could anyone can give me the idea why transaction doesn't work? FYI, I'm using Weblogic8.1.

    Yes, you're right. I am using CMP. I added the following exceptions to my session bean but still the changes are updated:
         }catch(EJBException e){     
              e.printStackTrace();
         }catch (NamingException e) {
              e.printStackTrace();
         }catch (CreateException e) {
              e.printStackTrace();
         }catch (FinderException e) {
              e.printStackTrace();
         } I tried to insert "TransactionRolledbackException", but it's not thrown in any statement since my beans are managed by container. Could you tell me what exception should I use? Or should I add some exception to my entity bean? Finder methods are throwing FinderException currently.
    Thanks,

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • My Ipad2 won't turn off.  I've tried the reset method,  holding both buttons down for at least 10 seconds, but this doesn't work. I'm on version 5.1.1 and all other functions work except that I cannot get onto the internet via wi-fi either.  Help ??

    My Ipad2 won't turn off.  I have tried the reset method by holding both buttons down for at least 10 seconds, but this doesn't work.  I can't get onto the internet via wi-fi either (don't have a 3G card fitted).  All other functions seem to be working OK including charging. Not had this problem before, but I recently upgraded software to 5.1.1 so is there a bug in there somewhere?

    Look at last link.
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130?tstart=60
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Roll method doesn't work properly

    Hi there,
    I ran into a problem with the roll method of GregorianCalendar class. Suppose the date is April 6, 00:00:00 2002, the following code will go throught the time changes:
    GregorianCalendar cal = new GregorianCalender();
    for (int i = 0; i < 24; i++) {
    cal.roll(Calenader.HOUR_OF_DAY, 1);
    April 6 01:00:00 2002
    April 6 02:00:00 2002
    April 6 22:00:00 2002
    April 6 23:00:00 2002
    April 6 00:00:00 2002
    But if the current date is April 7, 2002 (daylight saving time change will occur at 2:00 am this day), the above code will result:
    April 7 01:00:00 2002
    April 7 02:00:00 2002
    April 7 22:00:00 2002
    April 7 23:00:00 2002
    April 6 23:00:00 2002
    April 6 00:00:00 2002
    Can anyone tell me how to fix this problem or how to avoid this problem.
    Thanks a lot.

    It doesn't work quite that way for me, my first two lines are these:
    April 6 01:00:00 PST 2002
    April 6 03:00:00 PDT 2002
    You'll notice that I printed the time zone out as well. My last three lines are these:
    Sun Apr 07 23:00:00 PDT 2002
    Sat Apr 06 23:00:00 PST 2002
    Sat Apr 06 00:00:00 PST 2002
    and I think there is an argument to be made that these are correct: applying roll() to Sun Apr 07 23:00:00 PDT 2002 should yield Sun Apr 07 00:00:00 PDT 2002; but since daylight saving time was not in effect at that moment, this is equivalent to Sat Apr 06 23:00:00 PST 2002, which is the actual result. On the other hand, here's a quote from the API documentation for Calendar:
    "Roll rule. Larger fields are unchanged after the call."
    which is an argument that they are incorrect: after the call, the hour should change but not the day. So I'd report it as a bug and see what answer you get.
    How to fix the problem? What's the purpose of what you are doing?

  • SetText doesn't work. A bug???

    I've got a JTextArea as a private atribute of my class:
    private JTextArea textArea = new JTextArea();
    And i've got a method that does:
    textArea.setText("blablabla");
    Well, the thing is, when i call that method... is doesn't do anything! I mean, the JTextArea remains with the same content. And the method is really being called (i'm sure 'cause i've done a System.out.print)
    And when i do textArea.append("blablabla") it doesn't work too!
    They only work when i call them from my class' constructor.
    Now, if that is not a bug, what is going on???
    Vic.

    THe problem is most likely that when you call this method, it is accessing a different instance of the object than the one in its constructor.
    Do you use more than one copy of this oject at a time? Consider the following
    private static JTextArea textArea = new JTextArea();and make the method static as well
    Hope this helps
    Guy

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

Maybe you are looking for

  • XML to PLAIN - urgent help needed

    Hello everybody! I have a ftp receiver adapter; in this adapter a xml file should be converted to a plain text file. The structure looks like this: <ns0:MFG_ORDERS xmlns:ns0="urn:test.com:edi:test"> <HEADER>   <So_recordtype>SOHD</So_recordtype>   <S

  • Unable to decrease partition

    In 2012 I used bootcamp to get windows 7 on my macbook pro 8.1, running Lion. I was able to resize the partition at any time, over the last year windows 7 has become less needed and frankly it's a sucky OS anyway even compared to XP so I'm happy to r

  • Can't restore from 7.1.2 to 7.1.1

    I'm having problems with iOS 7.1.2, which I've confirmed by reading other similar reports online.    I'd like to downgrade back to 7.1.1; however, despite the fact that I have the correct file (ipsw), iTunes continues to error telling me it's not com

  • Netbeans 6.7.1 & JavaFX Can't Find java.util.* at Runtime

    h1. Problem Netbeans 6.7.1 & JavaFX Can't Find the JRE classes (i.e. java.util.*) when the project is run (in Netbeans 6.7.1). h1. Reproduce Right Click Project_, then Run Project_ init: deps-jar: C:\MyJavaFXProject\Source\Java\com\acme\Blah.java:4:

  • Moving into a New Build House

    Despite booking the House Move Transfer 9 weeks before moving - yes NINE weeks - it has taken another four weeks for me to get an active line. Excuses from BT Retail, have in the main blame BT Openreach (i.e. no cables installed - yes there are!; not