Re: Connection to Postgresql...
Re: Connection to Postgresql...
- Subject: Re: Connection to Postgresql...
- From: Michael Andronov <email@hidden>
- Date: Fri, 11 Dec 2009 15:08:12 -0500
Following your advice, I make some progress ( I guess :) ).
Consequently new questions appeared:
1. About WONDER build.
- clean my machine from previous attempts to install Wonder...
- got the sources via svn. ( At least, my previous experience with svn
helped...)
- put them into /opt/WonderLatest;
- build via ant.
- create the project as Wonder Application.
- verified that I'm using my built Wonder frameworks.
2. first new question:
When I am running my new wonder project, I can see something like:
"...
at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1211)
...
"
I assume, that now I should be able to see the source too.... But
for some reason, I do not see it...
"Change Attached Source" is pointing to
/Library/Frameworks/ERExtensions.framework/Resources/Java/ERExtensions.jar
And it is indeed the file, which was put there as result of my Wonder build.
Should I add any configuration?
Should I add any flag during the build?
3. Second new question about application itself, and failure to read
the database:
A WONDE logging provides more details on what is going on:
"...
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - Using JDBCPlugIn
'com.webobjects.jdbcadaptor.PostgresqlPlugIn' for
JDBCAdaptor@419984078
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - Using JDBCPlugIn
'com.webobjects.jdbcadaptor.PostgresqlPlugIn' for
JDBCAdaptor@1550947483
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - connecting with
dictionary: {driver = "org.postgresql.Driver"; password = "<password
deleted for log>"; username = "michael"; URL =
"jdbc:postgresql://127.0.0.1/webtest"; }
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - fetching JDBC Info with
JDBCContext@1775562421
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - connecting with
dictionary: {driver = "org.postgresql.Driver"; password = "<password
deleted for log>"; username = "michael"; URL =
"jdbc:postgresql://127.0.0.1/webtest"; }
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - === Begin Internal Transaction
Dec 11 14:22:35 WTWonder[52800] DEBUG NSLog - evaluateExpression:
<com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT t0.idx FROM
weather t0 WHERE t0.idx like ?::int4 ESCAPE '|' ORDER BY t0.idx ASC"
withBindings: 1:"%"(idx)>
Dec 11 14:22:35 WTWonder[52800] INFO
er.transaction.adaptor.Exceptions - Database Exception occured: N/A
Dec 11 14:22:35 WTWonder[52800] WARN NSLog -
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
N/A
Dec 11 14:22:35 WTWonder[52800] ERROR
er.extensions.appserver.ERXApplication - Exception caught: The
attribute idx should be assigned a Number, but the value was the
String "%"
...
"
First, I confirmed that there is a column idx within the database:
webtest=# select idx from weather;
idx
-----
33
68
72
(3 rows)
Secondly, Chuck was probably right saying that I am trying to mix
different types. Probably the mistake is within my application code:
My intention within the code below, to extract all values within idx
column. But obviously I'm missing something since the exception is
generated.
"
public WOComponent searchDB() {
NSArray<EOSortOrdering> sortOrdering = new
NSArray<EOSortOrdering>(new EOSortOrdering("idx",
EOSortOrdering.CompareAscending ));
String[] argArray = new String[1];
argArray[0] ="*";
NSArray<String> args = new NSArray<String>(argArray);
EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat("idx LIKE %@",args);
resultsList = Cities.fetchCITIESs(session().defaultEditingContext(),
qualifier, sortOrdering);
return context().page();
}
"
Thanks for all help and advice.
Michael.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden