Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010

    Unanswered: java.sql.SQLException: Io exception: Got minus one from a read call

    Hello Friends,

    I am using Oracle 10g. I tried to access the oracle db from Java and Hibernate database.

    But when i execute the java program, it throws the below error msg:

    HTML Code:
    23:49:00,671  INFO Version:15 -23:49:00,703  INFO Environment:543 -23:49:00,718  INFO Environment:576 -23:49:00,718  INFO Environment:709 -23:49:00,734  INFO Environment:627 -23:49:00,828  INFO Configuration:1460 -23:49:00,828  INFO Configuration:1437 -23:49:00,953  INFO Configuration:586 -23:49:01,046  INFO Configuration:1575 -23:49:01,140  INFO HbmBinder:322 -23:49:01,328  INFO DriverManagerConnectionProvider:64 -23:49:01,328  INFO DriverManagerConnectionProvider:65 -23:49:01,328  INFO DriverManagerConnectionProvider:68 -23:49:01,375  INFO DriverManagerConnectionProvider:103 -23:49:01,390  INFO DriverManagerConnectionProvider:109 -23:49:07,515  WARN SettingsFactory:144 -java.sql.SQLException: Io exception: Got minus one from a read call
    	at oracle.jdbc.dbaccess.DBError.throwSqlException(
    	at oracle.jdbc.dbaccess.DBError.throwSqlException(
    	at oracle.jdbc.dbaccess.DBError.throwSqlException(
    	at oracle.jdbc.driver.OracleConnection.<init>(
    	at oracle.jdbc.driver.OracleDriver.getConnectionInstance(
    	at oracle.jdbc.driver.OracleDriver.connect(
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at java.sql.DriverManager.getConnection(Unknown Source)
    	at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(
    	at org.hibernate.cfg.SettingsFactory.buildSettings(
    	at org.hibernate.cfg.Configuration.buildSettings(
    	at org.hibernate.cfg.Configuration.buildSessionFactory(
    	at de.laliluna.hibernate.SessionFactoryUtil.<clinit>(
    	at de.laliluna.example.TestExample.createHoney(
    	at de.laliluna.example.TestExample.main(
    23:49:07,578  INFO Dialect:175 -23:49:07,578  WARN Oracle9Dialect:60 -23:49:07,625  INFO TransactionFactoryFactory:59 -23:49:07,625  INFO TransactionManagerLookupFactory:80 -23:49:07,625  INFO SettingsFactory:170 -23:49:07,625  INFO SettingsFactory:174 -23:49:07,625  INFO SettingsFactory:189 -23:49:07,625  INFO SettingsFactory:197 -23:49:07,625  INFO SettingsFactory:205 -23:49:07,625  INFO SettingsFactory:232 -23:49:07,625  INFO SettingsFactory:236 -23:49:07,625  INFO SettingsFactory:240 -23:49:07,625  INFO SettingsFactory:244 -23:49:07,625  INFO SettingsFactory:420 -23:49:07,625  INFO ASTQueryTranslatorFactory:47 -23:49:07,625  INFO SettingsFactory:252 -23:49:07,625  INFO SettingsFactory:257 -23:49:07,625  INFO SettingsFactory:262 -23:49:07,625  INFO SettingsFactory:266 -23:49:07,625  INFO SettingsFactory:405 -23:49:07,625  INFO SettingsFactory:276 -23:49:07,625  INFO SettingsFactory:285 -23:49:07,625  INFO SettingsFactory:305 -23:49:07,625  INFO SettingsFactory:314 -23:49:07,625  INFO SettingsFactory:318 -23:49:07,625  INFO SettingsFactory:333 -23:49:07,625  INFO SettingsFactory:337 -23:49:07,703  INFO SessionFactoryImpl:187 -23:49:08,234  INFO SessionFactoryObjectFactory:105 -23:49:14,531  WARN JDBCExceptionReporter:100 -23:49:14,531 ERROR JDBCExceptionReporter:101 -23:49:20,656  WARN JDBCExceptionReporter:100 -23:49:20,656 ERROR JDBCExceptionReporter:101 -23:49:20,656 DEBUG TestExample:28 -23:49:20,656 DEBUG TestExample:29 -23:49:26,781  WARN JDBCExceptionReporter:100 -23:49:26,781 ERROR JDBCExceptionReporter:101 -23:49:32,906  WARN JDBCExceptionReporter:100 -23:49:32,906 ERROR JDBCExceptionReporter:101 -23:49:39,031  WARN JDBCExceptionReporter:100 -23:49:39,031 ERROR JDBCExceptionReporter:101 -23:49:45,046  WARN JDBCExceptionReporter:100 -23:49:45,046 ERROR JDBCExceptionReporter:101 -
    My Hibernate.cfg.xml file as follows:

    HTML Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC
    		"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
            <property name="hibernate.connection.password">manager</property>
            <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:8080:XE</property>
            <property name="hibernate.connection.username">system</property>
            <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
            <!-- thread is the short name for
    		and let Hibernate bind the session automatically to the thread
    		<property name="current_session_context_class">thread</property>
    		<!-- this will show us all sql statements -->
    		<property name="hibernate.show_sql">true</property>
    		<!-- mapping files -->
    		<mapping resource="de/laliluna/example/Honey.hbm.xml" />
    I am using both ports like below:

    HTML Code:
    jdbc:oracle:thin:@localhost:1521:XE - Connection Refused error msg thrown.
    jdbc:oracle:thin:@localhost:8080:XE - The above error msg thrown. But the Oracle Server Port HTTP is only 8080. 1521 is Oracle Listener.
    Please help me to come out from this error.


    - ts karthikeyan

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    post results from 2 commands below

    lsnrctl status
    lsnrctl service
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2010


    Hi Friend,

    Thanks a lot. i have come from the problem.

    ts karthikeyan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts