On 15 dec 2008, at 02:55, Chuck Hill wrote:
On Dec 14, 2008, at 5:51 PM, Johan Henselmans wrote:On 15 dec 2008, at 02:24, Chuck Hill wrote:er, you have to use my cool superclass. :-P public NSArray associations() { return _keyAssociations.allValues(); } ChuckAhh, I already found some the _keyAssociations method while browsing for content assist to the WOComponent.When I tried it out, this is what I got.[2008-12-15 2:49:29 CET] <WorkerThread0> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException [2008-12-15 2:49:29 CET] <WorkerThread0> com.webobjects.foundation.NSForwardException [java.lang.reflect.InvocationTargetException] null:java.lang.reflect.InvocationTargetException at com .webobjects .foundation ._NSUtilities._explainInstantiationException(_NSUtilities.java:600)If you catch and dig down in that exception you might get some explanation, but...Or should I try it out somewhere else? In Debugging mode? Learning... public PrintTickets(WOContext context) { super(context); System.out.println("[ into printticket]\n"); System.out.println(associations()); }BTW, this is what I got in 5.4.3 with the original code: it complains about "\ufeff" (65279). Any idea?<zero width no break space>Looks like the first character of your WOD is not acceptable. Maybe a UTF-16 char in a UTF-8 defined file?
I replaced the whole wod file with a new one (copy and paste). Still the same error.
The briljant and cool as ice associations() class does not give any hints either. All I get is a null error. What is it supposed to be showing, and when?
I noticed that another wod file, with another component, seemed to produce very strange content: there was a word in that wod file: "Beƫindig Verkoop", that got into the webbrowser as:
<<inline: pastedGraphic.png>>
It seems odd, Safari did not pick up that it was UTF-8 encoded. But I guess that is not the core of this problem.
Chuck[2008-12-15 2:27:37 CET] <WorkerThread1> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [com .webobjects .appserver.parser.declaration.WODeclarationFormatException] Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "":<com.webobjects.appserver._private.WOComponentDefinition: Error parsing template for Component : 'file:/Users/johan/projecten/ Theater/EclipseWorkSpaceTheater/kassa/build/kassa.woa/Contents/ Resources/PrintTickets.wo': com .webobjects .appserver.parser.declaration.WODeclarationFormatException: Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "" [2008-12-15 2:27:37 CET] <WorkerThread1> com.webobjects.foundation.NSForwardException [com .webobjects .appserver.parser.declaration.WODeclarationFormatException] Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "":<com.webobjects.appserver._private.WOComponentDefinition: Error parsing template for Component : 'file:/Users/johan/projecten/ Theater/EclipseWorkSpaceTheater/kassa/build/kassa.woa/Contents/ Resources/PrintTickets.wo': com .webobjects .appserver.parser.declaration.WODeclarationFormatException: Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "" at com .webobjects .appserver ._private.WOComponentDefinition.template(WOComponentDefinition.java: 367) at com.webobjects.appserver.WOComponent.template(WOComponent.java: 499) at com .webobjects.appserver.WOComponent.appendToResponse(WOComponent.java: 1112) at com .webobjects .appserver ._private .WOComponentReference.appendToResponse(WOComponentReference.java:135) at com .webobjects .appserver ._private .WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126) at com .webobjects .appserver ._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136) at com .webobjects.appserver.WOComponent.appendToResponse(WOComponent.java: 1122) at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java: 1385) at com .webobjects .appserver.WOApplication.appendToResponse(WOApplication.java:1794) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:242) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:298) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)at java.lang.Thread.run(Thread.java:613)Caused by: com .webobjects .appserver.parser.declaration.WODeclarationFormatException: Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "" at com .webobjects .appserver .parser .declaration .WODeclarationParser .declarationsWithString(WODeclarationParser.java:30) at com .webobjects .appserver .parser .WOBundleComponentTemplateParser .declarations(WOBundleComponentTemplateParser.java:89) at com .webobjects .appserver .parser .WOBundleComponentTemplateParser .didParseClosingWebObjectTag(WOBundleComponentTemplateParser.java:68) at com .webobjects .appserver .parser.WOHTMLParser.didParseClosingWebObjectTag(WOHTMLParser.java: 194) at com .webobjects .appserver.parser.WOHTMLParser.endOfWebObjectTag(WOHTMLParser.java: 161) at com .webobjects .appserver.parser.WOHTMLParser.handleWebObjectTag(WOHTMLParser.java: 140) at com .webobjects .appserver.parser.WOHTMLParser.parseHTML(WOHTMLParser.java:61) at com .webobjects .appserver .parser .WOBundleComponentTemplateParser .parse(WOBundleComponentTemplateParser.java:109) at com .webobjects .appserver .parser.WOHTMLTemplateParser.parse(WOHTMLTemplateParser.java:40) at com .webobjects .appserver .parser .WOComponentTemplateParser .templateWithHTMLAndDeclaration(WOComponentTemplateParser.java:438) at com .webobjects .appserver ._private.WOComponentDefinition.template(WOComponentDefinition.java: 364)... 17 moreCaused by: com.webobjects.appserver.parser.declaration.TokenMgrError: Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : "" at com .webobjects .appserver .parser .declaration .WODeclarationParserTokenManager .getNextToken(WODeclarationParserTokenManager.java:1869) at com .webobjects .appserver .parser .declaration.WODeclarationParser.jj_ntk(WODeclarationParser.java:570) at com .webobjects .appserver .parser .declaration .WODeclarationParser.declarations(WODeclarationParser.java:221) at com .webobjects .appserver .parser .declaration .WODeclarationParser .declarationsWithString(WODeclarationParser.java:26)... 27 moreOn Dec 14, 2008, at 5:18 PM, Johan Henselmans wrote:On 14 dec 2008, at 21:42, Chuck Hill wrote:On Dec 14, 2008, at 11:51 AM, Johan Henselmans wrote:(Had the error in 5.4.3 and 5.3.3, latest WOLips and Wonder)I had an error in an old project, so I wanted to fix that, but while testing it, somewhere else in the code I suddenly got this error that seems to be saying it can not find a component called PrintTicketForm, which is a WOForm in the Component PrintTickets.wo.I looked at it, and looked at it. It is there, I can see it, I looked at UTF gremlins, none around.If it makes you feel any better, I can see it to. :-) Try logging out associations() from PrintTickets and see if that matches the WOD or produces a more useful error.What do you mean by associations? How do I provoke these things to come up?<pastedGraphic.png> The second one seems not too good a reference...The only thing that I can imagine is that the PrintTickets component does not like to be an extension of another component (WebStoreComponent) which is an extension of WOComponent.I do multi-level inheritance like that all the time, that should not be the problem.Does anybody know any other reason why the webobjects parser is not able to find this, but used to like this in the old days (let's say the end of 2006?).I can't think of anything. ChuckThe error:[2008-12-14 20:22:51 CET] <WorkerThread0> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [com .webobjects.appserver._private.WODeclarationFormatException] <WOHTMLTemplateParser> no declaration for dynamic element (or component) named PrintTicketForm: <com.webobjects.appserver._private.WOComponentDefinition: Error parsing template for Component : 'file:/Users/johan/projecten/ Theater/EclipseWorkSpaceTheater/kassa/build/kassa.woa/Contents/ Resources/PrintTickets.wo': com.webobjects.appserver._private.WODeclarationFormatException: <WOHTMLTemplateParser> no declaration for dynamic element (or component) named PrintTicketForm [2008-12-14 20:22:51 CET] <WorkerThread0> com.webobjects.foundation.NSForwardException for com.webobjects.appserver._private.WODeclarationFormatException: <WOHTMLTemplateParser> no declaration for dynamic element (or component) named PrintTicketForm at com .webobjects .appserver ._private .WOHTMLWebObjectTag ._elementWithDeclaration(WOHTMLWebObjectTag.java:212) at com .webobjects .appserver ._private .WOHTMLWebObjectTag.dynamicElement(WOHTMLWebObjectTag.java:122) at com .webobjects .appserver ._private .WOHTMLTemplateParser .didParseClosingWebObjectTag(WOHTMLTemplateParser.java:52) at com .webobjects .appserver ._private .WOHTMLParser.didParseClosingWebObjectTag(WOHTMLParser.java:183) at com .webobjects .appserver ._private.WOHTMLParser.endOfWebObjectTag(WOHTMLParser.java:150) at com .webobjects .appserver._private.WOHTMLParser.parseHTML(WOHTMLParser.java:67) at com .webobjects .appserver ._private .WOHTMLTemplateParser.parseHTML(WOHTMLTemplateParser.java:81) at com .webobjects .appserver ._private.WOHTMLTemplateParser.parse(WOHTMLTemplateParser.java: 95) at com .webobjects .appserver ._private.WOParser.templateWithHTMLAndDeclaration(WOParser.java: 71) at com .webobjects .appserver ._private .WOComponentDefinition.template(WOComponentDefinition.java:288) at com .webobjects .appserver.WOComponent.templateWithName(WOComponent.java:597) at com.webobjects.appserver.WOComponent.template(WOComponent.java: 507) at com .webobjects .appserver.WOComponent.appendToResponse(WOComponent.java:982) at com .webobjects .appserver ._private .WOComponentReference .appendToResponse(WOComponentReference.java:111) at com .webobjects .appserver ._private .WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121) at com .webobjects .appserver ._private.WODynamicGroup.appendToResponse(WODynamicGroup.java: 130) at com .webobjects .appserver.WOComponent.appendToResponse(WOComponent.java:992) at com .webobjects.appserver.WOSession.appendToResponse(WOSession.java: 1200) at com .webobjects .appserver.WOApplication.appendToResponse(WOApplication.java: 1418) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:230) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:287) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication (WOComponentRequestHandler.java:322) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:358) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:432) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1306) at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java: 173) at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)at java.lang.Thread.run(Thread.java:613) The java code: import com.webobjects.foundation.*; import com.webobjects.appserver.*; import com.webobjects.eocontrol.*; import com.webobjects.eoaccess.*; import java.io.*; import nl.netsense.theater.Order; public class PrintTickets extends WebStoreComponent { private static final long serialVersionUID = 1L; protected boolean hasEntryError; private Order order; protected NSDictionary currentCartItem; public PrintTickets(WOContext context) { super(context); // System.out.println("[ into printticket]\n");// order = Order.createAndInsertOrder(currentAdress(), cart().cartItems(), sess().defaultEditingContext());} public WOComponent updatequantity() { return null; } } The html: <webobject name = "PrintTicketForm"> <p></p> <table border="1" width="100%"><tr><td align="right" colspan="4">Totaal:</td><td><webobject name="CartCartTotal"/></td></tr> <tr><th>Voorstelling</th><th>Datum</th><th>Kaartje</ th><th>Aantal</th><th>Prijs</th></tr><webobject name = "CartCartItems"><tr><td><webobject name = "CurrentCartItemPerformanceShowInfoShowName"/></td><td rowspan="2"><webobject name = "CurrentCartItemPerformancePerformanceDateString"/></td><td rowspan="2"><webobject name = "CurrentCartItemProductProductDescription"/></td><td rowspan="2"> <webobject name = "CurrentCartItemQty"/></td><td rowspan="2"> <webobject name = "CurrentCartItemTotal"/></td></tr> <tr><td><webobject name = "CurrentCartItemShowattendantAchternaam"/></td></tr></webobject><tr><td align="right" colspan="4">Totaal:</td><td><webobject name = "CartCartTotal1"/></td></tr></table> </webobject> the wod: PrintTicketForm : WOForm { multipleSubmit = true; } CartCartItems : WORepetition { item = currentCartItem; list = cart.cartItems; } CurrentCartItemPerformanceShowInfoShowName: WOString { value = currentCartItem.performance.showInfo.showName; } CurrentCartItemPerformancePerformanceDateString: WOString { value = currentCartItem.performance.performanceDateString; } CurrentCartItemProductProductDescription: WOString { value = currentCartItem.product.productDescription; } CurrentCartItemQty: WOString { value = currentCartItem.qty; } CurrentCartItemTotal: WOString { value = currentCartItem.total; formatter = session.localFormat; } CartCartTotal: WOString { value = cart.cartTotal; formatter = session.localFormat; } CurrentCartItemShowattendantAchternaam: WOString { value = currentCartItem.showattendant.achternaam; } CartCartTotal1: WOString { value = cart.cartTotal; formatter = session.localFormat; } The woo: {"WebObjects Release" = "WebObjects 5.0"; encoding = "UTF-8"; } Regards, Johan Henselmans http://www.netsense.nl Tel: +31-20-6267538 Fax: +31-20-6279159 _______________________________________________ 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: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net-- Chuck Hill Senior Consultant / VP DevelopmentPractical 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/products/practical_webobjectsRegards, Johan Henselmans http://www.netsense.nl Tel: +31-20-6267538 Fax: +31-20-6279159-- Chuck Hill Senior Consultant / VP DevelopmentPractical 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/products/practical_webobjectsRegards, Johan Henselmans http://www.netsense.nl Tel: +31-20-6267538 Fax: +31-20-6279159-- Chuck Hill Senior Consultant / VP DevelopmentPractical 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/products/practical_webobjects
Regards, Johan Henselmans http://www.netsense.nl Tel: +31-20-6267538 Fax: +31-20-6279159
_______________________________________________ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com