Re: Any reason why extending and extended WOComponent would not work?

2008-12-15 Thread Johan Henselmans


On 15 dec 2008, at 03:41, Chuck Hill wrote:



On Dec 14, 2008, at 6:38 PM, Johan Henselmans wrote:



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();
}


Chuck



Ahh, 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:

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.


What does the WOO file say the encoding is?  What does Eclipse think  
it is?  Any chance these are really UTF-16?


Chuck




sh-3.2# file *
PrintTickets.html: ASCII text, with very long lines
PrintTickets.wod:  ASCII text
PrintTickets.woo:  ASCII text


Eclipse (via navigator):
PrintTickets.wo : UTF-8, inherited from container
PrintTickets.html : UTF-8, inherited from container
PrintTickets.woo : UTF-8, determined from content
PrintTickets.wod : UTF-8, determined from content

PrintTickets.woo:
{
WebObjects Release = WebObjects 5.0;
encoding = UTF-8;
variables = {};
}

I opened the files in SubEthaEdit and TextWrangler, and they both  
agreed on UTF-8 for all the files.




[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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-15 Thread Mike Schrag

On Dec 14, 2008, at 6:38 PM, Johan Henselmans wrote:
Maybe you're running into an old bug in wolips where it used to be in  
another folder and it got deleted, but the build system didn't fully  
clean up?  in your workspace, do a find . -name 'PrintTickets.wo' and  
see if there's a .wo that is empty in your build folder.


ms

___
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


Re: Any reason why extending and extended WOComponent would not work? (SOLVED)

2008-12-15 Thread Johan Henselmans


On 15 dec 2008, at 14:37, Mike Schrag wrote:


On Dec 14, 2008, at 6:38 PM, Johan Henselmans wrote:
Maybe you're running into an old bug in wolips where it used to be  
in another folder and it got deleted, but the build system didn't  
fully clean up?  in your workspace, do a find . -name  
'PrintTickets.wo' and see if there's a .wo that is empty in your  
build folder.


ms



I removed the build folder over and over again. What finally solved  
the problem is to copy and paste all the contents of the files (the  
html, wod and woo file) in new files in TextWrangler, remove the old  
ones via the Finder and then save new ones in the same wo folder.  
After solving the error on the initial component, I got the same error  
with 4 other  components in the project. It then finally worked.


I am still baffled as to why this happened. I had a look in  
the .settings file in the project and noticed a remark on one file  
being a UTF file (which I would assume would just be all right).


Oh well. Just another day spent hunting and squishing mysterious bugs  
in the exotic rain forest of where the sun never eclipses.



___
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/johan%40netsense.nl

This email sent to jo...@netsense.nl


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


Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Chuck Hill


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.



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.


Chuck



The 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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Chuck Hill

er, you have to use my cool superclass.  :-P

 public NSArray associations()
 {
 return _keyAssociations.allValues();
 }


Chuck


On 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.


Chuck



The 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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Johan Henselmans


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();
}


Chuck



Ahh, 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)



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?


[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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Chuck Hill


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();
   }


Chuck



Ahh, 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?


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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Johan Henselmans


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();
  }


Chuck



Ahh, 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 

Re: Any reason why extending and extended WOComponent would not work?

2008-12-14 Thread Chuck Hill


On Dec 14, 2008, at 6:38 PM, Johan Henselmans wrote:



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();
 }


Chuck



Ahh, 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:

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.


What does the WOO file say the encoding is?  What does Eclipse think  
it is?  Any chance these are really UTF-16?


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