Re: Problem with Oracle adapter and update

2006-10-10 Thread Tarun Reddy


On Oct 10, 2006, at 9:37 PM, shaun wrote:


Hi,

Tarun Reddy wrote:

On Oct 10, 2006, at 8:02 PM, shaun wrote:

Hi,

Tarun Reddy wrote:


On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:


On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:


Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND  
AVGRATING  is  NULL AND CATEGORY_OID = 6 AND IDEADESC =  
"afdsafadsfasfa"  AND  IDEANAME = "fdsfadf" AND IDEAURL is  
NULL AND NUMRATINGS is  NULL  AND PARENT_OID is NULL AND  
STATUS = "P" AND SUBMIT_DATE =   "2006-10-08 00:00:00" AND  
USER_OID = 1)";


returns:
ERROR:
ORA-00972: identifier is too long




You have an unmatched double quote near the end of the  
above   statement.  This might cause the error in your sqlplus  
test, but   probably not in your WO app.


If you eliminate the unmatched double quote, replace the   
remaining  double quotes with single quotes, and rerun the   
statement in  sqlplus, does the error still occur?  Searching   
Google for  "ORA-00972" produced one response that claimed  
that  this bogus  error message can occur when double quotes  
are used.


Another Google search results states that an incorrect  
column  name  can cause this error.  Is it possible that an  
attribute in  your  eomodel has a column name that doesn't  
match a column name  in the  IDEA table?


Art,
First off, I appreciate your help!
I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING  
is   NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa'  
AND   IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is  
NULL  AND  PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE =  
to_date  ('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss')  AND  
USER_OID = 1)

  2  ;
That returned 0 rows updated.
It seems like the SQL generated is off. I think it is the   
SUBMIT_DATE  part. My SQL maybe off.
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING  
is   NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa'  
AND   IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is  
NULL  AND  PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1);



What is the oracle data type for the SUBMIT_DATE attribute?


Hi Shaun,
SQL> desc IDEA
Name  Null?Type
-    


AVGRATING  FLOAT(126)
CATEGORY_OID  NOT NULL NUMBER
IDEADESC  NOT NULL VARCHAR2(4000)
IDEANAME  NOT NULL VARCHAR2(255)
IDEA_OID  NOT NULL NUMBER
IDEAURLVARCHAR2(255)
NUMRATINGS NUMBER
PARENT_OID NUMBER
STATUSNOT NULL VARCHAR2(1)
SUBMIT_DATE   NOT NULL DATE
USER_OID  NOT NULL NUMBER
In my EO Model
submitDate maps to SUBMIT_DATE with
External Type of DATE
Value Class (Java) of NSTimestamp
Value (not sure what this might affect) of D


I have this in my notes regarding value type:
--
For attributes with a Value Class of NSTimestamp the following  
value types are defined:


D
t
T
M

These value types affect how the data is transfer between the JDBC  
adaptor and the database. An empty Value Type uses get/setObject()  
on the ResultSet and PreparedStatement. It assumes the database can  
provide a value compatible with a java.sql.Timestamp. A 'D'  
indicates WebObject's JDBC adaptor should use get/setDate. A 't'  
indicates get/setTime(), and a 'T' uses get/setTimestamp(). The 'M'  
value type is a workaround for a bug in some MS SQLServer JDBC  
drivers. It only support java.sql.Date.

--

I thought that I used T usually, but looking at some of my models I  
have nothing set for a lot of the oracle DATE fields. The info  
above indicates that if you only want the date portion then use a  
D, if you want Date and time ie) a timestamp then use T.


Also, I'm using NSCalendarDate not NSTimestamp for valueClassName  
in my eomodels. Using NSTimestamp in the classes. I have a much  
older version of Oracle and WO5.3. FWIW most of my eomodels are  
also quite old now.





Well, I'm going to try some of these options. I really want a  
timestamp. I moved the EOModel to MySQL (on my list of things to  
evaluate anyway) and it worked perfectly. I'm sure it is one of the  
things above. May even try to check some of them if I move back to  
Oracle.


Much, much thanks!

Tarun
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsu

Re: Problem with Oracle adapter and update

2006-10-10 Thread Art Isbell

On Oct 10, 2006, at 5:37 PM, shaun wrote:

Also, I'm using NSCalendarDate not NSTimestamp for valueClassName  
in my eomodels.


	NSCalendarDate is the "Value Class (Obj-C)" equivalent of the "Value  
Class (Java)" NSTimestamp.  These days, you should probably delete  
the "Value Class (Obj-C)" column and add the "Value Class (Java)"  
column to your eomodels.  However, doing so will make absolutely no  
difference at run time assuming that you're using the correct  
Objective-C equivalents of Java value classes.


Aloha,
Art

___
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 archive@mail-archive.com


Re: MSSQLServer Unicode Support

2006-10-10 Thread Art Isbell
On Oct 10, 2006, at 2:24 PM, Dov Rosenberg wrote:In order to store unicode data into one of these columns it is necessary to preface the value with an N such as   INSERT into locale (recordid, localedesc) values (123, N’日本語');  Otherwise only ??? Will be stored in the database. In order to find the data again you must also preface the values in the WHERE clause with N like:  SELECT * from locale where localedesc like N'日本%';I think I need to either modify the SQL being generated by the MSSQL Server plugin or modify the plugin itself to generate the correct SQL. Any thoughts on the correct direction would be appreciated (as well as some guidance on what and where I need to start).	It's been a while since I've done something like this, but I think you'll first need to subclass MicrosoftPlugIn (e.g., "MSUnicodePlugin") and override its defaultExpressionClass() method to return the Class object of your MSUnicodePlugin inner class MicrosoftPlugIn.MicrosoftExpression subclass (e.g., "MSUnicodePlugin.MSUnicodeExpression").  In MSUnicodePlugin.MSUnicodeExpression, override formatValueForAttribute().  Get the value returned by super.formatValueForAttribute().  If the attribute's externalType is "nchar", "ntext", or "nvarchar", prepend "N" to the value before returning it.	Then you'll need to ensure that EOF uses MSUnicodePlugin.  The tech note at  should provide enough info to make this happen.Aloha, Art   ___
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 archive@mail-archive.com

Re: Problem with Oracle adapter and update

2006-10-10 Thread shaun

Hi,

Tarun Reddy wrote:


On Oct 10, 2006, at 8:02 PM, shaun wrote:


Hi,

Tarun Reddy wrote:


On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:


On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:


Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING  is  
NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa"  AND  
IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is  NULL  
AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE =   
"2006-10-08 00:00:00" AND USER_OID = 1)";


returns:
ERROR:
ORA-00972: identifier is too long




You have an unmatched double quote near the end of the above   
statement.  This might cause the error in your sqlplus test, but   
probably not in your WO app.


If you eliminate the unmatched double quote, replace the  
remaining  double quotes with single quotes, and rerun the  
statement in  sqlplus, does the error still occur?  Searching  
Google for  "ORA-00972" produced one response that claimed that  
this bogus  error message can occur when double quotes are used.


Another Google search results states that an incorrect column  
name  can cause this error.  Is it possible that an attribute in  
your  eomodel has a column name that doesn't match a column name  in 
the  IDEA table?


Art,
First off, I appreciate your help!
I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is   
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND   
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL  AND  
PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date  
('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss')  AND USER_OID = 1)

  2  ;
That returned 0 rows updated.
It seems like the SQL generated is off. I think it is the  
SUBMIT_DATE  part. My SQL maybe off.
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is   
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND   
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL  AND  
PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1);



What is the oracle data type for the SUBMIT_DATE attribute?



Hi Shaun,


SQL> desc IDEA
Name  Null?Type
-   


AVGRATING  FLOAT(126)
CATEGORY_OID  NOT NULL NUMBER
IDEADESC  NOT NULL VARCHAR2(4000)
IDEANAME  NOT NULL VARCHAR2(255)
IDEA_OID  NOT NULL NUMBER
IDEAURLVARCHAR2(255)
NUMRATINGS NUMBER
PARENT_OID NUMBER
STATUSNOT NULL VARCHAR2(1)
SUBMIT_DATE   NOT NULL DATE
USER_OID  NOT NULL NUMBER

In my EO Model

submitDate maps to SUBMIT_DATE with
External Type of DATE
Value Class (Java) of NSTimestamp
Value (not sure what this might affect) of D



I have this in my notes regarding value type:
--
For attributes with a Value Class of NSTimestamp the following value 
types are defined:


D
t
T
M

These value types affect how the data is transfer between the JDBC 
adaptor and the database. An empty Value Type uses get/setObject() on 
the ResultSet and PreparedStatement. It assumes the database can provide 
a value compatible with a java.sql.Timestamp. A 'D' indicates 
WebObject's JDBC adaptor should use get/setDate. A 't' indicates 
get/setTime(), and a 'T' uses get/setTimestamp(). The 'M' value type is 
a workaround for a bug in some MS SQLServer JDBC drivers. It only 
support java.sql.Date.

--

I thought that I used T usually, but looking at some of my models I have 
nothing set for a lot of the oracle DATE fields. The info above 
indicates that if you only want the date portion then use a D, if you 
want Date and time ie) a timestamp then use T.


Also, I'm using NSCalendarDate not NSTimestamp for valueClassName in my 
eomodels. Using NSTimestamp in the classes. I have a much older version 
of Oracle and WO5.3. FWIW most of my eomodels are also quite old now.


HTH.
 - shaun









___
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 archive@mail-archive.com


Re: Problem with Oracle adapter and update

2006-10-10 Thread Tarun Reddy


On Oct 10, 2006, at 8:02 PM, shaun wrote:


Hi,

Tarun Reddy wrote:

On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:

On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:


Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING  
is  NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa"  
AND  IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is  
NULL  AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE =   
"2006-10-08 00:00:00" AND USER_OID = 1)";


returns:
ERROR:
ORA-00972: identifier is too long



You have an unmatched double quote near the end of the above   
statement.  This might cause the error in your sqlplus test, but   
probably not in your WO app.


If you eliminate the unmatched double quote, replace the  
remaining  double quotes with single quotes, and rerun the  
statement in  sqlplus, does the error still occur?  Searching  
Google for  "ORA-00972" produced one response that claimed that  
this bogus  error message can occur when double quotes are used.


Another Google search results states that an incorrect column  
name  can cause this error.  Is it possible that an attribute in  
your  eomodel has a column name that doesn't match a column name  
in the  IDEA table?

Art,
First off, I appreciate your help!
I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is   
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND   
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL  
AND  PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date  
('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss')  AND USER_OID = 1)

  2  ;
