PSQLException operator does not exist bytea

7,011 views
Skip to first unread message

Valentin Churavy

unread,
Nov 11, 2013, 12:45:22 AM11/11/13
to activate-p...@googlegroups.com
I am getting the following error using activate-framework with Postgresql 9.3-1100-jdbc4, play 2.2.1 and  activate-play 1.4.4, the call creating that exception comes from securesocial.ws 2.2.0 any ideas what might happen here?

[error] play - Cannot invoke the action, eventually got an error: org.postgresql.util.PSQLException: ERROR: operator does not exist: bytea = character varying
 
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 
Position: 47
[error] application -


! @6g8h7h03c - Internal server error, for (POST) [/signup] ->


play
.api.Application$$anon$1: Execution exception[[PSQLException: ERROR: operator does not exist: bytea = character varying
 
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 
Position: 47]]
 at play
.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1]
 at play
.api.DefaultApplication.handleError(Application.scala:399) [play_2.10-2.2.1.jar:2.2.1]
 at play
.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10-2.2.1.jar:2.2.1]
 at play
.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10-2.2.1.jar:2.2.1]
 at scala
.Option.map(Option.scala:145) [scala-library.jar:na]
 at play
.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2.applyOrElse(PlayDefaultUpstreamHandler.scala:261) [play_2.10-2.2.1.jar:2.2.1]
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: bytea = character varying
 
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
 
Position: 47
 at org
.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) ~[postgresql-9.3-1100-jdbc4.jar:na]
 at org
.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) ~[postgresql-9.3-1100-jdbc4.jar:na]
 at org
.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.3-1100-jdbc4.jar:na]
 at org
.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560) ~[postgresql-9.3-1100-jdbc4.jar:na]
 at org
.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[postgresql-9.3-1100-jdbc4.jar:na]
 at org
.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) ~[postgresql-9.3-1100-jdbc4.jar:na]

Valentin Churavy

unread,
Nov 11, 2013, 4:20:56 AM11/11/13
to activate-p...@googlegroups.com
The call originates by the way from a query like this select[User] where(_.email :== email) where _.email = Option[String] and the db column is _.column[Option[String]]("email"). Maybe my column definition is off?

Flavio W. Brasil

unread,
Nov 11, 2013, 4:23:47 AM11/11/13
to Valentin Churavy, activate-p...@googlegroups.com
Hi Valentin,

The migration should use the String type directly, not Option[String]. For the migrations, Activate doesn't the concept of optional values, since null must is used.

Regards,

-- 
Flavio W. Brasil

--
You received this message because you are subscribed to the Google Groups "Activate Persistence Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activate-persist...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Felipe Peko

unread,
Nov 11, 2013, 6:27:32 AM11/11/13
to Flavio W. Brasil, Valentin Churavy, activate-p...@googlegroups.com
Hi Flavio and Valentin, i think i had the same exact problem with email property. See issue #71

Can you try 1.5-SNAPSHOT to see if your problem is fixed? 

Valentin Churavy

unread,
Nov 11, 2013, 6:38:28 AM11/11/13
to Felipe Peko, Flavio W. Brasil, activate-p...@googlegroups.com
So my problem was definitely caused by using Option[String] in the migration after fixing that it works now. But using Option[] Should probably cause an exception somewhere. 


2013/11/11 Felipe Peko <feli...@gmail.com>

Flavio W. Brasil

unread,
Nov 11, 2013, 6:53:47 AM11/11/13
to Valentin Churavy, Felipe Peko, activate-p...@googlegroups.com
Hi Valentin,

Yes, maybe it should be allowed and used to define if the created columns are nullable or not.
Could you open an issue for this?

Thanks!

-- 
Flavio W. Brasil

Reply all
Reply to author
Forward
0 new messages