[Spacewalk-list] Can't Create New Channel

Tomas Lestach tlestach at redhat.com
Tue Jul 30 07:53:30 UTC 2013


I would say your schema isn't in a very good shape.

last_modified column of the rhnChannel table has a 'default' set to current_timestamp:

    last_modified       timestamp with local time zone
                            DEFAULT (current_timestamp) NOT NULL,

so, you should not fail on last_modified being null.


What does
# echo '\d rhnChannel' | spacewalk-sql --select-mode - | grep last_modified
say?


Regards,
--
Tomas Lestach
Red Hat Satellite Engineering, Red Hat


----- Original Message -----
> After converting from Oracle to PostgreSQL I can't create new channels.
> 
> It appears some column is set to null when there is a constraint on nulls for
> that column.
> 
> ==> /var/log/tomcat5/catalina.out <==
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string description
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string GPGKeyUrl
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string GPGKeyId
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string GPGKeyFp
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string maintainerName
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string
> maintainerEmail
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string
> maintainerPhone
> 2013-07-28 21:04:47,633 [TP-Processor5] WARN
> com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object
> com.redhat.rhn.domain.channel.Channel is setting empty string supportPolicy
> 2013-07-28 21:04:47,648 [TP-Processor5] WARN
> org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 23502
> 2013-07-28 21:04:47,648 [TP-Processor5] ERROR
> org.hibernate.util.JDBCExceptionReporter - ERROR: null value in column
> "last_modified" violates not-null constraint
> 2013-07-28 21:04:47,650 [TP-Processor5] ERROR
> org.hibernate.event.def.AbstractFlushingEventListener - Could not
> synchronize database state with session
> org.hibernate.exception.ConstraintViolationException: could not insert:
> [com.redhat.rhn.domain.channel.Channel]
> 
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list