That returned 0 rows updated.
It seems like the SQL generated is off. I think it is the  
SUBMIT_DATE  part. My SQL maybe off.
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is   
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND   
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL  
AND  PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1);


What is the oracle data type for the SUBMIT_DATE attribute?



Hi Shaun,


SQL> desc IDEA
Name  Null?Type
-   


AVGRATING  FLOAT(126)
CATEGORY_OID  NOT NULL NUMBER
IDEADESC  NOT NULL VARCHAR2(4000)
IDEANAME  NOT NULL VARCHAR2(255)
IDEA_OID  NOT NULL NUMBER
IDEAURLVARCHAR2(255)
NUMRATINGS NUMBER
PARENT_OID NUMBER
STATUSNOT NULL VARCHAR2(1)
SUBMIT_DATE   NOT NULL DATE
USER_OID  NOT NULL NUMBER

In my EO Model

submitDate maps to SUBMIT_DATE with
External Type of DATE
Value Class (Java) of NSTimestamp
Value (not sure what this might affect) of D

Thanks,
Tarun
___
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 archive@mail-archive.com


Re: Problem with Oracle adapter and update

2006-10-10 Thread shaun

Hi,

Tarun Reddy wrote:


On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:


On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:


Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING is  
NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa" AND  
IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is NULL  AND 
PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE =  "2006-10-08 
00:00:00" AND USER_OID = 1)";


returns:
ERROR:
ORA-00972: identifier is too long



You have an unmatched double quote near the end of the above  
statement.  This might cause the error in your sqlplus test, but  
probably not in your WO app.


If you eliminate the unmatched double quote, replace the 
remaining  double quotes with single quotes, and rerun the statement 
in  sqlplus, does the error still occur?  Searching Google for  
"ORA-00972" produced one response that claimed that this bogus  error 
message can occur when double quotes are used.


Another Google search results states that an incorrect column 
name  can cause this error.  Is it possible that an attribute in your  
eomodel has a column name that doesn't match a column name in the  
IDEA table?



Art,

First off, I appreciate your help!

I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is  NULL 
AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND  IDEANAME = 
'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND  PARENT_OID is 
NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date ('2006-10-08 00:00:00', 
'-mm-dd hh24:mi:ss')  AND USER_OID = 1)

  2  ;

That returned 0 rows updated.

It seems like the SQL generated is off. I think it is the SUBMIT_DATE  
part. My SQL maybe off.


UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is  NULL 
AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND  IDEANAME = 
'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND  PARENT_OID is 
NULL AND STATUS = 'P' AND USER_OID = 1);




What is the oracle data type for the SUBMIT_DATE attribute?

regards,
 - shaun
___
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 archive@mail-archive.com


Re: Problem with Oracle adapter and update

2006-10-10 Thread Tarun Reddy


On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:


On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:


Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING is  
NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa" AND  
IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is NULL  
AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE =  
"2006-10-08 00:00:00" AND USER_OID = 1)";


returns:
ERROR:
ORA-00972: identifier is too long


	You have an unmatched double quote near the end of the above  
statement.  This might cause the error in your sqlplus test, but  
probably not in your WO app.


	If you eliminate the unmatched double quote, replace the remaining  
double quotes with single quotes, and rerun the statement in  
sqlplus, does the error still occur?  Searching Google for  
"ORA-00972" produced one response that claimed that this bogus  
error message can occur when double quotes are used.


	Another Google search results states that an incorrect column name  
can cause this error.  Is it possible that an attribute in your  
eomodel has a column name that doesn't match a column name in the  
IDEA table?


Art,

First off, I appreciate your help!

I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is  
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND  
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND  
PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date 
('2006-10-08 00:00:00', '-mm-dd hh24:mi:ss')  AND USER_OID = 1)

  2  ;

That returned 0 rows updated.

It seems like the SQL generated is off. I think it is the SUBMIT_DATE  
part. My SQL maybe off.


UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is  
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND  
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL AND  
PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1);


does the right thing.

Ugh.
Tarun
___
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 archive@mail-archive.com


Re: Dealing with URLs length

2006-10-10 Thread shaun

Miguel Arroz wrote:

Hi!

On 2006/10/10, at 21:50, Chuck Hill wrote:

Interesting  I never tried that.  Thanks for the tip!  You just  have 
this then?


WebObjectsAlias /WebObjects



  Yap! :) Taking the cgi-bin part out makes the URL look much better!

  Yours



Cool. Thanks for that info. I think that is definitely Wiki worthy(if 
its not there already).


regards,
 - shaun
___
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 archive@mail-archive.com


Problem with Oracle adapter and update

2006-10-10 Thread Tarun Reddy
So I'm trying to do a simple update against an Oracle XE database. Inserts and deletes work beautifully. My code is as simple as:		Session session = (Session) session();		EOEditingContext ec = session.defaultEditingContext();NSLog.allowDebugLoggingForGroups(0x1L);anIdea.setAcceptedStatus();		ec.saveChanges();NSLog.refuseDebugLoggingForGroups(0x1L);all setAcceptedStatus does is setStatus("A")I get the following error:Error:  	com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in databaseReason: 	updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in databaseStack trace: 	File 	Line# 	Method 	PackageEODatabaseContext.java 	4685 	_exceptionWithDatabaseContextInformationAdded 	com.webobjects.eoaccessEODatabaseContext.java 	6393 	performChanges 	com.webobjects.eoaccessEOObjectStoreCoordinator.java 	415 	saveChangesInEditingContext 	com.webobjects.eocontrolEOEditingContext.java 	3226 	saveChanges 	com.webobjects.eocontrol..So I turned on SQL debugging (as seen above). Get the following:[2006-10-10 18:18:39 MDT]   === Begin Internal Transaction[2006-10-10 18:18:39 MDT]   evaluateExpression: [2006-10-10 18:18:39 MDT]   === Rollback Internal TransactionTrying this in sqlplus with this statement:UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING is NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa" AND IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is NULL AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE = "2006-10-08 00:00:00" AND USER_OID = 1)";returns:ERROR:ORA-00972: identifier is too longAny ideas? I guess I could try a different adaptor (was thinking of switching to MySQL anyway, but I am fairly familiar with Oracle, XE is free).Thanks in advance!Tarun ___
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 archive@mail-archive.com

Re: Detecting eo changes when they happen

2006-10-10 Thread Sacha Michel Mallais

On Oct 10, 2006, at 3:09 PM, Florijan Stamenkovic wrote:

How about overriding all takeValue...() methods? Would that be  
inadvisable?


That's one way.  You could check that the key you were getting was  
actually an attribute of the EO too if you wanted.  Also keep in mind  
that EOF uses take*Stored*Value...() when it initializes your objects  
(and at some other times too -- see next), so you might want to do  
something with that too.


