NontransactionalRead and NontransactionalWrite problem

I have gotten Kodo to work with transactions; however my application does
not need the transactional support and I am trying to turn off the
transactional support to help performance.
In my kodo.properties file I have added:
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.NontransactionalWrite=true
However, this seems to have no effect; when I attempt to perform a
makePersistent() I get the following error:
com.solarmetric.kodo.runtime.UserException: Can only perform operation while
a transaction is active. at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.checkActiveTransaction(P
ersistenceManagerImpl.java:2604) at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.makePersistent(Persisten
ceManagerImpl.java:1379) at
.....rest of the trace
I am using Mysql if that makes a difference.
Is there something else I need to configure to make the nontransactional
stuff work?
As a side note, the performance I am getting is about 50% of the performance
from straight jdbc code (i.e. takes twice as long to do the same thing).
However the jdbc code is not doing the transactional things that Kodo is; so
I am hoping that by turning off the transactional support I will realize
performance that is close enough to straight jdbc.
As another side note, is it possible to convert your newsgroup into a
mailing list? I prefer mailing lists and having to fire up my newsreader to
see if there is anything new on your newsgroup is a less preferred solution
for me.
Thanks,
Steven Balthazor

"Stephen Kim" <[email protected]> wrote in message
news:[email protected]...
My guess is there are some other configuration/usage problems that are
affecting your performance. Can you describe your test case and post your
properties?I have moved all the code into a test case (so that I can isolate it from
any other interactions) and include it in the attached zip file. The
following files are attached:
1. jdo.jdo The jdo metadata
2. kodo.properties The kodo properties I am using
3. Test.java The jdo class for my table
4. KodoTest.java The test cases
5. Results.htm The results that I recorded.
6. test.sql The sql to create the table which I am populating.
Some notes about my setup:
1. I am running this inside a servlet container (Jetty) which configures
the PersistenceManagerFactory and provides a jndi reference point
2. The testing was done using a cactus test suite wrapper which provided a
TestServlet. The results included are not the results from the first run
through; I reran the tests multiple times to allow the JVM to provide any
possible optimizations.
My platform:
Windows XP (current patches)
Java 1.4.1_02
Kodo 2.5.2
The only reason I am benchmarking the two (Jdbc and Kodo) side by side is so
that I can understand if I am doing something stupid on the Kodo side. I am
new to Jdo and I have not found many good references that show the best way
to do things. The queries I have included are fairly simple queries but are
representative of many of the things that my application (Web application)
will need to do, so I need to know how to do them in the best/fastest way
possible. So please feel free to tell me everything I am doing wrong on the
Jdo side of things--I want to learn.
I really want to use Kodo; I have investigated just about every other Tool
out there and the features Kodo provides match my needs perfectly. The
major selling points I see for Kodo:
1. Based on a standard
2. Makes my sql portable -- I have a need to run my application on varying
backend dbs (Mysql, MS-SQL, Oracle) and I don't feel good about doing this
strictly in jdbc. I have been able to run my tests across all three
platforms by changing only the kodo.properties file which is incredibly
fantastic. Also the schematool is a great differentiator; it allows me to
push schema changes out for the different platforms while maintaining one
base schema.
3. Ease of use -- Jdbc requires me to do a great deal more type juggling and
exception handling -- I would prefer not to have to build my own framework
to do these things
Thanks,
Steven Balthazor
begin 666 KodoTest.zip
M4$L#!!0````(`-E&#B^#3/44#P$``*T#```0````2V]D;U1E<W0O:F1O+FID
M;ZV306Z#,!!%UXF4.UC>&S>[+DRSRPG2`[CVE+K8GB@V47K[#H0@1-)"I;("
M^?/^\X#5[A(\.\,I.8PEWQ9/G$$T:%VL2OYZV(MGOGO9K#=K]6F1;AA=ZJA-
MK2M@40<HN<%0)#0.FU10B/>I+FF\3JG/'2#E\>)*P25#;)O)(%H\B6NP1J*P
M&KZ(W;XO#/HF1,[.VC>T'C$"ET1:#3WSI*S?/ R(W+K(D<PR'8^F_M%FA/HK
M]WA'=7;"I$V^._"V'V:"G%T`/IY"%YHOLSKK:=T-=]<IN]+?3 *I_I-%>+3K
M>8/V8V9JY)/0DLD_TAAX4Y<EP"M+>(A5_AB08KM@8TIVO_OME,G^F-&SDNWI
M^P902P,$% ````@`#4<.+]T8Q!TJ`0``O0(``!@```!+;V1O5&5S="]K;V1O
M+G!R;W!E<G1I97.5DL%.`C$0AN^;[#LT\=[%$#V0[$$A)@H8HO@`0W>$8MM9
M.EV$&-_=;C'!Z(KQLI=_OG^^;9MGBJQD,N M!J^5?*&*Y$0K=(QCW)=O'BUM
ML7K/LS5L82?7,9^A9\T!G<(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^&Y.G;XQH\,JA:?W
MW(UM=,:@XA&V?ZS/WC'J\*J^B!,?^A,Y^^3_939+,?^;E7U0/*)8XLA36JUE
M"3&[A7,N\?8MIBV+S%IL\@-8Y-,#4$L#!!0````(`#E*#B\CJA"AE0```,,`
M```1````2V]D;U1E<W0O=&5S="YS<6QMSC$+PC 0!> ]D/_PQ@8<K*LX1,E0
M;&NI<>AD:G-*P%:P5]!_KZFKRW'<^^#=KC;:&EB]S0T<T\@.B12 "][A$FYA
MX&2U5"@/%N4IS]%._#B'H7M23P,O9MM''&6:*GBZMM.=9_V+1V(./3GXEBEN
M?TRL9GI]Z^.<;U6=%;INL#<-D,2'E!0*MJG,IGAG1UVLI9#B`U!+`0(4"Q0`
M```(`-E&#B^#3/44#P$``*T#```0``````````$`( ````````!+;V1O5&5S
M="]J9&\N:F1O4$L!`A0+% ````@`#4<.+]T8Q!TJ`0``O0(``!@`````````
M`0`@````/0$``$MO9&]497-T+VMO9&\N<')O<&5R=&EE<U!+`0(4"Q0````(
M`"A'#B_:;G0YGP8``'(>```6``````````$`( ```)T"``!+;V1O5&5S="]+
M;V1O5&5S="YJ879A4$L!`A0+% ````@`(T@.+WCSA.)(!@``RRX``!0`````
M`````0`@````< D``$MO9&]497-T+W)E<W5L=',N:'1M4$L!`A0+% ````@`
M)$<.+_R6`9C;````*@(``!(``````````0`@````Z@\``$MO9&]497-T+U1E
M<W0N:F%V85!+`0(4"Q0````(`#E*#B\CJA"AE0```,,````1``````````$`
M( ```/40``!+;V1O5&5S="]T97-T+G-Q;%!+!08`````!@`&`(D!``"Y$0``
"````
`
end

Similar Messages

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • BOSD, Battery issues and Heating problem after iOS 8 upgrade

    i have upgraded my iPad mini to iOS 8. Ever since I upgraded to iOS 8 am facing blue screen issues and heating problem as well. This is really frustrating even the patch iOS 8.0.2 dint solve the problem. Are you guys listening our complaints. When will you fixing it.

    The same thing happened to me on my 2012 Subaru Outback.  I'm not sure this will help you since you have a Honda, but I'm posting this just in case.
    I paired the audio on my car with my iPhone 6.  However, when I turned the car off and back on again, the iPhone would not pair automatically.  I had to manually connect the iPhone with the car.  Turns out there are two separate bluetooth pairings on my car: one for phone which allows up to 5 devices and one for audio which allows only one device.  So I did the second bluetooth pairing for the phone (had already done the audio), and that fixed it.  YMMV

  • I am making code to try to make a game and my problem is that my code......

    I am making code to try to make a game and my problem is that my code
    will not let it change the hit everytime so im getting the first guy to hit 1 then next hits 8 and so on and always repeats.
    Another problem is that I would like it to attack with out me telling it how much times to attack. I am using Object oriented programming.
    Here is the code for my objects:
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class rockCrab {
         //Wounding formula
         double sL = 70;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 50;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         rockCrab() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              double done = rint(fH - fA);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("Rockcrab hit" +done);
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class self {
         //Wounding formula
         double sL = 1;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 1;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         self() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("You hit" +done);
    }Here is the main code that writes what the objects do:
    class fight {
         public static void main(String[] args) {
              self instance1 = new self();
              rockCrab instance2 = new rockCrab();
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
    }when the code is run it says something like this:
    you hit 1
    RockCrabs health is 9
    RockCrab hit 7
    your health is 38
    you hit 1
    RockCrabs health is 8
    RockCrab hit 7
    your health is 31
    you hit 1
    RockCrabs health is 7
    RockCrab hit 7
    your health is 24
    you hit 1
    RockCrabs health is 6
    RockCrab hit 7
    your health is 17
    my point is whatever some one hits it always repeats that
    my expected output would have to be something like
    you hit 1
    RockCrabs health is 9
    RockCrab hit 9
    your health is 37
    you hit 3
    RockCrabs health is 6
    RockCrab hit 4
    your health is 33
    you hit 2
    RockCrabs health is 4
    RockCrab hit 7
    your health is 26
    you hit 3
    RockCrabs health is 1
    RockCrab hit 6
    your health is 20
    Edited by: rade134 on Jun 4, 2009 10:58 AM

    [_Crosspost_|http://forums.sun.com/thread.jspa?threadID=5390217] I'm locking.

  • Remote and IR Problem

    A rather odd and annoying problem has recently been occuring on my MBP. A couple days ago my remote (after working without fail for over a year now) suddenly stopped working. Yesterday night and this morning it started working again but after a while it stopped again. I've read dozens of support articles which haven't really helped because there seems to be another problem.
    Most articles have stated that there is an option to disable the IR receiver in the "security" window under system preferences. When the IR and remote are not working this option disappears but when they are working the option is present. I have also tried replacing the battery without any result.
    I am now thinking that it might have something to do with heat buildup because it is mainly occuring after the laptop has been on for about a half hour, so I am going to try to borrow someone's fan.
    If anyone has any suggestions to solve this I would appreciate it if you could help. Thanks!
    MacBook Pro 1.83 GHz   Mac OS X (10.4.9)  

    check out this thread. Seems to be the same problem.
    http://discussions.apple.com/thread.jspa?messageID=4701905&#4701905

  • LG Ally text message and gps problems

    hello. ive been with verizon for about 10 years maybe. ive been overall happy with the service and customer service. but the prices should be alot lower.lol. i started out with the motorolas then switched to the lg phones. only problem with the motorola was the speakers. not loud enough. could never hear the phone ring. the lgs usually suffer from the same problem.
    i had a few phone problems but nothing like this lg ally. im on my second one and about to be my 3rd one in about 3 months. 1st phone i had every problem under the sun. this phone i am suffering from text message problems and gps problems. i suffer from what everyone else has problems with. the messages wont send. they will eventually lock up. it will show the envelope with the red explanation point ( i think thats the graphic). then usually everytime when i sent a text the texts will close. it will send then bounce back and show up as a draft and i have to resend it and wait for it to go thru. finally the last problem with the texts. when i send a text a phone number from my contacts shows up and freezes on the screen. its in white text with a black background. its the same number every time. it stays on the screen until i restart or pull my battery out.
    gps. when i open up google gps that comes with the phone i make sure the gps is on... when the directions are found and the map pops up 9 out of 10 times it just keeps saying searching for gps. the turn by turn never is found. the 1 time it does it takes a good 10 minutes to be found. atleast on my first one ally the gps did work 8 out of 10 times. it just took a good 5-10 minutes for gps to be found and show turn by turn.
    anyone else have these problems? where you able to fix them or did you need to get a new phone? the 2.1 update was supposed to fix problems. i think they just made it worse. the ally is supposed to have 2.2 froyo. where is it. is it ever going to get it. i got this phone because i like the lgs and the keyboard. also the sales representative on the phone was giving the lg ally rave reviews. why couldnt he say dont buy this go with a motorola droid. this phone is the biggest junk ever made

    I do apologize you are having trouble with your device I looked in our information system on the LG Ally in reguards to issues you are having it states if you have the Free Droid Security anti virus protection application down loaded it will cause the phone to lock up or freeze. Check and make sure you do not have the application on your device. Check you GPS settings and make sure correct. Go to Settings; Location & Security; make sure GPS is on wireless network. If this does not fix issue you can try doing a Master Reset on your device. Make sure your contacts are saved in your G-mail account or through Back Up Assistance.
    Master Reset/Soft Reset:
    Factory Reset option 1
    From the main screen, touch menu tab
    Touch Settings
    Touch Privacy
    Touch Factory Data reset
    Touch Reset Phone
    Warning: This will erase all data from your phone, including:
    Your Google account
    System and application data and settings
    Downloaded Applications
    It will not erase: Current System software and bundled applications; SD Card files, such as music or Photos
    Factory Reset option 2  - Warning this will reset device back to original factory settings.
    Turn off the phone
    Press and hold "home" + "end" + "volume up or down" keys together for a few seconds when the device is power off
    Once device displays boot information, release keys.
    Soft Reset
    Press the Power key.
    Touch Power off.
    Touch OK.
    Press the Power key to power on the device.
    or
    Remove battery cover, remove battery and reinstall.Also there is a new update for LG Ally it will be the Froyo 2.2 but there is not release date available at this time it will post on your device when available. Hope this Helps. Leslie

  • I am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!

    i am deleting files through my trash in my macbook pro (2010) and then emptying the trash can, but my hard disk space is not increasing! i recently upgraded to lion and the problem is new, wasn't the same with snow leopard! HELP!!!!!
    When i press command+I (Get Info) i see that there is 140 GB "Available Space" on my hard disk but when i click on my hard disk icon on the desktop, and then press "space" i only see 102 GB free!! What the f*???
    Please HELP!!!!!! Getting second thoughts on Lion!!!!

    Hi b,
    Have you restarted yet?

  • How do I fix my ipod classic that says very low batter after I have charged it and the problem persists?

    I have an Ipod video 30g that says Please wait very low battery. I charged it for about a day and the problem persists. I've tried using some solutions on the internet and none of them worked including: holding the menu and select, holding select and play to put it in disk mode with no avail. Is there anyone who can help me!!!

    Have you read this post written by another forum member?
    The Sad iPod icon.
    However, as your iPod was purchased on Boxing Day, why not get it serviced under the warranty?
    You can arrange online service here.
    Service request.
    Or if an Apple store is near you, take it there and have them check your iPod.
    You can make an appointment by using this link.
    Genius Bar Appointments.

  • It's so annoying!! I have created a new Apple ID but after I click verify it just goes back to the previous page!!! It''s really frustrating I have tried for more than 4H, and the problem is not about the apple ID. I can download apps with the apple ID, w

    It's so annoying!! I have created a new Apple ID but after I click verify it just goes back to the previous page!!! It''s really frustrating I have tried for more than 4H, and the problem is not about the apple ID. I can download apps with the apple ID, which means IMessage is the problem! I restarted my iPad, I logged in and out of the apple ID in the store, AND YET IT STILL WON'T WORK, PLEASE HELP!

    Hi Vmanfromusa!
    It sounds like you are having an issue with activating your iMessage app on your iPad. An article outlining some troubleshooting steps for this issue can be found here:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • I bought a song on ITUNES and had problems downloading it. I got in touch with support and and they downloaded the song to my account but now when I try to play it, it tells me my computer isn't authorized to . Reauthorizing computer doesn't work. HELP

    I bought a song in ITUNES and had problem downloading it. I contacted support and they downloaded the song for me. Now when I try to play the song, I get a message saying my computer isn't authorized to play it. I try reauthorizing but that doesn't work, just keep getting the same message. Can anyone help?

    Hello
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    http://support.apple.com/kb/ts1389
    Best of luck,
    Mario

  • Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,change remotes, no change.Help please.

    Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,changed remotes, no change. Latest software update. This is really annoying.  iPhone remote app works just fine.  Any suggestions?

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

  • I mean that i phone take time to open apps ,contact ,etc why? i close all apps and the problem still?

    i mean that i phone take time to open apps ,contact ,etc why? i close all apps and the problem still?

    Try a reset by pressing and holding the home and power buttons for 15-20 seconds until the white Apple logo appears.

  • HT204053 i want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is

    I want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is valid.  I cannnot delete the account because "find my iphone" wants the password linked to this old account.  But when i go into the find my iphone app it is using my corect Apple ID.  How do i fix this?

    If you still have access to your old email address, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email account and verify it.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  You can now go to Settings>iCloud and sign in with your correct iCloud ID and password.
    If you don't have access to your old email address, you will have to contact Apple to have them reset the password so you can disable Find My iPhone and sign into your iCloud account.  You can either go to https://expresslane.apple.com, select "More Products and Services", then "Apple ID", then  on the next page select "Other Apple ID Topics", then "Lost or forgotten Apple ID password" and click "Continue"; or you can contact Apple Support (http://www.apple.com/support/icloud/contact/).

  • Apple TV worked until today. Message says unsupported signal check your output device.  I have checked hdmi cable with another device and it's fine. Put on a different tv and same message.  Went out yesterday and bought a new Apple TV and same problem.

    Apple TV worked until today. Message says unsupported signal check your output device.  I have checked hdmi cable with another device and it's fine. Put on a different tv and same message.  Went out yesterday and bought a new Apple TV and same problem.

    Which TV do you have.
    You may wish to try the following:
    Press and hold the menu and the up button simultaneously on the remote for six seconds, the Apple TV should then begin to cycle through the various resolutions available to it at 20 second intervals.. If you see a picture appear up on your screen, use the remote to scroll down to the OK option and select it.

  • No Battery Charge and Other Problems After OS3 Install - Solution?

    This relates ONLY to iPhone Users using the "PUSH" Function for Email or Other Apps!
    PROBLEM: It seems as though Apple is at least aware of the problem(s), i.e. once Exchange Email or another App using PUSH is configured, there is an OS3 bug that seems to be hardware independent (impacting ALL 1G, 2G and GS iPhones, but not consistently).
    SYMPTOMS: Include some or all of the following . . . rapid discharge (less than two hours from a fully charged phone, failure to charge (by AC adapter or USB to computer), failure to charge completely, perpetual dead battery icon, inability to boot, inability to automatically sleep, quite warm on upper back side, slow email, indication of a full or partially full charge dropping to no charge or dead when removed from charging source.
    CAUSE: OS3 Bug prevents consistent charging, draining the battery even when plugged in to a computer via the USB or into an A/C adapter (although I've been able to intermittently charge on an A/C adapter). In push mode, the Exchange email client on the iPhone continually queries the Exchange Server, cycling the iPhone CPU and continually draining the battery at a high rate (can
    WHAT I'VE BEEN TOLD BY APPLE:
    1) Defective Hardware (though I'm on my third 3G in a week, so I don't think hardware is the problem . . . Apple will consider replacement with a new 3G if my third 3G has the same problem)
    2) Corrupted App in iTunes - so I manually reloaded each app directly over wi-fi, one app at a time, this worked until I configured Exchange Email, at which time symptoms immediately appeared . . . so corrupted app unlikely.
    3) Initial data transfer after email configuration . . . but symptoms continued long after this.
    4) Wi-Fi - but turning wi-fi on or off had little effect, beyond normal.
    5) Restore to New Phone - this works fine UNTIL Exchange Email is configured and activated. Thus, the time consuming practice of reload all apps, photos, music, etc. will be for naught, once exchange email is turned on with "push"
    SOLUTION: Turning off "push" on your exchange email account
    1) Go to Settings - Mail, Contacts, Calendars - Fetch New Data
    2) Set Fetch Setting to 15 minutes to approximate the much more frequent "push" uploads and downloads. NOTE: Turning off \"push\" at this level will NOT turn off push on your exchange email account and the problem will not be resolved
    3) Scroll down and select - Advanced -
    4) Identify and select your Exchange Server account
    5) Select - Fetch -
    6) Leave settings
    Phone should cool down in a few minutes and work normally. The problem can be replicated and resolved repeatedly merely by toggling "push" on and off in your exchange email configuration.
    I was told that this is likely to be the "fix" until a patch is issued. No time frame was given for an actual fix that allows Exchange users to use push technology. Disappointing, since broader use of "push" technology beyond exchange was one of the big benefits of OS 3.0.
    NOTE: THIS PROBLEM DOES NOT OCCUR ON ALL iPHONES WITH OS3 USING THE EXCHANGE CLIENT. I have second 3G phone, identically configured (including push to exchange email) that has no symptoms at all. Go figure.

    Since two days ago, my battery indicator has been indicating 100% until the phone dies, which seems to be one of the symptoms you're describing.
    However, I don't use Push emails; my email client is configured to poll an imap server and has been that way since I got my phone over 6 months ago. To be on the safe side, I turned off Push anyway, but I'm still having the problem. Definitely 3.0 related as I've never had this problem before.
    Perhaps it's linked to an app? Personally I don't have a whole lot of them installed: Aurora Feint, fstream, twitterific, flixster, wikipanion, google earth, urbanspoon, STM Mobile, iDicto, Air Sharing, Facebook and Apple Remote. I've removed a few and will see how it goes.

Maybe you are looking for

  • Isight photobooth and skype

    Hi, ever since I got the new version of skype, photobooth won't recognize the built in isight camera. It simply shows a 'no camera' icon in the middle of the screen (photobooth app). However I have found that whenever I quit skype and then restard ph

  • Skype click to call

    how do i remove the corrupted program from my control panel which displays an error of installation ?

  • How to change icons??

    Ok, I have changed all the icons except the System Preferences one. Is there a way to do it. it will not let me. has somebody changed theirs or can somebody do it and see if can be done. Thanks

  • Arrow keys force "commit" of Transform

    I'm dragging some large images into a FW document and then transforming them (Command-T) to a smaller size. When I get them close to final size I nudge them around to make sure they're really the size I want - but as soon as I tap an arrow key the Tr

  • Varray Using OCI

    Hi, While sending Varray as an input parameter to an Oracle Stored Procedure, the following OCI calls are returning no error. OCITypeByName(), OCIObjectNew(), OCICollAppend(), OCIBindByPos(), OCIBindByObject() But OCIStmtExecute() hangs without givin