You might try searching SVN's history at
http://fisheye4.cenqua.com/browse/appfuse.

Later versions of AppFuse don't have SQL in their security file.

Matt


On 9/3/07, Rob Hills <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Summary:
>
> Appfuse + Webwork 1.9.4, Tomcat 5.5, Postgresql 8.2 - simple Appfuse webapp
> works
> fine (using container managed authentication).
>
> Appfuse + Webwork 1.8.4, Tomcat 5.5, Acegi security - app (I've inherited)
> works fine
> against an Oracle DB, but I can't login with the same app pointing at a
> Postgres DB.
>
> Error "Bad SQL grammar" and "org.postgresql.util.PSQLException: ERROR:
> operator
> does not exist: boolean = integer;"
>
>
> Details:
>
> I have inherited a web application that's partly finished and I have the
> task of finishing it
> off.  It's been built with AppFuse and Webwork (version 1.9.3 AFAICT).  This
> is my first
> project with AppFuse, though I'm a relatively experienced J2EE developer.
>
> In my development environment, I'm deploying to Tomcat 5.5 and Postgresql.
> The
> client's production environment has Tomcat 5.5 and Oracle.
>
> The application deployed to the production environment (by the previous
> developer)
> works fine and I can login.  I've downloaded AppFuse 1.9. built a simple
> test app
> (following the excellent tutorials) which runs fine against Postgres - I can
> login.
>
> However, when I build my proper application against the Postgres database, I
> can't
> login.  After much sleuthing, I've established that it's using Acegi
> security whereas the
> default for Appfuse 1.9.x appears to be Container Managed.  The problem
> appears to
> be with the SQL used in the applicationContext-security.xml file.  The SQL
> that is
> causing the problem is:
>
> SELECT u.username,u.password,u.enabled FROM users u, company c WHERE
> u.username = ? AND c.id = u.company_id AND u.enabled = 1
>
> The specific issue seems to be with the "u.enabled = 1" part, Postgres won't
> accept
> that as a valid expression because it won't cast the 1 literal to a boolean.
>
> I've tried to download a fresh copy of applicationContext-security.xml so I
> can see if my
> predecessor modified the original SQL (possibly to make it work with
> Oracle), however,
> the links to it on
> http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseAuthentication
> are unfortunately broken.  I've done a bit of a hunt through the appfuse svn
> repository,
> but couldn't locate it there.
>
> So, my questions are:
>
> 1.    Has this SQL been changed from the original in applicationContext-
> security.xml
> 2.    Is it possible to get a copy of the original
> applicationContext-security.xml from
> somewhere.
>
> Cheers,
> Rob Hills
> Waikiki, Western Australia
> Mobile +61 (412) 904-357
> Fax: +61 (8) 9529-2137
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to