Another way to do it would be to change your eogenerator (I assume  
you're using it or something similar) template to generate code like  
this:


public void setMyAttribute(Object value)
{
takeStoredValueForKey(value, "myAttribute");
didChange("myAttribute", value);
}

Of course, you'll need a common superclass that implements didChange  
however you like.



sacha


--
Sacha Michel Mallais Knowledge Broker
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS d- s++:++ a C++()$ [EMAIL PROTECTED]()$ P-(---) L+(-) E>++
W++(+++) N+ o? K? w(---) O M++ V-(--) PS+++ PE(-) Y+ PGP++ t+
5+ X+ R+>+++ tv+ b+ DI+++ D++ G e++ h(+) r* y+(*)
--END GEEK CODE BLOCK--



___
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 archive@mail-archive.com


MSSQLServer Unicode Support

2006-10-10 Thread Dov Rosenberg
Title: MSSQLServer Unicode Support



I finally have gotten some more time to figure out how to deal with MS SQL Servers unicode support using EOF.

As a refresher – here is the problem:
To support unicode in MSSQL Server, the columns need to be nchar, ntext, or nvarchar (not a problem). In order to store unicode data into one of these columns it is necessary to preface the value with an N such as 

INSERT into locale (recordid, localedesc) values (123, N’日本語');

Otherwise only ??? Will be stored in the database. In order to find the data again you must also preface the values in the WHERE clause with N like:

SELECT * from locale where localedesc like N'日本%';

What I have learned so far:
Chuck Hill suggested using the Read and Write Format attributes of the EOModel to add the N’s. The Read Format he suggested was N %P. When I added that in WO/EOF generated SQL like

SELECT  recordid, N localedesc from locale...;

Which is invalid

For the Write Format he suggested N %V. EOF generated the following SQL:

INSERT into locale (recordid, localedesc) values (N ?, N ?) as a prepared statement with bindings (recordid:123; localedesc:日本語)

Which also didn’t seem to work.

I think I need to either modify the SQL being generated by the MSSQL Server plugin or modify the plugin itself to generate the correct SQL. Any thoughts on the correct direction would be appreciated (as well as some guidance on what and where I need to start).

Thanks in advance



-- 
Dov Rosenberg
Conviveon/Inquira
Knowledge Management Experts
http://www.conviveon.com
http://www.inquira.com





 ___
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 archive@mail-archive.com

Re: Detecting eo changes when they happen

2006-10-10 Thread Chuck Hill


On Oct 10, 2006, at 3:09 PM, Florijan Stamenkovic wrote:


Hi Chuck,

If nothing like that exists, I am thinking of implementing it  
through a notification posting EOGenericRecord subclass. Any  
comments or tips about this?


There is a discussion and implementation of what you want in  
Practical WebObjects starting on page 67.  You really need the  
help of the EC.


If I understand it correctly, your editing context subclass posts  
notifications once objects are saved to the persistent data store.


Not quite.  It can notify before a change, after a change but before  
a commit (save changes), and after a commit.



I need notifications being fired on every edit of any EO in my app,  
not in the persistent store, but in the editing context. I need  
that to fire Swing events,


I imagine that this makes quite some difference,  both as this is  
happening client side and for Swing's general architecture.



but didn't point that out in my original post. And, I need them to  
fire *after* object(s) have been edited.


How about overriding all takeValue...() methods? Would that be  
inadvisable?


Yes, that probably makes the most sense for what you are trying to do.


One more question: EOs are not automatically removed from to-many  
relationships after being deleted, even when their delete rule is  
set to nullify. Is this another client side EOClassDescription  
bug, or a standard behavior?


That is standard behavior.  Delete rules are processed as part of  
the preparation work done in saveChanges().  You can call  
ec.processRecentChanges() to force this to happen earllier.


Good to know. Does that make sense? Shouldn't the object store  
reflect the latest changes to EOs managed in that store? Maybe I am  
missing something though...


I don't think that I can argue that this makes sense.  :-)  I have  
always wondered why this needed to be like this.  My best guess is  
that it was done as a performance optimization.


Chuck

--
Coming in late 2006 - an introduction to web applications using  
WebObjects and Xcode http://www.global-village.net/wointro


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/products/practical_webobjects





___
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 archive@mail-archive.com


Re: Help with ERJavaMail and system properties

2006-10-10 Thread Dev WO
Sorry to keep on asking help on this one, but it causes me much trouble...I tried to set the properties directly in the ERExtensions.framework Properties file with:er.extensions.ERXApplication.DefaultMessageEncoding=UTF8er.extensions.ERXMessageEncoding.Enabled=truebut it keeps on serving the page in ISO...Some forms seem to also be submitted in ISO which lead to problems with accentuated characters in the database:(No one knows how to force Wonder to use specific properties?ThanksXavierPS: I've got too much things linked to move back from Wonder (and now I'm on it, I really don't want to change...).Hi,I hope someone used to Wonder will be able to help.I seems I'm have global issue regarding parameters.From er.javamail attributes to text encoding...Everything is UTF8 but everything is served using ISOxxx! so I have different rendering issue and my customer get their notification emails with trashed characters:(XavierOK, I tried a couple things:I tried to use ERWOMailDelivery and got the same issue, which led me to believe none of my properties are taken into account (no smtp host, no nothing).I tried only with WOMailDelivery and this time it worked!So here's more details in case it reminds someone about something:Wonder Frameworks linked in my application:-ERJars-ERExtensionsProperties:er.javamail.centralize=false# Centralize sends all emails to the er.javamail.adminEmail user.er.javamail.debugEnabled=true# Determines whether or not email debugging is displayed. This contains protocol-level debug information.er.javamail.adminEmail=REMOVED# The email address of the admin user to send centralized emails to. This is a required property.er.javamail.smtpHost=REMOVED# The SMTP host name to use. If this isn't set, mail.smtp.host will be checked and ultimately WOHost will be used.er.javamail.senderQueue.size=50# The number of messages that the sender queue can hold. Defaults to 50.er.javamail.milliSecondsWaitIfSenderOverflowed=6000# The number of milliseconds to wait if the sender queue is full. Default is 6000.er.javamail.smtpAuth=true# Sets whether or not Authenticated SMTP is used to send outgoing mail. If set, er.javamail.smtpUser MUST also be set (and preferably er.javamail.smtpPassword).er.javamail.smtpUser=REMOVED# The username to use to login to the authenticated SMTP server.er.javamail.smtpPassword=REMOVED# The password to use to login to the authenticated SMTP server.#er.javamail.XMailerHeader =# The X-Mailer header to put into all outgoing mail messages. Defaults to nothing.er.javamail.defaultEncoding=UTF-8# The default character encoding to use for message content. Defaults to ???.That's all I have:(XavierHello Oliver,just tried it (with either a comment # or set it to false), and still got the:java.lang.IllegalArgumentException: When setting 'er.javamail.centralize=true' (which means you just test sending mails), you must also give a valid 'er.javamail.adminEmail=[EMAIL PROTECTED]' to which the mails are sent.hidid you try to set the property directly whitin the Properties File in the ERJavaMail framework?ERJavaMail.framework\Resources\Propertiesbest regardsoliver On 10/9/06, Dev WO <[EMAIL PROTECTED]> wrote: I just added:		System.out.println( "At startup, centralize propertie is: " + System.getProperty( "er.javamail.centralize")); and it returns false!?So I really don't know why I got the error, it seems the properties are overwritten... or not taken into account:(Xavier Hi,I followed the different resources about using ERJavaMail:-the list-Kieran's blog:  http://homepage.mac.com/kelleherk/iblog/C183784902/E2093239404/index.html-Wiki book:  http://en.wikibooks.org/wiki/Programming:WebObjects/Project_WONDER/Frameworks/ERJavaMailSo far I though everything was working as I didn't get any crash, but no email was sent. After a couple adjustments, I was able to get the error:java.lang.IllegalArgumentException: When setting 'er.javamail.centralize=true' (which means you just test sending mails), you must also give a valid ' er.javamail.adminEmail=[EMAIL PROTECTED]' to which the mails are sent.But I've got my Properties like: er.javamail.centralize=false So it make me think probably other properties won't be red too like the smtp host...If I cannot make it read my properties, is there any way to set them directly in my email method? ThanksXavier___ WebObjects-dev mailing list[EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev    ___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/oliver.egger%40gmail.comThis email sent to [EMAIL PROTECTED] -- oliver eggerdienerstr. 75 - 8004 zürich - switzerlandhttp://www.egger-loser.chmobile +41765795005 ___Do not post admin requests to the list. They

Re: roblem with XSLT Trasformations - was problem generating PDF using FOP

2006-10-10 Thread Travis Cripps

Amadeo,

Hi.  I created a sample project from your files, and was initially  
getting the same result, with the characters in the file resulting  
from your transform being messed up.


I changed all instances of String -> byte[] and byte[] -> String  
conversions to specify the character encoding and the resulting xml  
was perfect.


The basic changes were to read the xml and xsl into Strings like this:

String sourceXML = null;
byte[] bytes = WOApplication.application().resourceManager 
().bytesForResourceNamed("sourceXML.xml", null, null);

try {
sourceXML = new String(bytes, "UTF-8");
} catch (UnsupportedEncodingException uee) {
uee.printStackTrace();
}

and to get the result of the transformation like this:

try {
	result = ((ByteArrayOutputStream)((StreamResult)  
output).getOutputStream()).toString("UTF-8");

} catch (UnsupportedEncodingException uee) {
uee.printStackTrace();
}

I've posted the simple project to http://apparentmotion.com/ 
downloadables/XSLTest.zip. (47 KB)


Have a great day.

Travis

On Oct 10, 2006, at 3:36 AM, Amedeo Mantica wrote:


Thank you for reply and collaboration

here the link for dile downloads

http://downloads.insigno.net/fileswo.zip

the sourceXML is the XML data grabbed from database (using  
WebObjects's NSXMLOutputStream)

the file is perfect.  (some /u000d for CR/LF, but I think is ok)

the SimpleTrasformation.xls is an Apple provided XLST file for  
removing unuseful data and simplyfing the XML file.


the destinationXML file is the result of sourceXML trasformed using  
SimpleTrasformation.xml

myTrasformer.java is the routine that do the XSLT trasformation.

see the accented letters in destinationXML file...

___
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 archive@mail-archive.com


Re: Detecting eo changes when they happen

2006-10-10 Thread Florijan Stamenkovic

Hi Robert,



Flor,

I'm not sure if this is a good idea or not, I've never tried this  
myself, but have you looked into registering with EOObserverCenter  
for EOObserving.objectWillChange(Object)?


Maybe it would be possible, in the Swing client scenario where I need  
it. The following code should do it:


public void someEOWillChange(){
new Thread(){
public void run(){
SwingUtilities.invokeLater(new Runnable(){
public void run(){
	...work being done AFTER the event dispatch thread is done, and  
all EO changes are made...

}
});
}
}.start();
}

However, to guarantee that the updating work is being done after EOs  
were changed, the only thread to ever modify EOs would have to be the  
event dispatch thread. I prefer to avoid that restriction, but I will  
give it some thought, thanks for pointing the idea. It should be  
simple, if it works.


Sounds a bit scary to me as far as possibly introducing  
performance, and other various, issues, but just might do the trick  
for you.


Well, it is a client process, and a single user can make changes only  
so fast. I hope it shouldn't be too bad. Optimizations could be made  
not to fire more Swing events then necessary. Still, it's a trip into  
the bowls of EOF, and I am not sure I am up to it :)


Cheers,
Flor

___
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 archive@mail-archive.com


Re: Detecting eo changes when they happen

2006-10-10 Thread Florijan Stamenkovic

Hi Chuck,


If nothing like that exists, I am thinking of implementing it  
through a notification posting EOGenericRecord subclass. Any  
comments or tips about this?


There is a discussion and implementation of what you want in  
Practical WebObjects starting on page 67.  You really need the help  
of the EC.


If I understand it correctly, your editing context subclass posts  
notifications once objects are saved to the persistent data store. I  
need notifications being fired on every edit of any EO in my app, not  
in the persistent store, but in the editing context. I need that to  
fire Swing events, but didn't point that out in my original post.  
And, I need them to fire *after* object(s) have been edited.


How about overriding all takeValue...() methods? Would that be  
inadvisable?


One more question: EOs are not automatically removed from to-many  
relationships after being deleted, even when their delete rule is  
set to nullify. Is this another client side EOClassDescription  
bug, or a standard behavior?


That is standard behavior.  Delete rules are processed as part of  
the preparation work done in saveChanges().  You can call  
ec.processRecentChanges() to force this to happen earllier.


Good to know. Does that make sense? Shouldn't the object store  
reflect the latest changes to EOs managed in that store? Maybe I am  
missing something though...


Thanks,
Flor
___
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 archive@mail-archive.com


Re: Dealing with URLs length

2006-10-10 Thread Miguel Arroz

Hi!

On 2006/10/10, at 21:50, Chuck Hill wrote:

Interesting  I never tried that.  Thanks for the tip!  You just  
have this then?


WebObjectsAlias /WebObjects


  Yap! :) Taking the cgi-bin part out makes the URL look much better!

  Yours

Miguel Arroz

"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.com


___
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 archive@mail-archive.com


[ANN] Cocoa client for Cayenne ROP

2006-10-10 Thread Tore Halset

Hello.

Cayenne[1] ROP[2] (Remote Object Persistence) is sort of equivalent  
to WO/EOF Java Client.


We have also started developing a Cocoa framework[3] that let users  
create Cocoa applications in Objective-C that connects to a server  
with Cayenne using Cayenne ROP. Along with the framework is also a  
sample client application. See screenshot[4].


Most of the basic stuff are working. Cocoa bindings are working.  
Relationship handling with automatic setting of reverse relationships  
the Cayenne way are working. Deleting, Named Queries, Committing and  
Faulting are working. CocoaCayenne also has a custom  
NSArrayController that makes life a lot easier.


The network communication in Cayenne ROP are pluggable, but the  
default implementation uses hessian[5]. CocoaCayenne uses HessianObjC 
[6].


Things to do:
 * Better field validation. Like max string length and better error  
messages.
 * Authentication. Currently username and password are stored in the  
hessian service url.
 * Support for ROP distributed events. Cayenne ROP uses XMPP to  
distribute events between clients.
 * Core Data. CocoaCayenne are working with bindings and  
controllers, but full Core Data support would be cool. I do not know  
if this is possible or even needed..


Regards,
 - Tore.
[1] http://incubator.apache.org/cayenne/
[2] http://cwiki.apache.org/CAYDOC/remote-object-persistence- 
introduction.html

[3] http://cwiki.apache.org/CAY/cocoa-cayenne.html
[4] http://www.pvv.ntnu.no/~halset/tmp/cocoa-client-20060925.png
[5] http://www.caucho.com/hessian/
[6] http://bluebearstudio.com/hessianobjc/
___
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 archive@mail-archive.com


Re: Dealing with URLs length

2006-10-10 Thread Chuck Hill


On Oct 10, 2006, at 1:43 PM, Miguel Arroz wrote:


On 2006/10/10, at 21:07, Chuck Hill wrote:

Is there a way to remove /cgi-bin/WebObjects/my_app_name.woa from  
WebObjects applications default URL with these constraints ?


You can't remove all of it.  You can shorten /cgi-bin/ and / 
my_app_name.woa to something like

/w/WebObjects/a.woa


  From what I can understand from the docs, and from my (short)  
experience, you may remove the cgi-bin part at all. I have some  
stuff delpoyed at server.com/WebObjects/TheApp.woa with no problems.


Interesting  I never tried that.  Thanks for the tip!  You just have  
this then?


WebObjectsAlias /WebObjects


Cheers,

Chuck


--

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/products/practical_webobjects






___
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 archive@mail-archive.com


Re: Dealing with URLs length

2006-10-10 Thread Miguel Arroz

Hi!

On 2006/10/10, at 21:07, Chuck Hill wrote:

Is there a way to remove /cgi-bin/WebObjects/my_app_name.woa from  
WebObjects applications default URL with these constraints ?


You can't remove all of it.  You can shorten /cgi-bin/ and / 
my_app_name.woa to something like

/w/WebObjects/a.woa


  From what I can understand from the docs, and from my (short)  
experience, you may remove the cgi-bin part at all. I have some stuff  
delpoyed at server.com/WebObjects/TheApp.woa with no problems.


  Yours

Miguel Arroz


"The world lies in the hands of evil
 And we pray it would last" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.com




___
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 archive@mail-archive.com


Re: Dealing with URLs length

2006-10-10 Thread Chuck Hill


On Oct 9, 2006, at 9:06 AM, Cantin Benoit wrote:


Dear WO users,

I am dealing with my applications URL length. For different  
reasons, it can't be longer than 100 characters. So I am wondering  
how to shorten my URLs but :

- without using Apache rewrite_mod ;
- and without modifying my Direct Actions names.


Those are some severe restrictions.

Is there a way to remove /cgi-bin/WebObjects/my_app_name.woa from  
WebObjects applications default URL with these constraints ?


You can't remove all of it.  You can shorten /cgi-bin/ and / 
my_app_name.woa to something like

/w/WebObjects/a.woa


I have read that you can change cgi-bin in /System/Library/ 
WebObjects/Adaptors/Apache/apache.conf, but that you can't remove / 
WebObjects/. Is that true ? Are there any other ways to do it ?


You can do it, but you need to edit the adaptor source to do so.   
That might be more effort than it is worth to get rid of 9 characters.

/w/o/a.woa
 You would also need to create a WOContext subclass or use some  
other method to generate the URLs.


Some other ideas:

1. Make aliases for direct actions:

public WOActionResults mrlnAction() {
return myRatherLongNameAction();
}

So you can use a.woa/wa/mrln instead of a.woa/wa/myRatherLongName but  
both will still work


2. Use cookies to store the session ID and instance number if you are  
not doing this already.



Chuck


--

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/products/practical_webobjects






___
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 archive@mail-archive.com


Re: Detecting eo changes when they happen

2006-10-10 Thread Chuck Hill

Hi Florijan,


On Oct 10, 2006, at 9:03 AM, Florijan Stamenkovic wrote:


Hi all,
I am trying to find a way to detect changes eos just *after* they  
happen. If possible the implementation should consider the Author  
object changed, if one of his Books has been unassociated / deleted.


I tried with EOEditingContext notifications, but they are posted  
only at save time. I also could not find anything to fit the  
purpose in Project Wonder, yet.


There is something there, but I forget the name.


If nothing like that exists, I am thinking of implementing it  
through a notification posting EOGenericRecord subclass. Any  
comments or tips about this?


There is a discussion and implementation of what you want in  
Practical WebObjects starting on page 67.  You really need the help  
of the EC.



One more question: EOs are not automatically removed from to-many  
relationships after being deleted, even when their delete rule is  
set to nullify. Is this another client side EOClassDescription bug,  
or a standard behavior?


That is standard behavior.  Delete rules are processed as part of the  
preparation work done in saveChanges().  You can call  
ec.processRecentChanges() to force this to happen earllier.


Chuck


--

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/products/practical_webobjects






___
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 archive@mail-archive.com


Re: Detecting eo changes when they happen

2006-10-10 Thread Robert Walker
Flor,I'm not sure if this is a good idea or not, I've never tried this myself, but have you looked into registering with EOObserverCenter for EOObserving.objectWillChange(Object)?Sounds a bit scary to me as far as possibly introducing performance, and other various, issues, but just might do the trick for you.On Oct 10, 2006, at 12:03 PM, Florijan Stamenkovic wrote:Hi all,I am trying to find a way to detect changes eos just *after* they happen. If possible the implementation should consider the Author object changed, if one of his Books has been unassociated / deleted.I tried with EOEditingContext notifications, but they are posted only at save time. I also could not find anything to fit the purpose in Project Wonder, yet.If nothing like that exists, I am thinking of implementing it through a notification posting EOGenericRecord subclass. Any comments or tips about this?One more question: EOs are not automatically removed from to-many relationships after being deleted, even when their delete rule is set to nullify. Is this another client side EOClassDescription bug, or a standard behavior?ThanksFlor___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/robertwalker1%40mac.comThis email sent to [EMAIL PROTECTED]  --Robert Walker[EMAIL PROTECTED]  ___
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 archive@mail-archive.com

Re: WO On Linux

2006-10-10 Thread Matt Kime

How often is sometimes? What flavor of linux are you using? How many
apps/instances are you running?

I run WO on linux and haven't experienced this problem.

--matt


Hi all,

I was wondering if anyone else is using WO on Linux?  It works great
most of the time, but sometimes it crashes the server which finally
reboots.  The biggest problem is that when the server reboots, WO
starts to load each of the applications and something happens which
stops it after it loads the 2nd or 3rd one.  All the other apps just
keep trying to start and fail.  I have to force restart the
WOServices to fix it.  Anyone seen anything like this?

Regards,
David.
___
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 archive@mail-archive.com


WOUnittest2 Error JavaNoneAdaptor

2006-10-10 Thread Frederico Lellis
Hi all, im have some problems when working with wounittest2, when i run one test here junit show me this error:java.lang.IllegalStateException:
Unable to get the name of the class to instantiate for the adaptor
framework JavaNoneAdaptor. The possible causes for this error are: the
adaptor framework is not installed on your system, the adaptor
framework is not linked into your application, or the info dictionary
for this adaptor is corrupted.
    at com.webobjects.eoaccess.EOAdaptor.classForAdaptorNamed(EOAdaptor.java:273)

    at com.webobjects.eoaccess.EOAdaptor.adaptorWithName(EOAdaptor.java:295)    at com.webobjects.eoaccess.EOAdaptor.adaptorWithModel(EOAdaptor.java

:325)    at com.webobjects.eoaccess.EODatabase.(EODatabase.java:215)

    at com.webobjects.eoaccess.EODatabaseContext.registeredDatabaseContextForModel(EODatabaseContext.java:1110)    at sun.reflect.NativeMethodAccessorImpl.invoke0

(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java

:585)    at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:354)

    at com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java:108)    at com.webobjects.eoaccess.EODatabaseContext._cooperatingObjectStoreNeeded

(EODatabaseContext.java:1289)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java

:25)    at java.lang.reflect.Method.invoke(Method.java:585)    at 
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:120)    at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod

