Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361879 - eglx.persistence.sql.SQLException No current connection with simple GET
Summary: eglx.persistence.sql.SQLException No current connection with simple GET
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 23:09 EDT by Will Smythe CLA
Modified: 2017-02-23 14:16 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Smythe CLA 2011-10-24 23:09:35 EDT
I am getting the same exception with both a Derby and DB2 database when doing a simple "get" statement (using 10/24 build). Here is the EGL function:

  s SQLDataSource?{@Resource{bindingkey = "NewDerby"}};	
  customers Customer[];
  get customers from s with #sql{select * from customer where state = 'NC' };

The customers array gets populated correctly (the exception does not cause the statement to fail), but an exception is displayed:

No current connection.: [sqlstate:08003][sqlcode:40,000]
eglx.persistence.sql.SQLException No current connection.: [sqlstate:08003][sqlcode:40,000]
	at eglx.lang.AnyException.fillInStackTrace(AnyException.java:187)
	at java.lang.Throwable.<init>(Throwable.java:181)
	at java.lang.Exception.<init>(Unknown Source)
	at java.lang.RuntimeException.<init>(Unknown Source)
	at eglx.lang.AnyException.<init>(AnyException.java:32)
	at eglx.persistence.sql.SQLException.<init>(SQLException.java:25)
	at org.eclipse.edt.javart.util.JavartUtil.makeEglException(JavartUtil.java:281)
	at eglx.persistence.sql.SQLDataSource.commit(SQLDataSource.java:94)
	at org.eclipse.edt.javart.resources.ResourceManager.commit(ResourceManager.java:63)
	at org.eclipse.edt.javart.resources.RunUnitBase.commit(RunUnitBase.java:218)
	at org.eclipse.edt.javart.resources.RunUnitBase.endRunUnit(RunUnitBase.java:282)
	at org.eclipse.edt.javart.services.servlet.JsonRpcInvoker.invokeEglService(JsonRpcInvoker.java:90)

..

Caused by: java.sql.SQLNonTransientConnectionException: No current connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.setupContextStack(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
	at eglx.persistence.sql.SQLDataSource.commit(SQLDataSource.java:91)
	... 24 more
Comment 1 Joseph Vincens CLA 2011-10-25 08:41:39 EDT
The datasources were not being removed from the run unit on exit.
fixed
Comment 2 Will Smythe CLA 2011-11-02 00:11:23 EDT
Looks good.