Some feedback. The issue doesn't seem to be with ERAttachment, but rather with AjaxFileUpload. To try to figure out what was happening, I changed the specific ERAttachment from database to file attachment with the same results. After changing the model back to database attachment, making a backup of the database, dropping the schema, letting the migrations recreate the database and then restoring the backup, I was able to have the application working again.
But I have had a lot of headache with ERAttachment. For instance, very often I have to change the order of the ERAttachment library in the build path for the application to start. The following error will happen randomly and will go away if I change the library order and restart the application: 20 Set 20:19:55 vtta[60003] INFO er.transaction.adaptor.Exceptions - Database Exception occured: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException 20 Set 20:19:55 vtta[60003] ERROR er.extensions.appserver.ERXApplication - vtta failed to start. NullPointerException at com.webobjects.eoaccess.EOModel.createPrototypeCache(EOModel.java:631) at com.webobjects.eoaccess.EOModel.prototypeAttributeNamed(EOModel.java:699) at com.webobjects.eoaccess.ERXModel.prototypeAttributeNamed(ERXModel.java:315) at com.webobjects.eoaccess.EOAttribute.<init>(EOAttribute.java:998) at com.webobjects.eoaccess.EOEntity.attributes(EOEntity.java:816) at com.webobjects.eoaccess.EOEntity.attributeNamed(EOEntity.java:789) at com.webobjects.eoaccess.EOEntity.classProperties(EOEntity.java:1098) at com.webobjects.eoaccess.EOEntity._propertyDictionaryInitializer(EOEntity.java:3321) at com.webobjects.eoaccess.EOEntity._newDictionaryForProperties(EOEntity.java:3667) at com.webobjects.eoaccess.EOEntityClassDescription._newDictionaryForProperties(EOEntityClassDescription.java:88) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:111) at com.webobjects.eocontrol.EOGenericRecord.__setClassDescription(EOGenericRecord.java:100) at com.webobjects.eocontrol.EOGenericRecord.<init>(EOGenericRecord.java:73) at er.extensions.eof.ERXGenericRecord.<init>(ERXGenericRecord.java:104) at er.attachment.model._ERAttachment.<init>(_ERAttachment.java:15) at er.attachment.model.ERAttachment.<init>(ERAttachment.java:40) at er.attachment.model._ERDatabaseAttachment.<init>(_ERDatabaseAttachment.java:15) at er.attachment.model.ERDatabaseAttachment.<init>(ERDatabaseAttachment.java:24) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:659) at com.webobjects.eoaccess.EOEntityClassDescription.createInstanceWithEditingContext(EOEntityClassDescription.java:242) at er.extensions.eof.ERXEntityClassDescription.createInstanceWithEditingContext(ERXEntityClassDescription.java:745) at com.webobjects.eoaccess.EORelationship._deferredFault(EORelationship.java:1904) at com.webobjects.eoaccess._EODBCtxEntityInfo.computeRelationshipInfoForEntityObjectRow(EODatabaseContext.java:6704) at com.webobjects.eoaccess._EODBCtxEntityInfo.infoForEntityObjectRow(EODatabaseContext.java:6744) ... skipped 2 stack elements On other occasions, randomly as well, the application will have an error with ERAttachments and private keys when saving the entity. This issue will go away if I shut down the application and restart it. I hope that the issue is gone now. Angelo 2012/9/20 Ângelo Andrade Cirino <aacir...@gmail.com> > Hi Chuck, > > I am using ERDatabaseAttachment. The three attachments were modeled the > same way, a one-sided, to-one relationship to ERDatabaseAttachment. > > Angelo > > > 2012/9/20 Chuck Hill <ch...@global-village.net> > >> Are they all in the same directory? >> >> >> On 2012-09-20, at 1:11 PM, Ângelo Andrade Cirino wrote: >> >> > Hi David, >> > >> > Not really. Just to be sure about it I changed the access to 777 and >> the error remains. And there are two other attachments that work fine. >> > >> > Angelo >> > >> > 2012/9/20 David Holt <programming...@mac.com> >> > File permissions? >> > >> > On 2012-09-20, at 12:49 PM, Ângelo Andrade Cirino wrote: >> > >> >> Hi, >> >> >> >> I had this problem once and do not remember how I solved it, perhaps >> changing the libraries order. Another guy had the same problem and reported >> it to the list but no one presented a solution. >> >> >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - === >> Begin Internal Transaction >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - >> Searching for primary key value for ERAttachment >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - >> evaluateExpression: >> <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "SELECT PK FROM >> EO_PK_TABLE WHERE NAME = 'ERAttachment' FOR UPDATE" withBindings: > >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - >> fetch canceled >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - 1 >> row(s) processed >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - >> Updating primary key value for ERAttachment in PK table named: EO_PK_TABLE >> to seed value: 127 >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - >> evaluateExpression: >> <com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "UPDATE >> EO_PK_TABLE SET PK = 127 WHERE NAME = 'ERAttachment' AND PK = 126" >> withBindings: > >> >> Set 20 16:41:39 Visiontur1.0[60002] DEBUG NSLog Page: >> er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote - === >> Commit Internal Transaction >> >> Set 20 16:41:39 Visiontur1.0[60002] ERROR org.jabsorb.JSONRPCBridge >> Page: er.modern.look.pages.ERMODTabInspectPage - Configuration: EditPacote >> - exception occured >> >> FileNotFoundException: >> /var/folders/tv/6j4lw_5x6x72l308h51r88t80000gn/T/AjaxFileUpload7026200132146135460.tmp >> (No such file or directory) >> >> at java.io.FileInputStream.open(Native Method) >> >> at java.io.FileInputStream.<init>(FileInputStream.java:120) >> >> at java.io.FileInputStream.<init>(FileInputStream.java:79) >> >> at >> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) >> >> at >> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) >> >> at java.net.URL.openStream(URL.java:1010) >> >> at com.webobjects.foundation.NSData.<init>(NSData.java:312) >> >> at >> er.attachment.processors.ERDatabaseAttachmentProcessor._process(ERDatabaseAttachmentProcessor.java:58) >> >> at >> er.attachment.processors.ERDatabaseAttachmentProcessor._process(ERDatabaseAttachmentProcessor.java:29) >> >> at >> er.attachment.processors.ERAttachmentProcessor.process(ERAttachmentProcessor.java:346) >> >> at >> er.attachment.processors.ERAttachmentProcessor.process(ERAttachmentProcessor.java:284) >> >> at >> er.attachment.components.ERAttachmentUpload._uploadSucceeded(ERAttachmentUpload.java:184) >> >> at >> er.attachment.components.ERAttachmentUpload.uploadSucceeded(ERAttachmentUpload.java:197) >> >> ... skipped 13 stack elements >> >> at er.ajax.AjaxFileUpload.uploadSucceeded(AjaxFileUpload.java:381) >> >> at >> er.ajax.AjaxFlexibleFileUpload.uploadSucceeded(AjaxFlexibleFileUpload.java:566) >> >> at >> er.ajax.AjaxFlexibleFileUpload.refreshState(AjaxFlexibleFileUpload.java:321) >> >> at >> er.ajax.AjaxFlexibleFileUpload.uploadState(AjaxFlexibleFileUpload.java:299) >> >> ... skipped 4 stack elements >> >> at org.jabsorb.JSONRPCBridge.call(JSONRPCBridge.java:650) >> >> at er.ajax.AjaxProxy.handleRequest(AjaxProxy.java:195) >> >> ... skipped 121 stack elements >> >> at >> er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17) >> >> ... skipped 3 stack elements >> >> at >> com.visionar.visiontur.app.Application.dispatchRequest(Application.java:77) >> >> ... skipped 3 stack elements >> >> >> >> It is interesting to notice that I have other two attachments that >> simply work as they should. The three attachments are images and the D2W >> application used to deal with them with no problem, until this one started >> to present the problem for no apparent reason. >> >> >> >> Angelo >> >> _______________________________________________ >> >> Do not post admin requests to the list. They will be ignored. >> >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> >> Help/Unsubscribe/Update your Subscription: >> >> >> https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com >> >> >> >> This email sent to programming...@mac.com >> > >> > >> > >> > >> > -- >> > Ângelo Andrade Cirino >> > aacir...@gmail.com >> > 31-3494-8642 >> > 31-9303-0695 >> > MSN aacir...@hotmail.com >> > Skype aacirino >> > _______________________________________________ >> > Do not post admin requests to the list. They will be ignored. >> > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> > Help/Unsubscribe/Update your Subscription: >> > >> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net >> > >> > This email sent to ch...@global-village.net >> >> -- >> Chuck Hill Senior Consultant / VP Development >> >> Practical WebObjects - for developers who want to increase their overall >> knowledge of WebObjects or who are trying to solve specific problems. >> http://www.global-village.net/gvc/practical_webobjects >> >> >> >> >> >> >> >> >> > > > -- > Ângelo Andrade Cirino > aacir...@gmail.com > 31-3494-8642 > 31-9303-0695 > MSN aacir...@hotmail.com > Skype aacirino > -- Ângelo Andrade Cirino aacir...@gmail.com 31-3494-8642 31-9303-0695 MSN aacir...@hotmail.com Skype aacirino
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com