(NSNotificationCenter.java:601)    at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:545)

    at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:575)    at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.requestStore(EOObjectStoreCoordinator.java:213)    at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectStoreForFetchSpecification
(EOObjectStoreCoordinator.java:293)    at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java

:530)    at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4114)

    at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4500)

    at moleque.espacoFisicoFramework.EoPavimento.setNumber(EoPavimento.java:43)    at moleque.espacoFisicoFramework.interfaces.EdificacaoTest.adicionaPavimentoComAndar

(EdificacaoTest.java:31)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java

:25)    at java.lang.reflect.Method.invoke(Method.java:585)    at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)    at org.junit.internal.runners.TestMethodRunner.runUnprotected

(TestMethodRunner.java:81)    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)

    at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)    at org.junit.internal.runners.TestMethodRunner.run

(TestMethodRunner.java:45)    at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)

    at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)    at org.junit.internal.runners.TestClassRunner$1.runUnprotected

(TestClassRunner.java:42)    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)

    at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run

(JUnit4TestReference.java:38)    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)I'm already set JDBC adaptor into eomodel.

someone have any idea?tyPS: Sorry for re-sent message, now the message have the correct topic.-- -- **Frederico L. Albuquerque
\o/ | Moleque de Idéias Educação e Tecnologia Ltda/ \e-mail: [EMAIL PROTECTED][EMAIL PROTECT

Detecting eo changes when they happen

2006-10-10 Thread Florijan Stamenkovic

Hi all,


I am trying to find a way to detect changes eos just *after* they  
happen. If possible the implementation should consider the Author  
object changed, if one of his Books has been unassociated / deleted.


I tried with EOEditingContext notifications, but they are posted only  
at save time. I also could not find anything to fit the purpose in  
Project Wonder, yet.


If nothing like that exists, I am thinking of implementing it through  
a notification posting EOGenericRecord subclass. Any comments or tips  
about this?


One more question: EOs are not automatically removed from to-many  
relationships after being deleted, even when their delete rule is set  
to nullify. Is this another client side EOClassDescription bug, or a  
standard behavior?


Thanks
Flor
___
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 archive@mail-archive.com


MEETING: Reminder - Chicago - CocoaHeads / CAWUG October 10th

2006-10-10 Thread Bob Frank

Hi All,

Just a quick reminder our meeting is tonight.

-Bob


On Oct 4, 2006, at 8:58 AM, Bob Frank wrote:


Hi All,

Just a reminder, the Chicago CocoaHeads / Chicago Cocoa and  
WebObjects User Group (CAWUG) is holding our next meeting this  
coming Tuesday, October 10th, at 6:00 PM at the Apple Store on  
Michigan Ave.



Agenda:
- Introductions & Announcements
- Sal Sorrentino on ObjectCog
- Q & A
- adjournment to O'Toole's

When:   
Tuesday, October 10th, 6:00 PM

Where:
Apple Store Michigan Avenue
679 North Michigan Ave. (at the corner of Huron & Michigan Ave.)
Chicago, IL 60611
		http://maps.yahoo.com/maps_result? 
ed=gYbE5Op_0Tokf_p7h61dwjbWtjC2r1YehzWw&csz=60611



- Sal Sorrentino on ObjectCog for Mac OS X
	Sal will be discussing ObjectCog, a new open-source web  
application server he is developing Mac OS X. It's written in  
Objective-C.  So it can leverage much of the coolness of the Cocoa  
framework.  Some neat features include zero-configuration load  
balancing, integrated persistence layer, standard and user-defined  
tag libraries, MVC server page design (similar to STRUTS), etc...   
To see a coming soon page, visit objectcog.com (really, something  
will be there someday soon).



- C4
We will also discuss C4.  http://c4.rentzsch.com/

- Q&A

- O'Tooles
	We will continue the discussion at our local watering hold Timothy  
O'Toole's at 622 Fairbanks (2 blocks east of the store).



We also wish to thank the folks who run the theater space at the  
Apple store for letting us have our meetings there, Steve Lorenz  
for hosting our listserve, and Jonathan 'Wolf' Rentzsch for hosting  
the new and revived CAWUG web site.  Thanks all.


Also, if you are working on a project and would like to talk about  
it  briefly / promote it, I think it would be fun for people to  
hear about  other people's projects.  Please email me off line and  
you can talk at  a future meeting or would like a book to review.


Future meetings dates: 11/14/2006 & 12/12/2006



CAWUG Resources

Web Site: http://www.cawug.org/
RSS feed: http://www.cawug.org/rss.xml
Mail list: http://mail-lists.xantham.net/mailman/listinfo/cawug
	iCal: http://ical.mac.com/chicagobob/ Chicago-CocoaHeads-CAWUG  
(view on the web)
	iCal: webcal://ical.mac.com/chicagobob/Chicago-CocoaHeads- 
CAWUG.ics (subscribe to in iCal)


Cocoa Heads web site:
http://cocoaheads.org/us/ChicagoIllinois/index.html

Hope to see you at the meeting.

-Bob


___
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 archive@mail-archive.com


Re: roblem with XSLT Trasformations - was problem generating PDF using FOP

2006-10-10 Thread Jean-François Veillette
Make sure that everytime you convert from binary to string you  
specify the encoding.
Same thing when you convert from string to binary, explicitely set  
the encoding.


If you do not specify the encoding, java will use the platform  
default (MacRoman on OSX) to do the conversion.


I haven't looked yet at the source you provided, but it has to be a  
problem like that.  It does sounds like you have a string, get the  
binary, get back to string all that without specifying the encoding.


- jfv

Le 06-10-10 à 10:59, Amedeo Mantica a écrit :


Thaks for collaboration Steve
I tried, but got same identical result
regards
Amedeo

On 10/ott/06, at 16:36, Steve Quirk wrote:




I think your problem may be caused bby converting your XML and XSL  
into Strings instead of leaving them as bytes.


Instead of these lines:
   String xsl = new String(resource_manager.bytesForResourceNamed 
(xslfile, null, null));

   ...
    new StreamSource(new StringReader(xsl)...

Could you try something like:
   InputStream aStream =  
resource_manager.inputStreamForResourceNamed(xslfile, null, null)

   StreamSource xsl = new StreamSource(aStream);

And instead of passing your XML in as a String ("String xml"), use  
the XML Node class.  Then you can set up the transform on the DOM  
directly:


   transformer.transform(new DOMSource(xml), output);

This should remove your character problems.

Steve

On Tue, 10 Oct 2006, Amedeo Mantica wrote:


Thank you for reply and collaboration

here the link for dile downloads

http://downloads.insigno.net/fileswo.zip

the sourceXML is the XML data grabbed from database (using  
WebObjects's NSXMLOutputStream)

the file is perfect.  (some /u000d for CR/LF, but I think is ok)

the SimpleTrasformation.xls is an Apple provided XLST file for  
removing unuseful data and simplyfing the XML file.


the destinationXML file is the result of sourceXML trasformed  
using SimpleTrasformation.xml

myTrasformer.java is the routine that do the XSLT trasformation.

see the accented letters in destinationXML file...

Regards
Amedeo

On 09/ott/06, at 21:23, Travis Cripps wrote:


Hi, Amadeo.
Would you mind sending me your xslt file, your xml file, and a  
sample of the data output by your xml serializer (object->xml  
tag mapping) file?

Travis
On Oct 9, 2006, at 6:08 AM, Amadeo Mantica wrote:

Date: Mon, 9 Oct 2006 11:58:54 +0200
From: Amedeo Mantica <[EMAIL PROTECTED]>
Subject: Need Help - problem with XSLT Trasformations - was  
problem

generating PDF using FOP
To: WebObjects Dev Apple 
Message-ID: <2C76513F-937B-449D- 
[EMAIL PROTECTED]>

Content-Type: text/plain; charset="us-ascii"
Hi all,
I have my data storage on a OpenBase SQL server and data is  
stored un

UTF-8 format.
The web applications works fine ( I overrided the  
appendToResponse,
takeValuesFromRequest and dispatchRequest methods in  
Application.java

for setting the encoding to UTF-8).
You can see my work at:
http://www.ivc.it
http://www.muratti.it
http://www.azimutcoatings.com
http://www.pennellificiopuma.it
http://www.lineabird.it
http://www.lineahex.it
http://www.anticasignoria.it
These are seven websites, but is an unique WebObject applicatiion
that select correct products, graphics, text and css based on
selected site and language.
Now I need to export PDF tacnical sheet of products.
I followed the great Sasha an Chuck's book "Practical  
WebObjects" for

serializing my data in XML format, then trasforming to PDF using
Apache FOP.
Exporting data from EO to XML works fine. First XML become UTF-8
encoded.
When I do  the "SimpleTrasformation" with XSLT provided by Apple
(where the Output Format is set UTF-8), I got bad data  
encoding, and

all accented letters are bad.
Then trasforming again using apache FOP produce really bad  
results.

I tried to do the "SimpleTraformation" using a software (TestXSLT,
http://www.entropy.ch/software/macosx/#testxslt ), a simple  
MacOS X
app that get in input the original XML and the XLST, and  
outputs the

trasformed XML. It works fine, no encoding trouble.
So I think the trouble is inside the Java trasformation engine,  
but I

don't know how to fix.
Can you help me?
Thanks
Regards
Amedeo


___
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/squirk% 
40mac.com


This email sent to [EMAIL PROTECTED]


___
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/ 
jean_francois_veillette%40yahoo.ca


This email sent to [EMAIL PROTECTED]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection 

Re: roblem with XSLT Trasformations - was problem generating PDF using FOP

2006-10-10 Thread Amedeo Mantica

Thaks for collaboration Steve
I tried, but got same identical result
regards
Amedeo

On 10/ott/06, at 16:36, Steve Quirk wrote:




I think your problem may be caused bby converting your XML and XSL  
into Strings instead of leaving them as bytes.


Instead of these lines:
   String xsl = new String(resource_manager.bytesForResourceNamed 
(xslfile, null, null));

   ...
    new StreamSource(new StringReader(xsl)...

Could you try something like:
   InputStream aStream =  
resource_manager.inputStreamForResourceNamed(xslfile, null, null)

   StreamSource xsl = new StreamSource(aStream);

And instead of passing your XML in as a String ("String xml"), use  
the XML Node class.  Then you can set up the transform on the DOM  
directly:


   transformer.transform(new DOMSource(xml), output);

This should remove your character problems.

Steve

On Tue, 10 Oct 2006, Amedeo Mantica wrote:


Thank you for reply and collaboration

here the link for dile downloads

http://downloads.insigno.net/fileswo.zip

the sourceXML is the XML data grabbed from database (using  
WebObjects's NSXMLOutputStream)

the file is perfect.  (some /u000d for CR/LF, but I think is ok)

the SimpleTrasformation.xls is an Apple provided XLST file for  
removing unuseful data and simplyfing the XML file.


the destinationXML file is the result of sourceXML trasformed  
using SimpleTrasformation.xml

myTrasformer.java is the routine that do the XSLT trasformation.

see the accented letters in destinationXML file...

Regards
Amedeo

On 09/ott/06, at 21:23, Travis Cripps wrote:


Hi, Amadeo.
Would you mind sending me your xslt file, your xml file, and a  
sample of the data output by your xml serializer (object->xml tag  
mapping) file?

Travis
On Oct 9, 2006, at 6:08 AM, Amadeo Mantica wrote:

Date: Mon, 9 Oct 2006 11:58:54 +0200
From: Amedeo Mantica <[EMAIL PROTECTED]>
Subject: Need Help - problem with XSLT Trasformations - was problem
generating PDF using FOP
To: WebObjects Dev Apple 
Message-ID: <2C76513F-937B-449D- 
[EMAIL PROTECTED]>

Content-Type: text/plain; charset="us-ascii"
Hi all,
I have my data storage on a OpenBase SQL server and data is  
stored un

UTF-8 format.
The web applications works fine ( I overrided the appendToResponse,
takeValuesFromRequest and dispatchRequest methods in  
Application.java

for setting the encoding to UTF-8).
You can see my work at:
http://www.ivc.it
http://www.muratti.it
http://www.azimutcoatings.com
http://www.pennellificiopuma.it
http://www.lineabird.it
http://www.lineahex.it
http://www.anticasignoria.it
These are seven websites, but is an unique WebObject applicatiion
that select correct products, graphics, text and css based on
selected site and language.
Now I need to export PDF tacnical sheet of products.
I followed the great Sasha an Chuck's book "Practical  
WebObjects" for

serializing my data in XML format, then trasforming to PDF using
Apache FOP.
Exporting data from EO to XML works fine. First XML become UTF-8
encoded.
When I do  the "SimpleTrasformation" with XSLT provided by Apple
(where the Output Format is set UTF-8), I got bad data encoding,  
and

all accented letters are bad.
Then trasforming again using apache FOP produce really bad results.
I tried to do the "SimpleTraformation" using a software (TestXSLT,
http://www.entropy.ch/software/macosx/#testxslt ), a simple MacOS X
app that get in input the original XML and the XLST, and outputs  
the

trasformed XML. It works fine, no encoding trouble.
So I think the trouble is inside the Java trasformation engine,  
but I

don't know how to fix.
Can you help me?
Thanks
Regards
Amedeo


___
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/squirk% 
40mac.com


This email sent to [EMAIL PROTECTED]


___
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 archive@mail-archive.com


WO On Linux

2006-10-10 Thread David Griffith

Hi all,

I was wondering if anyone else is using WO on Linux?  It works great  
most of the time, but sometimes it crashes the server which finally  
reboots.  The biggest problem is that when the server reboots, WO  
starts to load each of the applications and something happens which  
stops it after it loads the 2nd or 3rd one.  All the other apps just  
keep trying to start and fail.  I have to force restart the  
WOServices to fix it.  Anyone seen anything like this?


Regards,
David.
___
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 archive@mail-archive.com


Re: Sending a request to a url but not returning the page to the user

2006-10-10 Thread Dev WO
Hello Mike,thanks for the clarification:)Is there something I should read regarding concurrent request? in case I need it next time:)XavierJust to be clear, your access pattern of calling into App A from App B does not actually require concurrent request handling to be enabled.  It's only when an app connects to itself.  That was a "general warning" rather than one specifically targeted at what you're trying to do.msOn Oct 10, 2006, at 5:55 AM, Dev WO wrote:whoa, Thanks for all the replies and input:)I went for the java.net.URLConnectionand also turned on the concurrentrequesthandling (not sure if this can lead to problem...)Thanks Kieran for the sample code, I'm pretty sure I'll be using it:)XavierTHIS IS A RESEND SINCE MODERATOR STOPPED LAST REPLY FOR 9KB OVER!-Or if you don't want to use concurrent request handling, you can dispatch this request in a thread of its own. That way the request generating this DA request gets completed and thus frees up the ap to answer the spun-off second request. Here is a snippet example from a ScheduledTaskDetail WOComponent where I fire a direct action at my current development instance for testing scheduled task direct actions. devFireEvent is a simple component action invoked by a WOHyperlink and DevFireEvent is an inner class in the WOComponent class. the request associated with invoking devFireEvent completes and returns before the direct action request it spawned gets handled in the run() method of the inner class. Never mind the superfluous details ... but this gives you a way to do it without turning on Concurrent Request Handling if that is something you want not to do. ... note the httpConn.sendRequest and readResponse are in running in the separate thread..HTH, Kieran    /** Usable in development mode only for developer testing.         Must fire the request in a separate thread since this request will        block because AllowsConcurrentRequestHandling is off. */    public WOComponent devFireEvent()    {        Thread devFireEventThread = new DevFireEvent( selectedTaskEvent() );        devFireEventThread.start();                return null;    }        protected class DevFireEvent extends Thread {        protected CTScheduledTaskEvent event;        protected EOEditingContext ec;                public DevFireEvent() {            super();        }                        /** Create a local instance in a manual lock EC */        public DevFireEvent( CTScheduledTaskEvent newEvent ) {            super();            ec = WKEditingContext.createInstance();            ec.lock();            try {                event = (CTScheduledTaskEvent)EOUtilities.localInstanceOfObject( ec, newEvent );            } catch ( Exception e ) {                log.error( "Error creating DevFireEvent with " + WKStringUtilities.toString( newEvent ), e );            } finally {                ec.unlock();            }        }                /** Fire the event */        public void run() {            ec.lock();            try {                int portNumber = ERXProperties.intForKeyWithDefault( "singletonOperations.fireEvent.portNumber", 80 );                String targetHostName = System.getProperty( "singletonOperations.fireEvent.targetHostName" );                                WOHTTPConnection httpConn = new WOHTTPConnection( targetHostName,                                                                  portNumber );                                String url = "" "singletonOperations.fireEvent.baseUrl" );                url = "" + "?keycode=" + event.keycode();                                if ( log.isDebugEnabled() ) log.debug("fireEvent url = ""Apple-style-span" face="Monaco" size="2"> + url );                                WORequest request = new WORequest( "GET", url, "HTTP/1.1",                                                   null,                                                   null,                                                   null );                                httpConn.sendRequest( request );                                WOResponse response = httpConn.readResponse();            }            catch ( Exception e ) {                log.error( "Error firing event " + WKStringUtilities.toString( event ), e );            }            finally {                ec.unlock();            }        }    } On Oct 9, 2006, at 6:01 PM, Mike Schrag wrote:Random tidbit ... Be careful of using this to call back into yourself (i.e. App A connecting back to App A).  You want to make sure you have concurrent request handling turned on or you will deadlock yourself.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/webobjects%40anazys.comThis email sent to [EMAIL PROTECTED]  

Re: Webobjects-dev Digest, Vol 3, Issue 682

2006-10-10 Thread Frederico Lellis
Hi all, im have some problems when working with wounittest2, when i run one test here junit show me this error:java.lang.IllegalStateException: Unable to get the name of the class to instantiate for the adaptor framework JavaNoneAdaptor. The possible causes for this error are: the adaptor framework is not installed on your system, the adaptor framework is not linked into your application, or the info dictionary for this adaptor is corrupted.
    at com.webobjects.eoaccess.EOAdaptor.classForAdaptorNamed(EOAdaptor.java:273)
    at com.webobjects.eoaccess.EOAdaptor.adaptorWithName(EOAdaptor.java:295)    at com.webobjects.eoaccess.EOAdaptor.adaptorWithModel(EOAdaptor.java
:325)    at com.webobjects.eoaccess.EODatabase.(EODatabase.java:215)
    at com.webobjects.eoaccess.EODatabaseContext.registeredDatabaseContextForModel(EODatabaseContext.java:1110)    at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java
:585)    at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:354)
    at com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java:108)    at com.webobjects.eoaccess.EODatabaseContext._cooperatingObjectStoreNeeded
