I turned on debug and it seems that the exception is related to "opening new JDBC connection".
This happens when a result is returned from the query
Therefore it seems that a connection was made with the database
and I'm not sure why this exception is thrown.
Any help would be greatly appreciated.
Code:
DEBUG [main] (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] (ConnectionManager.java:421) - opening JDBC connection
DEBUG [main] (DriverManagerConnectionProvider.java:109) - opening new JDBC connection
DEBUG [main] (JDBCExceptionReporter.java:69) - Cannot open connection [???]
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
Code:
INFO [main] (CustomerImpl.java:72) - Query is "Select c from Customer c where c.paddleNumber = :paddleNumber "
DEBUG [main] (SessionImpl.java:220) - opened session at timestamp: 12689668195
DEBUG [main] (QueryTranslatorImpl.java:246) - parse() - HQL: Select c from com.charityauctionhelp.auctioncheckoutpro.model.Customer c where c.paddleNumber = :paddleNumber
DEBUG [main] (QueryTranslatorImpl.java:266) - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| +-[FROM] 'from'
| | \-[RANGE] 'RANGE'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[DOT] '.'
| | | | | | +-[IDENT] 'com'
| | | | | | \-[IDENT] 'charityauctionhelp'
| | | | | \-[IDENT] 'auctioncheckoutpro'
| | | | \-[IDENT] 'model'
| | | \-[IDENT] 'Customer'
| | \-[ALIAS] 'c'
| \-[SELECT] 'Select'
| \-[IDENT] 'c'
\-[WHERE] 'where'
\-[EQ] '='
+-[DOT] '.'
| +-[IDENT] 'c'
| \-[IDENT] 'paddleNumber'
\-[COLON] ':'
\-[IDENT] 'paddleNumber'
DEBUG [main] (ErrorCounter.java:68) - throwQueryException() : no errors
DEBUG [main] (HqlSqlBaseWalker.java:111) - select << begin [level=1, statement=select]
DEBUG [main] (FromElement.java:108) - FromClause{level=1} : com.charityauctionhelp.auctioncheckoutpro.model.Customer (c) -> customer0_
DEBUG [main] (FromReferenceNode.java:51) - Resolved : c -> customer0_.CustomerID
DEBUG [main] (FromReferenceNode.java:51) - Resolved : c -> customer0_.CustomerID
DEBUG [main] (DotNode.java:568) - getDataType() : paddleNumber -> org.hibernate.type.IntegerType@7038b9
DEBUG [main] (FromReferenceNode.java:51) - Resolved : c.paddleNumber -> customer0_.PaddleNumber
DEBUG [main] (HqlSqlBaseWalker.java:117) - select : finishing up [level=1, statement=select]
DEBUG [main] (HqlSqlWalker.java:509) - processQuery() : ( SELECT ( {select clause} customer0_.CustomerID ) ( FromClause{level=1} Customers customer0_ ) ( where ( = ( customer0_.PaddleNumber customer0_.CustomerID paddleNumber ) ? ) ) )
DEBUG [main] (JoinProcessor.java:148) - Using FROM fragment [Customers customer0_]
DEBUG [main] (HqlSqlBaseWalker.java:123) - select >> end [level=1, statement=select]
DEBUG [main] (QueryTranslatorImpl.java:232) - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (Customers)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'
| +-[ALIAS_REF] IdentNode: 'customer0_.CustomerID as CustomerID10_' {alias=c, className=com.charityauctionhelp.auctioncheckoutpro.model.Customer, tableAlias=customer0_}
| \-[SQL_TOKEN] SqlFragment: 'customer0_.Address1 as Address2_10_, customer0_.Address2 as Address3_10_, customer0_.Attendee1 as Attendee4_10_, customer0_.Attendee2 as Attendee5_10_, customer0_.Attendee3 as Attendee6_10_, customer0_.City as City10_, customer0_.Classification as Classifi8_10_, customer0_.Company as Company10_, customer0_.Email as Email10_, customer0_.FirstName as FirstName10_, customer0_.IfExpress as IfExpress10_, customer0_.LastName as LastName10_, customer0_.MiddleName as MiddleName10_, customer0_.PaddleNumber as PaddleN15_10_, customer0_.PartnerFirstName as Partner16_10_, customer0_.PartnerLastName as Partner17_10_, customer0_.PartnerMiddleName as Partner18_10_, customer0_.PartnerTitle as Partner19_10_, customer0_.Payment as Payment10_, customer0_.Phone as Phone10_, customer0_.Sponsor as Sponsor10_, customer0_.State as State10_, customer0_.TableNumber as TableNu24_10_, customer0_.Title as Title10_, customer0_.Zip as Zip10_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[c], fromElementByTableAlias=[customer0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
| \-[FROM_FRAGMENT] FromElement: 'Customers customer0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=c,role=null,tableName=Customers,tableAlias=customer0_,origin=null,colums={,className=com.charityauctionhelp.auctioncheckoutpro.model.Customer}}
\-[WHERE] SqlNode: 'where'
\-[EQ] BinaryLogicOperatorNode: '='
+-[DOT] DotNode: 'customer0_.PaddleNumber' {propertyName=paddleNumber,dereferenceType=4,propertyPath=paddleNumber,path=c.paddleNumber,tableAlias=customer0_,className=com.charityauctionhelp.auctioncheckoutpro.model.Customer,classAlias=c}
| +-[ALIAS_REF] IdentNode: 'customer0_.CustomerID' {alias=c, className=com.charityauctionhelp.auctioncheckoutpro.model.Customer, tableAlias=customer0_}
| \-[IDENT] IdentNode: 'paddleNumber' {originalText=paddleNumber}
\-[NAMED_PARAM] ParameterNode: '?' {name=paddleNumber, expectedType=org.hibernate.type.IntegerType@7038b9}
DEBUG [main] (ErrorCounter.java:68) - throwQueryException() : no errors
DEBUG [main] (QueryTranslatorImpl.java:216) - HQL: Select c from com.charityauctionhelp.auctioncheckoutpro.model.Customer c where c.paddleNumber = :paddleNumber
DEBUG [main] (QueryTranslatorImpl.java:217) - SQL: select customer0_.CustomerID as CustomerID10_, customer0_.Address1 as Address2_10_, customer0_.Address2 as Address3_10_, customer0_.Attendee1 as Attendee4_10_, customer0_.Attendee2 as Attendee5_10_, customer0_.Attendee3 as Attendee6_10_, customer0_.City as City10_, customer0_.Classification as Classifi8_10_, customer0_.Company as Company10_, customer0_.Email as Email10_, customer0_.FirstName as FirstName10_, customer0_.IfExpress as IfExpress10_, customer0_.LastName as LastName10_, customer0_.MiddleName as MiddleName10_, customer0_.PaddleNumber as PaddleN15_10_, customer0_.PartnerFirstName as Partner16_10_, customer0_.PartnerLastName as Partner17_10_, customer0_.PartnerMiddleName as Partner18_10_, customer0_.PartnerTitle as Partner19_10_, customer0_.Payment as Payment10_, customer0_.Phone as Phone10_, customer0_.Sponsor as Sponsor10_, customer0_.State as State10_, customer0_.TableNumber as TableNu24_10_, customer0_.Title as Title10_, customer0_.Zip as Zip10_ from Customers customer0_ where customer0_.PaddleNumber=?
DEBUG [main] (ErrorCounter.java:68) - throwQueryException() : no errors
DEBUG [main] (AbstractBatcher.java:366) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG [main] (ConnectionManager.java:421) - opening JDBC connection
DEBUG [main] (DriverManagerConnectionProvider.java:109) - opening new JDBC connection
DEBUG [main] (JDBCExceptionReporter.java:69) - Cannot open connection [???]
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLGetConnectOption(JdbcOdbc.java:3427)
at sun.jdbc.odbc.JdbcOdbcConnection.getTransactionIsolation(JdbcOdbcConnection.java:1046)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:115)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
at com.az.auctionsync.model.CustomerImpl.executeQuery(CustomerImpl.java:84)
at com.az.auctionsync.main.AuctionSync.test(AuctionSync.java:60)
at com.az.auctionsync.main.AuctionSync.main(AuctionSync.java:54)
WARN [main] (JDBCExceptionReporter.java:77) - SQL Error: 106, SQLState: S1C00
ERROR [main] (JDBCExceptionReporter.java:78) - [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
DEBUG [main] (ConnectionManager.java:404) - aggressively releasing JDBC connection
DEBUG [main] (AbstractEntityManagerImpl.java:425) - mark transaction for rollback
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:107)
at com.az.auctionsync.model.CustomerImpl.executeQuery(CustomerImpl.java:84)
at com.az.auctionsync.main.AuctionSync.test(AuctionSync.java:60)
at com.az.auctionsync.main.AuctionSync.main(AuctionSync.java:54)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
... 3 more
Caused by: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLGetConnectOption(JdbcOdbc.java:3427)
at sun.jdbc.odbc.JdbcOdbcConnection.getTransactionIsolation(JdbcOdbcConnection.java:1046)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:115)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 17 more