MongoDB 2.2.5 upgrade issue with special character in db name - mongodb

I just upgraded to 2.2.5 version. My old data with 2.0.2 had database name with special character : in the name.
After upgrade, when I am fetching data from that db, I am getting following error
assertion 16256 Invalid ns [bcxb:queryTest.system.namespaces] ns:bcxb:queryTest.system.namespaces
This is happening for all m database name having special character :
Please help.

Related

transform_geom: couldn't parse proj4 output string: projection not named

I recently upgraded my Amazon PostgreSQL RDS to version 10.3 but while fetching the projections I am getting error:
ERROR: transform_geom: couldn't parse proj4 output string: '3857': projection not named
CONTEXT: SQL function "st_transform" statement 1
Same records i am able to fetch prior to version 9.5.xx
My PostGIS version is 2.4.2 which is compatible to RDS intance.
I perhaps faced the same problem after upgrading from postgis 2.2 to 2.3, some of my queries did no work anymore.
Old-query:
SELECT ST_X(ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT($1,$2),$3),$4));
query-params $1...$4:
602628,6663367,3857,3857
error message:
"transform_geom: couldn't parse proj4 output string: '3857': projection not named"
Reason:
ST_TRANSFORM comes in multiple flavours, two of them:
public.st_transform(geometry, integer)
public.st_transform(geometry, text)
Latter one, I assume new in postgis 2.3, caused my problem, because $4 (3857) was regarded as (proj4-) string and not as (SRID-) integer.
Workaround in my case: type-hint for param $4
SELECT ST_X(ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT($1,$2),$3),$4::int));

Custom module stuck while upgrading in odoo

I am upgrading custom module in ODOO and on production server, I updated code and restarted odoo server. But when I try to upgrade custom module then its stucks on
creating or updating database tables
On local server it's work fine.
Here is log of server:
loading 1 modules...
1 modules loaded in 0.02s, 0 queries
loading 54 modules...
INFO openerp.models: Missing many2one field definition for _inherits reference "content_id" in "iris.series", using default one.
INFO openerp.models: Missing many2one field definition for _inherits reference "video_id" in "iris.ad_video", using default one.
INFO openerp.models: Missing many2one field definition for _inherits reference "content_id" in "iris.video", using default one.
WARNING openerp.models: Field definition for _inherits reference "user_id" in "iris.advertiser" must be marked as "required" with ondelete="cascade" or "restrict", forcing it to required + cascade.
INFO openerp.models: Missing many2one field definition for _inherits reference "stats_id" in "iris.store_playback_stats", using default one.
WARNING openerp.models: Field definition for _inherits reference "user_id" in "iris.store_owner" must be marked as "required" with ondelete="cascade" or "restrict", forcing it to required + cascade.
INFO openerp.models: Missing many2one field definition for _inherits reference "category_id" in "iris.business_category", using default one.
INFO openerp.models: Missing many2one field definition for _inherits reference "video_id" in "iris.partner_video", using default one.
INFO openerp.models: Missing many2one field definition for _inherits reference "category_id" in "iris.content_category", using default one.
WARNING openerp.models: Field definition for _inherits reference "user_id" in "iris.content_partner" must be marked as "required" with ondelete="cascade" or "restrict", forcing it to required + cascade.
WARNING openerp.models: Field definition for _inherits reference "user_id" in "iris.subtitler" must be marked as "required" with ondelete="cascade" or "restrict", forcing it to required + cascade.
INFO openerp.modules.module: module module_name: creating or updating database tables
I am getting these WARNING messages since beginning of module installation but module was upgraded. But now its stuck on creating or updating database tables on production server not on local server.
Database is postgresql on production and local servers.
What can be issue? I had research on it but did not got anything relevant.
Edit 1
user_id = fields.Many2one('res.users')
Edit 2
I have installed a custom module which also use base modules of odoo. I made XML and .py changes and upgraded custom module and some time server stuck at same point and then restart server then it does not stuck. Now I also added model in .py and updated XML and whenever I upgrade my custom module it stucks at same point. Even I can't install any new module.
As you said above, having issue while upgrading and installation of the module it takes time. You can debug the process by logging in to the database and fire this query so here you need to check the locks which are running on Postgres will tell you about how your module taking a lot of time to updating.
Query:
select psa.query from pg_locks as pg left join pg_stat_activity as psa on pg.pid=psa.pid where psa.datname='database_name';

Bad value for type timestamp on production server

I'm working with: seam 2.2.2 + hibernate + richfaces + jboss 5.1 + postgreSQL
I have an module which needs to load some data from the database. Easy. The problem is, on development it works fine, 100%, but when I deploy on my production server and try to get the data, an error rise:
could not read column value from result set: fechahor9_504_; Bad value for type timestamp : [C#122e5cf
SQL Error: 0, SQLState: 22007
Bad value for type timestamp : [C#122e5cf
javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute query
[more errors]
Caused by: org.postgresql.util.PSQLException: Bad value for type timestamp : [C#122e5cf
at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:232)
[more errors]
Caused by: java.lang.NumberFormatException: Trailing junk on timestamp: ''
at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:226)
I can't understand why it works on my machine (development) and why not on production. Any clues? Anyone gone through the same problem? Is exactly the same compilation
Stefano Travelli was right. I was checking the jBoss on production and there was an old jdbc driver on [jboss_dir]/common/lib from an old jwebstart application (not developed by me). Deleted that jdbc and it works fine. I should check if the old application is still needed and if so, check if it still works without the jdbc being there or with an upgraded version.
Not sure what the driver story is ..
but the problem for me show up when JDBC tries to parse bigint from the DB to
myOjbect.setDate(Date date){...}
the other "JDBC friendly" is ignorred for some reason .
myOjbect.setDate(long date){...}
So .. removing the Date setter and leaving a long one resolves the problem.
This is a Big workaround .. but may help someone out there :)

Pyodbc utf-8 bind param error With FreeTDS and unixODBC

FreeTDS version 0.82
unixODBC version 2.3.0
pyodbc version 2.1.8
freetds.conf:
tds version = 7.0
client charset = UTF-8
using Servername in the odbc.ini (which for some crazed reason made a difference in getting unixODBC to recognize the client charset in freetds)
I'm able to pull utf8 data correctly and can update with the string inline ie:
UPDATE table
SET col = N'私はトカイ大好き'
WHERE id = 182333369
But
text = u'私はトカイ大好き'
cursor.execute("""
UPDATE table
SET column = ?
WHERE id = 182333369
""", text)
Fails with:
pyodbc.Error: ('HY004', '[HY004] [FreeTDS][SQL Server]
Invalid data type (0) (SQLBindParameter)')
If I add:
text = text.encode('utf-8')
I get the following error:
pyodbc.ProgrammingError: ('42000', '[42000] [FreeTDS][SQL Server]The incoming tabular data stream (TDS) protocol stream is incorrect. The stream ended unexpectedly. (4002) (SQLExecDirectW)')
Any ideas as to where things have gone astray?
Unicode support was reworked in pyodbc 3.0.x. Try testing with the latest source (3.0.2-beta02, etc.)

Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])

Whenever I connect to HSQLDB from my application deployed on JBoss 5.1, it throws exception as : Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: error in script file line: 1 Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE]) .
My HSQLDB script file reads something as below :
`SET DATABASE UNIQUE NAME HSQLDB2E0BAD63B3
SET DATABASE GC 0
SET DATABASE DEFAULT RESULT MEMORY ROWS 0
SET DATABASE EVENT LOG LEVEL 0
.....`
Does anyone have idea what thos exception means or should I change something in my HSQLDB configuration?
Regards,
Satya
Your database files are created with version 2.x, but the version of database engine running on JBoss 5.1 is 1.8.x. You should be able to replace the hsqldb.jar in the JBoss configuration with a new version.