(EODatabaseContext.java:1289)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)    at java.lang.reflect.Method.invoke(Method.java:585)    at 
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:120)    at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod
(NSNotificationCenter.java:601)    at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:545)
    at com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:575)    at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.requestStore(EOObjectStoreCoordinator.java:213)    at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectStoreForFetchSpecification
(EOObjectStoreCoordinator.java:293)    at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java
:530)    at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4114)
    at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4500)
    at moleque.espacoFisicoFramework.EoPavimento.setNumber(EoPavimento.java:43)    at moleque.espacoFisicoFramework.interfaces.EdificacaoTest.adicionaPavimentoComAndar
(EdificacaoTest.java:31)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)    at java.lang.reflect.Method.invoke(Method.java:585)    at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)    at org.junit.internal.runners.TestMethodRunner.runUnprotected
(TestMethodRunner.java:81)    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)    at org.junit.internal.runners.TestMethodRunner.run
(TestMethodRunner.java:45)    at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
    at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)    at org.junit.internal.runners.TestClassRunner$1.runUnprotected
(TestClassRunner.java:42)    at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:38)    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)I'm already set JDBC adaptor into eomodel.
someone have any idea?ty-- **Frederico L. Albuquerque\o/ | Moleque de Idéias Educação e Tecnologia Ltda/ \e-mail: 
[EMAIL PROTECTED][EMAIL PROTECTED]**
 ___

