We help IT Professionals succeed at work.

Missing Sequence from Eclipse Hibernate Project

ptreves
ptreves asked
on
Hello,

I am getting the following stack trace when trying to execute a JUnit Test Class from the Eclipse Console.

0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.0.SP1
16 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
16 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
16 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
47 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
47 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
94 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : Account.hbm.xml
156 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.Account -> ACCOUNT
172 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.Account.accountOwners -> ACCOUNT_ACCOUNT_OWNER
187 [main] INFO org.hibernate.cfg.HbmBinder - Mapping subclass: courses.hibernate.vo.SavingsAccount -> ACCOUNT
187 [main] INFO org.hibernate.cfg.HbmBinder - Mapping subclass: courses.hibernate.vo.CheckingAccount -> ACCOUNT
187 [main] INFO org.hibernate.cfg.HbmBinder - Mapping subclass: courses.hibernate.vo.CdAccount -> ACCOUNT
187 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : AccountOwner.hbm.xml
203 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.AccountOwner -> ACCOUNT_OWNER
203 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.AccountOwner.accounts -> ACCOUNT_ACCOUNT_OWNER
203 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : AccountTransaction.hbm.xml
218 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.AccountTransaction -> ACCOUNT_TRANSACTION
250 [main] INFO org.hibernate.cfg.HbmBinder - Mapping joined-subclass: courses.hibernate.vo.PhysicalAccountTransaction -> PHYSICAL_ACCOUNT_TRANSACTION
250 [main] INFO org.hibernate.cfg.HbmBinder - Mapping joined-subclass: courses.hibernate.vo.ElectronicAccountTransaction -> ELECTRONIC_ACCOUNT_TRANSACTION
250 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : EBill.hbm.xml
265 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.EBill -> EBILL
265 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : EBiller.hbm.xml
281 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.EBiller -> EBILLER
281 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : EBillerRegistration.hbm.xml
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: courses.hibernate.vo.EBillerRegistration -> ACCOUNT_EBILLER
296 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.Account.ebillerRegistrations -> ACCOUNT_EBILLER
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.Account.accountTransactions -> ACCOUNT_TRANSACTION
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.Account.ebills -> EBILL
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.EBiller.ebillerRegistrations -> ACCOUNT_EBILLER
296 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: courses.hibernate.vo.EBiller.ebills -> EBILL
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 1
328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
343 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:XE
343 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=lecture5, password=****}
452 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
452 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0XE
468 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
468 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
468 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
468 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
468 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
468 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
468 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
468 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
468 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
468 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
468 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
468 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
468 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
468 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
499 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
655 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
Hibernate: select hibernate_sequence.nextval from dual
764 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2289, SQLState: 42000
764 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02289: sequence does not exist

Hibernate: select hibernate_sequence.nextval from dual
780 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2289, SQLState: 42000
780 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02289: sequence does not exist

Hibernate: select hibernate_sequence.nextval from dual
780 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2289, SQLState: 42000
780 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02289: sequence does not exist

Hibernate: select hibernate_sequence.nextval from dual
780 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2289, SQLState: 42000
780 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02289: sequence does not exist

Hibernate: select hibernate_sequence.nextval from dual
780 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 2289, SQLState: 42000
780 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02289: sequence does not exist


I am using a Oracle XE and have created a sequence object as follows:

CREATE SEQUENCE HIBERNATE_SEQUENCE START WITH 1 INCREMENT BY 1;

Why do I get the oracle error saying the sequence does not exist ?

Paolo
Comment
Watch Question

655 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured

its just a warning you can ignore this message.

check this link

http://www.myeclipseide.com/PNphpBB2-viewtopic-t-5286.html
Commented:
Now I am getting the following stack trace:


java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at courses.hibernate.dao.OracleAccountDAO.getConnection(OracleAccountDAO.java:68)
      at courses.hibernate.dao.OracleAccountDAO.createAccount(OracleAccountDAO.java:26)
      at courses.hibernate.service.AccountService.createAccount(AccountService.java:42)
      at courses.hibernate.service.OracleAccountServiceTest.testCreateAccount(OracleAccountServiceTest.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at courses.hibernate.dao.OracleAccountDAO.getConnection(OracleAccountDAO.java:68)
      at courses.hibernate.dao.OracleAccountDAO.createAccount(OracleAccountDAO.java:26)
      at courses.hibernate.service.AccountService.createAccount(AccountService.java:42)
      at courses.hibernate.service.OracleAccountServiceTest.createAccount(OracleAccountServiceTest.java:170)
      at courses.hibernate.service.OracleAccountServiceTest.testGetAccount(OracleAccountServiceTest.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at courses.hibernate.dao.OracleAccountDAO.getConnection(OracleAccountDAO.java:68)
      at courses.hibernate.dao.OracleAccountDAO.createAccount(OracleAccountDAO.java:26)
      at courses.hibernate.service.AccountService.createAccount(AccountService.java:42)
      at courses.hibernate.service.OracleAccountServiceTest.createAccount(OracleAccountServiceTest.java:170)
      at courses.hibernate.service.OracleAccountServiceTest.testDeleteAccount(OracleAccountServiceTest.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at courses.hibernate.dao.OracleAccountDAO.getConnection(OracleAccountDAO.java:68)
      at courses.hibernate.dao.OracleAccountDAO.createAccount(OracleAccountDAO.java:26)
      at courses.hibernate.service.AccountService.createAccount(AccountService.java:42)
      at courses.hibernate.service.OracleAccountServiceTest.createAccount(OracleAccountServiceTest.java:170)
      at courses.hibernate.service.OracleAccountServiceTest.testUpdateAccountType(OracleAccountServiceTest.java:103)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at courses.hibernate.dao.OracleAccountDAO.getConnection(OracleAccountDAO.java:68)
      at courses.hibernate.dao.OracleAccountDAO.createAccount(OracleAccountDAO.java:26)
      at courses.hibernate.service.AccountService.createAccount(AccountService.java:42)
      at courses.hibernate.service.OracleAccountServiceTest.createAccount(OracleAccountServiceTest.java:170)
      at courses.hibernate.service.OracleAccountServiceTest.testUpdateAccountBalance(OracleAccountServiceTest.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Author

Commented:
I solved this. Thanks.