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

error messages are not helpful #46

Closed
snehlsen opened this issue Nov 20, 2018 · 1 comment
Closed

error messages are not helpful #46

snehlsen opened this issue Nov 20, 2018 · 1 comment
Assignees

Comments

@snehlsen
Copy link
Contributor

Error messages are not helpful with the current JDBC adapter (version 1.1.0), e.g.:
If the connection I am using in a virtual schema is broken, I get this error message:

[Code: 0, SQL State: 22002]  VM error: 
java.lang.Exception: Unexpected error in adapter for following request: {
	"schemaMetadataInfo" : 
	{
		"name" : "VIRTUAL_EXASOL",
		"properties" : 
		{
			"CONNECTION_NAME" : "EXASOLV6",
			"EXA_CONNECTION_STRING" : "10.48.106.23:42627",
			"IMPORT_FROM_EXA" : "true",
			"SCHEMA_NAME" : "TEST_SCHEMA",
			"SQL_DIALECT" : "EXASOL"
		}
	},
	"type" : "createVirtualSchema"
}
Response: 
Stack trace:
com.exasol.adapter.jdbc.JdbcAdapter.adapterCall(JdbcAdapter.java:70)
 (Session: 1617565938970599020)

Which is totally useless and unclear without looking at the logfiles.

In version 1.0.1 I get a backtrace, which make the error message useful:

[Code: 0, SQL State: 22002]  VM error: 
java.lang.Exception: Unexpected error in adapter: Connection refused (Connection refused)
Stacktrace: com.exasol.jdbc.ConnectFailed: Connection refused (Connection refused)
	at com.exasol.jdbc.AbstractEXAConnection.setupConnection(AbstractEXAConnection.java:1295)
	at com.exasol.jdbc.AbstractEXAConnection.Connect(AbstractEXAConnection.java:1177)
	at com.exasol.jdbc.AbstractEXAConnection.<init>(AbstractEXAConnection.java:435)
	at com.exasol.jdbc.EXAConnection.<init>(EXAConnection.java:38)
	at com.exasol.jdbc.EXADriver.connect(EXADriver.java:159)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:208)
	at com.exasol.adapter.jdbc.JdbcMetadataReader.establishConnection(JdbcMetadataReader.java:88)
	at com.exasol.adapter.jdbc.JdbcMetadataReader.readRemoteMetadata(JdbcMetadataReader.java:33)
	at com.exasol.adapter.jdbc.JdbcAdapter.readMetadata(JdbcAdapter.java:110)
	at com.exasol.adapter.jdbc.JdbcAdapter.readMetadata(JdbcAdapter.java:102)
	at com.exasol.adapter.jdbc.JdbcAdapter.handleCreateVirtualSchema(JdbcAdapter.java:96)
	at com.exasol.adapter.jdbc.JdbcAdapter.adapterCall(JdbcAdapter.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.exasol.ExaWrapper.runSingleCall(ExaWrapper.java:95)

For following request: {
	"schemaMetadataInfo" : 
	{
		"name" : "VIRTUAL_EXASOL",
		"properties" : 
		{
			"CONNECTION_NAME" : "EXASOLV6",
			"EXA_CONNECTION_STRING" : "10.48.106.23:42627",
			"IMPORT_FROM_EXA" : "true",
			"SCHEMA_NAME" : "TEST_SCHEMA",
			"SQL_DIALECT" : "EXASOL"
		}
	},
	"type" : "createVirtualSchema"
}
Response: 
Stack trace:
com.exasol.adapter.jdbc.JdbcAdapter.adapterCall(JdbcAdapter.java:90)
 (Session: 1617565938970599020)
@snehlsen snehlsen self-assigned this Nov 23, 2018
andrehacker pushed a commit that referenced this issue Nov 26, 2018
added stack trace to error message for easier problem analysis
narmion pushed a commit that referenced this issue Nov 28, 2018
* Fix for #46 (Improve error message) (#51)

* changed version to 1.1.2
@snehlsen
Copy link
Contributor Author

Fixed in v1.1.2

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

No branches or pull requests

1 participant