Re: modifying the save method for WO Display Group

2006-10-10 Thread Jerry W. Walker

Hi, Mat,

There are many places you can save the original value of  
transactionptDisplayGroup.selectedObject.passThroughAmt. I often  
override appendToResponse for this.


If you override takeValuesFromRequest, the return from  
super.takeValuesFromRequest, will be the first place that all the  
values entered by the user should be available to you. Before you  
return from the overriding method, you can do all the arithmetic you  
want to those values. However, don't do anything that will change the  
structure of the template, since invokeAction hasn't yet been called.


Regards,
Jerry

On Oct 9, 2006, at 5:36 PM, [EMAIL PROTECTED] wrote:

I would like to know how to add a little math to the save method of  
a Display Group.


I am using a display group to access records for modifying.  The  
returned records are displayed in Strings and one to be edited is  
displayed in a Field.  The user will enter a number into the field  
and invoke the save component:


public WOComponent saveChanges()
   {
   try {
   this.session().defaultEditingContext().saveChanges();
   } catch (Exception e) {  // could be more specific...
   NSLog.err.appendln( "ViewEditInformation: saveChanges:   
save error: " + e.getMessage() );
   msg = "There was an error saving your changes: " +  
e.getMessage();

   return null;
   }
   msg = "Changes saved.";
   return null;
   }

The value they are modifying is called  
"transactionptDisplayGroup.selectedObject.passThroughAmt".  I would  
like to know how to take the user's entered value and add 15 to it  
prior to the save.  Then I would like to take the value of  
"transactionptDisplayGroup.selectedObject.passThroughAmt" before  
their edit and subtract from it the value the user entered with the  
added 15 and set the value of another field of the displayed group,  
"transactionptDisplayGroup.selectedObject.salonPtRec".   Finally, I  
would like to save the results to the DB.


Any help would be nice.  Thanks,
--Mat
__ 
__
Check out the new AOL.  Most comprehensive set of free safety and  
security tools, free access to millions of high-quality videos from  
across the web, free AOL Mail and more.


___
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/jerrywwalker% 
40gmail.com


This email sent to [EMAIL PROTECTED]



--
__ Jerry W. Walker,
   WebObjects Developer/Instructor for High Performance Industrial  
Strength Internet Enabled Systems


[EMAIL PROTECTED]
203 278-4085office



___
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 archive@mail-archive.com


Re: Framework import [Solved]

2006-10-10 Thread Logi Helgu

Extensive cleaning( and restarting Eclipse ) finally solved this( must have
been cached somewhere and leading to the duplicate import ).

Thanx Hörður :)


On 10/9/06 8:12 PM, "Hordur Thordarson" <[EMAIL PROTECTED]> wrote:

