Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find JDBC type '2003' in PostgreSQL column type #3104

Closed
xilipilige opened this issue Sep 24, 2019 · 9 comments
Closed

Cannot find JDBC type '2003' in PostgreSQL column type #3104

xilipilige opened this issue Sep 24, 2019 · 9 comments

Comments

@xilipilige
Copy link

xilipilige commented Sep 24, 2019

sharding-proxy 4.0.0.RC
postgresql 10.4

when i use the sharding-proxy manage two node pg server
the console log show that
image

image

@dongzl
Copy link
Contributor

dongzl commented Sep 25, 2019

Hi @xilipilige , can you show more detail information about this problem, for example table structure.

@xilipilige
Copy link
Author

Hi @xilipilige , can you show more detail information about this problem, for example table structure.

CREATE TABLE public.device (
device_id bigint NOT NULL,
device_name varchar NULL,
tenant_id bigint NULL,
CONSTRAINT device_pk PRIMARY KEY (device_id)
)
WITH (
OIDS=FALSE
) ;

@dongzl
Copy link
Contributor

dongzl commented Oct 18, 2019

Hi @xilipilige , I'm sorry I didn't reply to you in time.

Do you describe more details, the execute SQL and so on.

@terrymanu
Copy link
Member

Will close soon if no update anymore.

@RaigorJiang
Copy link
Contributor

The problem reproduced, I am looking for a cause.

@dongzl
Copy link
Contributor

dongzl commented Nov 15, 2019

The problem reproduced, I am looking for a cause.

Hi @RaigorJiang , can you describe the reproduced process?

@RaigorJiang
Copy link
Contributor

Yes, I prepared an environment like #3419 , then use Navicat (version 11.2.18) or DBeaver (version 6.0.0) to connect to Proxy(version 4.0.0-RC3), and the Exception occur.

image

@RaigorJiang
Copy link
Contributor

Error Log is :

line 1:24 mismatched input 'session_user' expecting {'U', 'u', '!', '~', '+', '-', '(', '{', '?', INSERT, UPDATE, DELETE, ALTER, DROP, TRUNCATE, SCHEMA, REVOKE, ADD, SET, INDEX, KEY, FUNCTION, TRIGGER, PROCEDURE, CASE, CAST, IF, NOT, NULL, TRUE, FALSE, EXISTS, BEGIN, COMMIT, ROLLBACK, SAVEPOINT, BOOLEAN, CHAR, INTERVAL, TIME, TIMESTAMP, LOCALTIME, LOCALTIMESTAMP, YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, MAX, MIN, SUM, COUNT, AVG, CURRENT, ENABLE, DISABLE, INSTANCE, PRESERVE, DEFINER, SQL, CASCADED, LOCAL, CLOSE, OPEN, NEXT, NAME, NAMES, INTEGER, REAL, DECIMAL, TYPE, ADMIN, BINARY, ESCAPE, EXCLUDE, PARTITION, ROW, UNKNOWN, ALWAYS, CASCADE, GENERATED, ISOLATION, LEVEL, OPTION, PRIVILEGES, READ, ROLE, ROWS, START, TRANSACTION, ACTION, CACHE, CHARACTERISTICS, CLUSTER, COMMENTS, CONSTRAINTS, CURRENT_TIMESTAMP, CYCLE, DATA, DATABASE, DEFAULTS, DEFERRED, DEPENDS, DOMAIN, EXCLUDING, EXECUTE, EXTENDED, EXTENSION, EXTERNAL, EXTRACT, FILTER, FIRST, FOLLOWING, FORCE, GLOBAL, IDENTITY, IMMEDIATE, INCLUDING, INCREMENT, INDEXES, INHERIT, INHERITS, INCLUDE, LANGUAGE, LARGE, LAST, LOGGED, MAIN, MATCH, MAXVALUE, MINVALUE, NOTHING, NULLS, OBJECT, OIDS, OVER, OWNED, OWNER, PARTIAL, PLAIN, PRECEDING, RANGE, RENAME, REPLICA, RESET, RESTART, RESTRICT, ROUTINE, RULE, SECURITY, SEQUENCE, SESSION, SHOW, SIMPLE, STATISTICS, STORAGE, TABLESPACE, TEMP, TEMPORARY, UNBOUNDED, UNLOGGED, USAGE, VALID, VALIDATE, WITHIN, WITHOUT, ZONE, OF, GROUPS, RECURSIVE, IDENTIFIER_, STRING_, NUMBER_, HEX_DIGIT_, BIT_NUM_} [ERROR] 14:12:34.778 [pool-11-thread-1] o.a.s.s.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Cannot find JDBC type '2003' in PostgreSQL column type at org.apache.shardingsphere.shardingproxy.transport.postgresql.constant.PostgreSQLColumnType.valueOfJDBCType(PostgreSQLColumnType.java:187) at org.apache.shardingsphere.shardingproxy.transport.postgresql.packet.command.query.PostgreSQLColumnDescription.<init>(PostgreSQLColumnDescription.java:48) at org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.bind.PostgreSQLComBindExecutor.getPostgreSQLColumnDescriptions(PostgreSQLComBindExecutor.java:118) at org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.bind.PostgreSQLComBindExecutor.createQueryPacket(PostgreSQLComBindExecutor.java:106) at org.apache.shardingsphere.shardingproxy.frontend.postgresql.command.query.binary.bind.PostgreSQLComBindExecutor.execute(PostgreSQLComBindExecutor.java:89) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

@tuohai666
Copy link
Member

Duplicated with #6232 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants