Hibernate � saveOrUpdate() error ! I had resolved this problem now!
AbstractADO.java
protected void saveOrUpdate(Object obj) {
try {
startOperation();
session.saveOrUpdate(obj);
// session.flush();
tx.commit();
} catch (HibernateException e) {
handleException(e);
} finally {
HibernateFactory.close(session);
ChinatCityDAO.java
public boolean insert(ChinaCity city){
System.out.println("ID : " city.getCityId() " City : "+city.getCityName());
saveOrUpdate(city);
return true;
++++++++++++++++++++
I want to to finish a insert Action with the ChinatCityDAO.java extends AbstractADO.java
1. the first time I submit a form. the console print out:
ID : null City : shanghai
Hibernate: insert into china_city (CityName, CityId) values (?, ?)
and a record in mysql database:
mysql>select * from china_city;
--------------------------------------------------------------------+
| CityId | CityName |
--------------------------------------------------------------+
| 402881e70f8a5bc9010f8a5bcf720001 | shanghai |
--------------------------------------------------------------------+
successful !!
2 then back to record a new info again, the console print out:
ID : 402881e70f8a5bc9010f8a5bcf720001 City : shanghai2
Hibernate: update china_city set CityName=? where CityId=?
ERROR! why not insert this time?but Update?
what shall i do?
setCityID(null) ; the run successful!
(A n unnative english man)
Message was edited by:
limo
Message was edited by:
limo
?
Similar Messages
-
while updating iphone, itune gave me error of 1015 which tells that my iphone is much better than from which that i am updating. But now my iphone is still in restoring mode how i can resolve this problem.please tell me
I just had the same problem with my iphone, only thing i could do was completely restore factory settings, lost a bunch of pics and contacts in the process... hope you have better luck than me
-
I receive the follwing error message when trying to open my ipod touch/itunes "the itunes libary.itlfile is lockedon a lockdisk or you do not have write permission on this file. How do I resolve this problem?
Repair iTunes Security Permissions
Right-click on your main iTunes folder and click Properties, then go to the Securitytab and click Advanced. Use the Change Permissions... button grant to your account (or the Users group) and SYSTEM full control of this folder, subfolders and files, then tick the option to Replace permissions entries... which will repair permissions throughout the library. When complete switch to the General tab, click in the Read-only check box to clear it, then click Apply.
If you don't have the option to change the permissions then use the Owner tab and Edit... button to take ownership from an account with administrator privileges. Tick the option to Replace owner on subcontainers and objects.
Repeat with the media folder if it isn't stored inside the main iTunes folder.
If you've brought over the library from another computer you may also want to remove any "mystery" identities (S<string of dashes & digts>) that have come over from the old computer...
The images above are from Windows 7. Hopefully the system isn't too different in Windows 8.
tt2 -
This morning when I tried to open my CC2014 Photoshop, it started to open, then quit suddenly. Same with Dreamweaver and InDesign. I am a professional and do not have the time to screw around with this. When I tried to run CC app, I get an error that says "Adobe creative cloud is needed to resolve this problem. However, it is missing or damaged. Please download and install a new copy of the Creative Cloud from 'http://www.adobe.com/go/adobecreativecloudapp'." I did so and tried to run the app and got the same error. I tried the cleaner and it removed all of my apps, then I tried to install again, and got the same error. I am getting desperate now, I have clients waiting for their projects. I need help, please.
Allisonf55952352 have you utilized the steps listed in Error: "Failed to install" | Creative Cloud Desktop to resolve the current error? If not do you have any questions regarding the steps listed with the document?
-
I keep getting the message"an error occurred while trying to access the service". does anyone know what i need to do to resolve this problem. I am trying to convert a PDF file for ms word?
Adobe Reader is free; but you may have paid for the ExportPDF service.
Contact Adobe Customer Care and click on the Still need help? button to chat with an agent.
[topic moved to ExportPDF forum] -
I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.
Only the carrier that the iPhone was locked to can unlock. There you go, hacking void any support from this forum.
-
Hello, I restored my ipod and now I can't restore my information back on my ipod. I read the manual on how to restore my ipod and I click the ipod under devices but, it won't let me get into the itune store. I keep getting error -9808. What can I do to resolve this problem? Thanks!
Have you seen this Apple support document?
http://support.apple.com/kb/TS2753
B-rock -
I receive error messages when I am downloading free iphone apps. I get error message 9810 and 9834. Can anyone advise how to resolve this problem? The problem doesn't exist when I'm downloading apps for which I pay.
Hi,
See Here:
http://support.apple.com/kb/TS1276
From Here:
http://support.apple.com/kb/TS1424 -
hello i am trying to update my phone . i am connecting it to itunes but it is giving error 3194 . can you help me resolve this problem please.
Hi ali hakim,
Welcome to the Support Communities!
The article below may be able to help you with this issue.
Click on the link to see more details and screenshots.
iOS: Restore error 3194 or 'This device isn't eligible for the requested build'
http://support.apple.com/kb/TS4451
This occurs when iTunes is unable to communicate with the update-and-restore server (gs.apple.com). This is most likely because it is being blocked, redirected, or interrupted by security software, hosts-file entries, or other third-party software.
Cheers,
- Judy -
hello good samaritan out there ! am trying to restore my ios for for i phone 3G, but toward the end of the process, i am receiving an error message like "the iphone could not be restored, an unknown error occured(1015). Kindly help me resolve this problem, my iphone has been down for a we
mazunzo tembo wrote:
"the iphone could not be restored, an unknown error occured(1015).
Unauthorized modification of iOS > http://support.apple.com/kb/HT3743
ERROR 1015...
This Error Code is indicative of the Device being jailbroken / Hacked...
Sorry... But...
The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
You will need to look elsewhere. -
how to resolve this problem. During ti install the new verson in my iPhone appear "The iPhone could not be restored. An unknown error occourred (1015)
You can't resolve the issue. Your phone is bricked.
This is the error message that happens when you try and update a jailbroken phone.
Discussion of jailbroken phones is prohibited by the Terms of Use of this forum.
You need to buy another phone. -
After following the restore steps. I get an error while restoring Iphone. error code is 1 or -1. Please suggest what should I do to resolve this problem.
Error 1 or -1
This may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.
http://support.apple.com/kb/TS3694 -
Hello! Tried unsuccessfully to restore my MBP, running the Mac OSX Lion, to factory settings. I keep getting the "can't download additional components for the Mac OSX Lion" error when reinstalling the OSX Lion. Any tips on how to resolve this problem?
Hi
Given that your answer to 1. is 'pre-installed' and 3. is 'No', I think the only thing to do is to take it to an Apple store (ideally the one you bought it from) and have them reinstall it for you.
The intended solution in cases like yours is that you should be able to reboot and install even a wiped disk by using Apple's servers over the internet (you do this by restarting with 'command-r' and choosing 'reinstall Lion'). However if this isn't working for you then you need to get the store to do it. Don't let them fob you off with 'go home and try again'. Have them do it in the shop (you're still covered by Applecare warranty so it should cost you nothing save the inconvenience of the trip and possibly leaving the machine there while they fix it).
A reinstall should leave all your own personal data and programs in place.
Note for future: when you get it fixed, first thing to do is buy a cheap external drive and start keeping a backup (either Time Machine or clone with Carbon Copy Cloner).
Message was edited by: softwater -
I cant login to DPS App Builder. Get this error: ERROR This account does not have permission to access App Builder. Learn more about how to resolve this problem.
Then you either need to:
1) Sign up for Creative Cloud so you can build a Single Edition app. Be warned though: this approach will no longer be valid as of May 1st when we retire support for Single Edition in Creative Cloud, and Single Edition apps are only on iPad devices.
2) Sign up for a full DPS license. You can request pricing information by filling in Adobe | Request for consultation.
Neil -
Color Nook can no longer access library . . How can I resolve this problem?
I have a Color Nook. Recently it was updated automatically. Since the update I can no longer enjoy reading the library books I once could. I used Overdrive and Adobe Digital Editions to access my county library in the past but can no longer access it.. I get an error message of E_AUTH_BAD_DEVICE_KEY. Apparently I have lost authorization to the AdobeID server.
How do I resolve this problem?Well, you could start by asking in the Digital Editions forum,
http://forums.adobe.com/community/adobe_digital_editions
This is the Reader one.
Maybe you are looking for
-
How can I sync my iTunes library with Sansa Rhapsody?
I'm trying to sync my iTunes library with a Sansa Rhapsody, but the music player is not being recognized by iTunes. Is there a way to use iTunes with the Sansa?
-
Deleting pages from a PDF using Acrobat X Pro
Hello, I need to delete some pages from a PDF. Within the same document, I can delete some pages with no issue, but can't delete other pages. Why not?
-
On my iPhone 4s, I wanted to purchase more capacity for the iCloud. I was blocked and refered to the support. I to solve it? Thanks Meir
-
4.2.1 iPhone 3g wi-fi greyed out
HELP!! My iPhone was on wi-fi this am, and now the wi-fi is greyed out as not even an opyion. I did al of the resetting and still nothing. It is @ 3.5 years old - and suggestions besides sending it away or using a heat gun?
-
Suddenly, anytime I click on an email link in Firefox 4, Gmail opens a popup window. This does not happen if I click an email link in IE 8.0 or Google Chrome. In Tools > Options > Applications, Thunderbird is set as my default in Firefox 4. If I go t