> Is the framework included by any other frameworks ?
>
> Your problem is exactly what I see when I forget to change my
> classpath between debugging and deployment settings, such that my
> frameworks end up being included more than once in the classpath.
>
> Hörður Þ.
> Lausn hugbúnaður ehf
> Tel. +354-534-5005 / +354-699-1068
> Web: http://www.lausn.is
>
>
>
> On 9.10.2006, at 16:52, Logi Helgu wrote:
>
>>
>> Tried that earlier but no luck :(
>>
>> Before I included the framework by adding in in the configuration
>> for "WO
>> Frameworks".  Removing in from there didn't to nothing for me,
>> cleaned( and
>> even reststarted ) but still the NSBundle excpetion.  And the
>> framework is
>> not in the "Libraries" tab.
>>
>>
>> On 10/9/06 4:13 PM, "Hordur Thordarson" <[EMAIL PROTECTED]> wrote:
>>
>>> Hi Logi,
>>>
>>> Remove the framework from the Libraries tab in Java Build Path.  It
>>> must only be in either Libraries or Projects, not both.
>>>
>>> Rgds,
>>>
>>> Hörður Þ.
>>> Lausn hugbúnaður ehf
>>> Tel. +354-534-5005 / +354-699-1068
>>> Web: http://www.lausn.is
>>>
>>>
>>>
>>> On 9.10.2006, at 15:31, Logi Helgu wrote:
>>>
 Added the framework to my project via the "Java Build Path" -
 "Projects"
 since this seems the only way to enable "Open Declaration" on my
 framework
 classes in Eclipse( this might be where I'm getting things wrong
 since I've
 added a Framework here but not another project ).

 Trying to lunch this leads to:

 ... A fatal exception occurred: null
 ... java.lang.ExceptionInInitializerError
 at
 com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys
 (WOProper
 ties.java:187)
 at
 com.webobjects.appserver.WOApplication._initWOApp
 (WOApplication.java:5081)
 at com.webobjects.appserver.WOApplication.
 (WOApplication.java:551)
 at Application.(Application.java:25)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0
 (Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance
 (NativeConstructorAcces
 sorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance
 (DelegatingConstruc
 torAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:
 494)
 at java.lang.Class.newInstance0(Class.java:350)
 at java.lang.Class.newInstance(Class.java:303)
 at com.webobjects.appserver.WOApplication.main
 (WOApplication.java:323)
 at Application.main(Application.java:22)
 Caused by: java.lang.IllegalStateException:
  warning: There is already a
 unique
 instance for Bundle named 'MyFramework'.  Use
 NSBundle.bundleForName(MyFramework) to access it...

 Any ideas on this or the right way to enable "Open Declaration" into
 framework classes?

 With well-being and veneration,
 Logi Helgu




 Fyrirvari á tölvupósti / e-mail disclaimer
 http://www.us.is/page/fyrirvari";>http://www.us.is/page/
 fyrirvari

>>>
>>>  ___
>>> 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/logi%40us.is
>>>
>>> This email sent to [EMAIL PROTECTED]
>>
>>
>> Með vegsemd og virðingu,
>>
>> Logi Helgu
>> Umferðarstofa
>>
>>
>>
>>
>> Fyrirvari á tölvupósti / e-mail disclaimer
>> http://www.us.is/page/fyrirvari";>http://www.us.is/page/
>> fyrirvari
>


Með vegsemd og virðingu,

Logi Helgu
Umferðarstofa




Fyrirvari á tölvupósti / e-mail disclaimer
http://www.us.is/page/fyrirvari";>http://www.us.is/page/fyrirvari
 ___
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 archive@mail-archive.com


Job opportunity on the Gold Coast (Australia).

2006-10-10 Thread Q
The Gold Coast based ISP I work for, OntheNet, is currently on the lookout for a competent developer for a full time internal developer position. A good working knowledge of OO, SQL DBs + ORM and Unix are vital, familiarity with WebObjects is highly desirable. This isn't technically a WebObjects developer role as it would involve a variety of technologies, but WebObjects is the direction we are in the process of moving to, so I thought this list might be a good place to look.If you think you might be interested contact me offline and/or send me your resume to [EMAIL PROTECTED].-- Seeya...QQuinton Dolan - [EMAIL PROTECTED]Gold Coast, QLD, AustraliaPh: +61 419 729 806  ___
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 archive@mail-archive.com

Re: Sending a request to a url but not returning the page to the user

2006-10-10 Thread Mike Schrag
Just to be clear, your access pattern of calling into App A from App B does not actually require concurrent request handling to be enabled.  It's only when an app connects to itself.  That was a "general warning" rather than one specifically targeted at what you're trying to do.msOn Oct 10, 2006, at 5:55 AM, Dev WO wrote:whoa, Thanks for all the replies and input:)I went for the java.net.URLConnectionand also turned on the concurrentrequesthandling (not sure if this can lead to problem...)Thanks Kieran for the sample code, I'm pretty sure I'll be using it:)XavierTHIS IS A RESEND SINCE MODERATOR STOPPED LAST REPLY FOR 9KB OVER!-Or if you don't want to use concurrent request handling, you can dispatch this request in a thread of its own. That way the request generating this DA request gets completed and thus frees up the ap to answer the spun-off second request. Here is a snippet example from a ScheduledTaskDetail WOComponent where I fire a direct action at my current development instance for testing scheduled task direct actions. devFireEvent is a simple component action invoked by a WOHyperlink and DevFireEvent is an inner class in the WOComponent class. the request associated with invoking devFireEvent completes and returns before the direct action request it spawned gets handled in the run() method of the inner class. Never mind the superfluous details ... but this gives you a way to do it without turning on Concurrent Request Handling if that is something you want not to do. ... note the httpConn.sendRequest and readResponse are in running in the separate thread..HTH, Kieran    /** Usable in development mode only for developer testing.         Must fire the request in a separate thread since this request will        block because AllowsConcurrentRequestHandling is off. */    public WOComponent devFireEvent()    {        Thread devFireEventThread = new DevFireEvent( selectedTaskEvent() );        devFireEventThread.start();                return null;    }        protected class DevFireEvent extends Thread {        protected CTScheduledTaskEvent event;        protected EOEditingContext ec;                public DevFireEvent() {            super();        }                        /** Create a local instance in a manual lock EC */        public DevFireEvent( CTScheduledTaskEvent newEvent ) {            super();            ec = WKEditingContext.createInstance();            ec.lock();            try {                event = (CTScheduledTaskEvent)EOUtilities.localInstanceOfObject( ec, newEvent );            } catch ( Exception e ) {                log.error( "Error creating DevFireEvent with " + WKStringUtilities.toString( newEvent ), e );            } finally {                ec.unlock();            }        }                /** Fire the event */        public void run() {            ec.lock();            try {                int portNumber = ERXProperties.intForKeyWithDefault( "singletonOperations.fireEvent.portNumber", 80 );                String targetHostName = System.getProperty( "singletonOperations.fireEvent.targetHostName" );                                WOHTTPConnection httpConn = new WOHTTPConnection( targetHostName,                                                                  portNumber );                                String url = "" "singletonOperations.fireEvent.baseUrl" );                url = "" + "?keycode=" + event.keycode();                                if ( log.isDebugEnabled() ) log.debug("fireEvent url = ""Apple-style-span" face="Monaco" size="2"> + url );                                WORequest request = new WORequest( "GET", url, "HTTP/1.1",                                                   null,                                                   null,                                                   null );                                httpConn.sendRequest( request );                                WOResponse response = httpConn.readResponse();            }            catch ( Exception e ) {                log.error( "Error firing event " + WKStringUtilities.toString( event ), e );            }            finally {                ec.unlock();            }        }    } On Oct 9, 2006, at 6:01 PM, Mike Schrag wrote:Random tidbit ... Be careful of using this to call back into yourself (i.e. App A connecting back to App A).  You want to make sure you have concurrent request handling turned on or you will deadlock yourself.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/webobjects%40anazys.comThis email sent to [EMAIL PROTECTED]  ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsub

Re: To lock() or not to lock()

2006-10-10 Thread Kieran Kelleher

Ricardo,

Also, always make sure you use try-finally to make sure the ec is  
unlocked, otherwise an error condition might branch out and deadlock  
your EOF stack. (Of course, you can stick a catch in there aswell to  
report the error)


ec.lock();
try {
...
...
} finally {
ec.unlock();
}


On Oct 10, 2006, at 1:07 AM, Chuck Hill wrote:



On Oct 9, 2006, at 3:39 PM, Ricardo Parada wrote:


Hi All,

I have an EOF question regarding locking.  The documentation on  
the EOEditingContext lock() method says the following:


---
Locks access to this EOEditingContext to prevent other threads  
from accessing it. If it has a shared editing context, this  
EOEditingContext takes a reader lock on it as well. You should  
lock an editing context when you are accessing or modifying  
objects managed by the editing context. The thread safety provided  
by Enterprise Objects Framework allows you to have one thread to  
be active in each EOEditingContext and one thread to be active in  
each EODatabaseContext (EOAccess). In other words, multiple  
threads can access and modify objects concurrently in different  
editing contexts, but only one thread can access the database at a  
time (to save, fetch, or fault).

---

My interpretation of this is that I can have thread1 working in  
one editing context and thread2 working in a second editing  
context.  These two editing contexts by default share the eoaccess  
level objects to access the database.  So when either thread calls  
the EOEditingContext saveChanges() or objectsWithFetchSpecification 
() to fetch objects then EOF obtains a lock to prevent the other  
thread from accessing the eoaccess layer and doing a save/fetch at  
the same time.


So it would seem to me that thread1 and thread2 do not need to  
worry about locking their editing context when they are using  
them.   I would have to worry about locking an editing context  
only if I were to have separate threads working on the same  
editing context.  Are these assumptions valid?


No, not at all.  Fetches, saves, etc send notifications to the  
editing contexts in other threads.



Or should I lock the editing contexts?


As Art indicated - yes!

Chuck



___
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 archive@mail-archive.com


Re: roblem with XSLT Trasformations - was problem generating PDF using FOP

2006-10-10 Thread Amedeo Mantica

Thank you for reply and collaboration

here the link for dile downloads

http://downloads.insigno.net/fileswo.zip

the sourceXML is the XML data grabbed from database (using  
WebObjects's NSXMLOutputStream)

the file is perfect.  (some /u000d for CR/LF, but I think is ok)

the SimpleTrasformation.xls is an Apple provided XLST file for  
removing unuseful data and simplyfing the XML file.


the destinationXML file is the result of sourceXML trasformed using  
SimpleTrasformation.xml

myTrasformer.java is the routine that do the XSLT trasformation.

see the accented letters in destinationXML file...

Regards
Amedeo

On 09/ott/06, at 21:23, Travis Cripps wrote:


Hi, Amadeo.

Would you mind sending me your xslt file, your xml file, and a  
sample of the data output by your xml serializer (object->xml tag  
mapping) file?


Travis

On Oct 9, 2006, at 6:08 AM, Amadeo Mantica wrote:


Date: Mon, 9 Oct 2006 11:58:54 +0200
From: Amedeo Mantica <[EMAIL PROTECTED]>
Subject: Need Help - problem with XSLT Trasformations - was problem
generating PDF using FOP
To: WebObjects Dev Apple 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Hi all,

I have my data storage on a OpenBase SQL server and data is stored un
UTF-8 format.

The web applications works fine ( I overrided the appendToResponse,
takeValuesFromRequest and dispatchRequest methods in Application.java
for setting the encoding to UTF-8).

You can see my work at:

http://www.ivc.it
http://www.muratti.it
http://www.azimutcoatings.com
http://www.pennellificiopuma.it
http://www.lineabird.it
http://www.lineahex.it
http://www.anticasignoria.it

These are seven websites, but is an unique WebObject applicatiion
that select correct products, graphics, text and css based on
selected site and language.

Now I need to export PDF tacnical sheet of products.

I followed the great Sasha an Chuck's book "Practical WebObjects" for
serializing my data in XML format, then trasforming to PDF using
Apache FOP.

Exporting data from EO to XML works fine. First XML become UTF-8
encoded.

When I do  the "SimpleTrasformation" with XSLT provided by Apple
(where the Output Format is set UTF-8), I got bad data encoding, and
all accented letters are bad.

Then trasforming again using apache FOP produce really bad results.

I tried to do the "SimpleTraformation" using a software (TestXSLT,
http://www.entropy.ch/software/macosx/#testxslt ), a simple MacOS X
app that get in input the original XML and the XLST, and outputs the
trasformed XML. It works fine, no encoding trouble.

So I think the trouble is inside the Java trasformation engine, but I
don't know how to fix.

Can you help me?
Thanks
Regards
Amedeo


___
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 archive@mail-archive.com


Re: Help with ERJavaMail and system properties

2006-10-10 Thread Dev WO
Hi,I hope someone used to Wonder will be able to help.I seems I'm have global issue regarding parameters.From er.javamail attributes to text encoding...Everything is UTF8 but everything is served using ISOxxx! so I have different rendering issue and my customer get their notification emails with trashed characters:(XavierOK, I tried a couple things:I tried to use ERWOMailDelivery and got the same issue, which led me to believe none of my properties are taken into account (no smtp host, no nothing).I tried only with WOMailDelivery and this time it worked!So here's more details in case it reminds someone about something:Wonder Frameworks linked in my application:-ERJars-ERExtensionsProperties:er.javamail.centralize=false# Centralize sends all emails to the er.javamail.adminEmail user.er.javamail.debugEnabled=true# Determines whether or not email debugging is displayed. This contains protocol-level debug information.er.javamail.adminEmail=REMOVED# The email address of the admin user to send centralized emails to. This is a required property.er.javamail.smtpHost=REMOVED# The SMTP host name to use. If this isn't set, mail.smtp.host will be checked and ultimately WOHost will be used.er.javamail.senderQueue.size=50# The number of messages that the sender queue can hold. Defaults to 50.er.javamail.milliSecondsWaitIfSenderOverflowed=6000# The number of milliseconds to wait if the sender queue is full. Default is 6000.er.javamail.smtpAuth=true# Sets whether or not Authenticated SMTP is used to send outgoing mail. If set, er.javamail.smtpUser MUST also be set (and preferably er.javamail.smtpPassword).er.javamail.smtpUser=REMOVED# The username to use to login to the authenticated SMTP server.er.javamail.smtpPassword=REMOVED# The password to use to login to the authenticated SMTP server.#er.javamail.XMailerHeader =# The X-Mailer header to put into all outgoing mail messages. Defaults to nothing.er.javamail.defaultEncoding=UTF-8# The default character encoding to use for message content. Defaults to ???.That's all I have:(XavierHello Oliver,just tried it (with either a comment # or set it to false), and still got the:java.lang.IllegalArgumentException: When setting 'er.javamail.centralize=true' (which means you just test sending mails), you must also give a valid 'er.javamail.adminEmail=[EMAIL PROTECTED]' to which the mails are sent.hidid you try to set the property directly whitin the Properties File in the ERJavaMail framework?ERJavaMail.framework\Resources\Propertiesbest regardsoliver On 10/9/06, Dev WO <[EMAIL PROTECTED]> wrote: I just added:		System.out.println( "At startup, centralize propertie is: " + System.getProperty( "er.javamail.centralize")); and it returns false!?So I really don't know why I got the error, it seems the properties are overwritten... or not taken into account:(Xavier Hi,I followed the different resources about using ERJavaMail:-the list-Kieran's blog:  http://homepage.mac.com/kelleherk/iblog/C183784902/E2093239404/index.html-Wiki book:  http://en.wikibooks.org/wiki/Programming:WebObjects/Project_WONDER/Frameworks/ERJavaMailSo far I though everything was working as I didn't get any crash, but no email was sent. After a couple adjustments, I was able to get the error:java.lang.IllegalArgumentException: When setting 'er.javamail.centralize=true' (which means you just test sending mails), you must also give a valid ' er.javamail.adminEmail=[EMAIL PROTECTED]' to which the mails are sent.But I've got my Properties like: er.javamail.centralize=false So it make me think probably other properties won't be red too like the smtp host...If I cannot make it read my properties, is there any way to set them directly in my email method? ThanksXavier___ WebObjects-dev mailing list[EMAIL PROTECTED] http://www.omnigroup.com/mailman/listinfo/webobjects-dev    ___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/oliver.egger%40gmail.comThis email sent to [EMAIL PROTECTED] -- oliver eggerdienerstr. 75 - 8004 zürich - switzerlandhttp://www.egger-loser.chmobile +41765795005 ___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/webobjects%40anazys.comThis email sent to [EMAIL PROTECTED]  ___
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 archive@mail-archive.com

Re: Sending a request to a url but not returning the page to the user

2006-10-10 Thread Dev WO
whoa, Thanks for all the replies and input:)I went for the java.net.URLConnectionand also turned on the concurrentrequesthandling (not sure if this can lead to problem...)Thanks Kieran for the sample code, I'm pretty sure I'll be using it:)XavierTHIS IS A RESEND SINCE MODERATOR STOPPED LAST REPLY FOR 9KB OVER!-Or if you don't want to use concurrent request handling, you can dispatch this request in a thread of its own. That way the request generating this DA request gets completed and thus frees up the ap to answer the spun-off second request. Here is a snippet example from a ScheduledTaskDetail WOComponent where I fire a direct action at my current development instance for testing scheduled task direct actions. devFireEvent is a simple component action invoked by a WOHyperlink and DevFireEvent is an inner class in the WOComponent class. the request associated with invoking devFireEvent completes and returns before the direct action request it spawned gets handled in the run() method of the inner class. Never mind the superfluous details ... but this gives you a way to do it without turning on Concurrent Request Handling if that is something you want not to do. ... note the httpConn.sendRequest and readResponse are in running in the separate thread..HTH, Kieran    /** Usable in development mode only for developer testing.         Must fire the request in a separate thread since this request will        block because AllowsConcurrentRequestHandling is off. */    public WOComponent devFireEvent()    {        Thread devFireEventThread = new DevFireEvent( selectedTaskEvent() );        devFireEventThread.start();                return null;    }        protected class DevFireEvent extends Thread {        protected CTScheduledTaskEvent event;        protected EOEditingContext ec;                public DevFireEvent() {            super();        }                        /** Create a local instance in a manual lock EC */        public DevFireEvent( CTScheduledTaskEvent newEvent ) {            super();            ec = WKEditingContext.createInstance();            ec.lock();            try {                event = (CTScheduledTaskEvent)EOUtilities.localInstanceOfObject( ec, newEvent );            } catch ( Exception e ) {                log.error( "Error creating DevFireEvent with " + WKStringUtilities.toString( newEvent ), e );            } finally {                ec.unlock();            }        }                /** Fire the event */        public void run() {            ec.lock();            try {                int portNumber = ERXProperties.intForKeyWithDefault( "singletonOperations.fireEvent.portNumber", 80 );                String targetHostName = System.getProperty( "singletonOperations.fireEvent.targetHostName" );                                WOHTTPConnection httpConn = new WOHTTPConnection( targetHostName,                                                                  portNumber );                                String url = "" "singletonOperations.fireEvent.baseUrl" );                url = "" + "?keycode=" + event.keycode();                                if ( log.isDebugEnabled() ) log.debug("fireEvent url = ""Apple-style-span" face="Monaco" size="2"> + url );                                WORequest request = new WORequest( "GET", url, "HTTP/1.1",                                                   null,                                                   null,                                                   null );                                httpConn.sendRequest( request );                                WOResponse response = httpConn.readResponse();            }            catch ( Exception e ) {                log.error( "Error firing event " + WKStringUtilities.toString( event ), e );            }            finally {                ec.unlock();            }        }    } On Oct 9, 2006, at 6:01 PM, Mike Schrag wrote:Random tidbit ... Be careful of using this to call back into yourself (i.e. App A connecting back to App A).  You want to make sure you have concurrent request handling turned on or you will deadlock yourself.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/webobjects%40anazys.comThis email sent to [EMAIL PROTECTED]  ___
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 archive@mail-archive.com

Tomcat By SW 3.2

2006-10-10 Thread Jeremy Matthews
...has been released. Changes include:Updated Tomcat to version 5.5.17 (more than 200+ changes)Updated ANT to v. 1.6.5Updated AXIS components to v. 1.4Updated commons-collections to v. 3.2Updated commons-dbcp to v. 1.2.1Added FrontBase 4.2.6 (Complete Package; you must obtain your own free license at www.frontbase.com)Updated iText .jar to v. 1.4.2Updated Javamail .jar to v. 1.4Updated jaf .jar to v. 1.1Updated JFreeChart .jar to v. 1.0.2Updated JUnit .jar to v. 4.1Updated Lucerne .jar to v. 2.0Updated commons-logging .jar to v. 1.1Updated Log4J.jar to v. 1.2.14Updated MySQL JDBC connector to v. 5.0.3Added MySQL GUI ToolsUpdated OpenBase JDBC connectorUpdated Oracle JDBC connectorUpdated MySQL JDBC connector to v. 8.2dev-503Added PostgreSQL GUI ToolsUpdated Starter And Stopper to reflect new directory pathwaysAdded Project Wonder FrameWorks, Examples, and Applications (For WebObjects Developers)Updated Tomcat Manger for preferences, streamlined appearance, and optimization/bugfixesDL:http://www.versiontracker.com/dyn/moreinfo/macosx/27151http://www.macupdate.com/info.php/id/18567Feedback welcome!Thanks,jeremy ___
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 archive@mail-archive.com