Io Exception connecting to Oracle from apache-tomcat-6.0.14 - weird problem

Hi all,
I'm in a desperate situation here. Trying to solve this problem for a week now. I have searched all over the internet but coul not find any solution. I developed an application using netbeans 5.5.1 with VWD pack and it works fine. The application accesses an oracle db on another server which works fine on my development machine. Now I deployed to oracle 9i and apache-tomcat-6.0.14 on a solaris machine and encountered this error :
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
on further troubleshooting I tried this code on the server.
java.sql.DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@servername:1521:sid", "username", "pswd");
and it works alright. The connection was established wothout error.
But when I try
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
javax.naming.Context init new javax.naming.Context();
javax.naming.Context ctx = (javax.naming.Context)init.lookup("java:comp/env");
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("jdbc/dataSource");
java.sql.Connection conn = ds.getConnection();
I still get the same io Exception error.
Now I need to fetch the values from the context file, because my application uses :-
CachedRowSetXImpl portal_tabsRowSet= new CachedRowSetXImpl();
CachedRowSetDataProvider portal_tabsDataProvider= new CachedRowSetDataProvider();
as follows :-
portal_tabsRowSet.setDataSourceName("java:comp/env/jdbc/dataSource");
portal_tabsRowSet.setCommand("SELECT * FROM PORTAL_TABS");
portal_tabsRowSet.setTableName("PORTAL_TABS");
portal_tabsDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.portal_tabsRowSet}"));
here is my context.xml
<Context path="/AppPortal">
<Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" m
axActive="20" maxIdle="10" maxWait="-1" name="jdbc/dataSource" password="pswd" ty
pe="javax.sql.DataSource" url="jdbc:oracle:thin:@servername:1521:sid" username="username"/>
</Context>
here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><context-param><param-name>javax.faces.STATE_SAVING_METHOD</param-name><param-value>server</param-value></context-param><context-param><param-name>javax.faces.CONFIG_FILES</param-name><param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value></context-param><context-param><param-name>com.sun.faces.validateXml</param-name><param-value>true</param-value></context-param><context-param><param-name>com.sun.faces.verifyObjects</param-name><param-value>false</param-value></context-param><filter><filter-name>UploadFilter</filter-name><filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class><init-param><description>
The maximum allowed upload size in bytes. If this is set
to a negative value, there is no maximum. The default
value is 1000000.
</description><param-name>maxSize</param-name><param-value>1000000</param-value></init-param><init-param><description>
The size (in bytes) of an uploaded file which, if it is
exceeded, will cause the file to be written directly to
disk instead of stored in memory. Files smaller than or
equal to this size will be stored in memory. The default
value is 4096.
</description><param-name>sizeThreshold</param-name><param-value>4096</param-value></init-param></filter><filter-mapping><filter-name>UploadFilter</filter-name><servlet-name>Faces Servlet</servlet-name></filter-mapping><servlet><servlet-name>Faces Servlet</servlet-name><servlet-class>javax.faces.webapp.FacesServlet</servlet-class><load-on-startup> 1 </load-on-startup></servlet><servlet><servlet-name>ExceptionHandlerServlet</servlet-name><servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class><init-param><param-name>errorHost</param-name><param-value>localhost</param-value></init-param><init-param><param-name>errorPort</param-name><param-value>24444</param-value></init-param></servlet><servlet><servlet-name>ThemeServlet</servlet-name><servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class></servlet><servlet-mapping><servlet-name>Faces Servlet</servlet-name><url-pattern>*.jspx</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ExceptionHandlerServlet</servlet-name><url-pattern>/error/ExceptionHandler</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ThemeServlet</servlet-name><url-pattern>/theme/*</url-pattern></servlet-mapping><session-config><session-timeout>5</session-timeout></session-config><welcome-file-list>
<welcome-file>JSCreator_index.jsp</welcome-file>
</welcome-file-list><error-page><exception-type>javax.servlet.ServletException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>java.io.IOException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>javax.faces.FacesException</exception-type><location>/error/ExceptionHandler</location></error-page><error-page><exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type><location>/error/ExceptionHandler</location></error-page><jsp-config><jsp-property-group><url-pattern>*.jspf</url-pattern><is-xml>true</is-xml></jsp-property-group></jsp-config><resource-ref><description>Creator generated DataSource Reference</description><res-ref-name>jdbc/dataSource</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref></web-app>
This is really strange to me.
Please help!

I haven't studied your problem in detail and don't actually use Tomcat 6, but in earlier versions of Tomcat the handling of JNDI leaves a lot to be desired. If you search this forum for posts about Tomcat and JNDI, you will find some useful information.
One thing I found was that you really need to use the context.xml file in your Meta-inf directory, putting the datasource anywhere else gets into one kind of trouble or another. I tried using server.xml, a context file for the application and the web-inf file.

Similar Messages

  • Error connecting to Oracle from when running SSIS Package on Windows 64-bit

    Hi.
    I have an SSIS (SQL Server Integration Services) Package that reads a view on Oracle and loads data into table in SQL Server 2005. This is on a Windows 2008 Server (64-bit). SQL Server 2005 with SP3. Oracle Client 11g (32 bit & 64 bit) Runtime Version installed on server. The server has been rebooted since installing OracleClient.
    I get the following error when run as a SQLAgent job 64 Bit (Execution type SQL Server Integration Services Package)...
    Started: 9:29:24 AM
    Error: 2010-01-04 09:29:25.37
    Code: 0xC0202009
    Source: SADM_CURR_Address_and_Cell_Phone-Oracle Connection manager "Oracle/PeopleSoft"
    Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154.
    An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
    End Error
    Error: 2010-01-04 09:29:25.37
    Code: 0xC020801C
    Source: DFT-Oracle to SS2005 OLE DB Source [1]
    Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Oracle/PeopleSoft" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    End Error
    Error: 2010-01-04 09:29:25.37
    Code: 0xC0047017
    Source: DFT-Oracle to SS2005 DTS.Pipeline
    Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.
    End Error
    Error: 2010-01-04 09:29:25.37
    Code: 0xC004700C
    Source: DFT-Oracle to SS2005 DTS.Pipeline
    Description: One or more component failed validation.
    End Error
    Error: 2010-01-04 09:29:25.37
    Code: 0xC0024107
    Source: DFT-Oracle to SS2005
    Description: There were errors during task validation.
    End Error
    DTExec: The package execution returned DTSER_FAILURE (1).
    Started: 9:29:24 AM
    Finished: 9:29:25 AM
    Elapsed: 1.108 seconds
    When I execute this same exact package as a SQLAgent job 32-bit (type Operating System CmdExec) it runs successfully. When I run the package using the Execute Package Utility, it runs successfully. When I am editting the package in BIDS I can connect to Oracle. For both 64 and 32 bit, I use a dtsconfig file which specifies the Oracle connection string and password.
    Someone mentioned on another forum that maybe there is no Oracle ODBC driver for 64-bit Windows. I would assume that the OracleClient 64-bit would include that.
    I hope I have included all info needed. Please let me know if you may have a resolution to this problem.
    Thanks.
    John

    I was trying to transfer data from oracle to sql server 2008 on a daily basis.
    I have very hard time connecting to oracle from ssis package on windows server 2008. I am almost dead and cannot find any help. i was able to connect to oracle using import/export 64 bit feature of SQL Server 2008 using Oracle provider for OLEDB. But I am not sure why the same does not work with BIDS?
    Here's the environment info:
    1. Oracle Client 10g
    2. SQL Server 2008
    3. Windows Server 2008
    Appreciate your help. Please save me.
    Thanks,

  • Exception:'NetworkAdapter fails'when connecting with oracle from web dynpro

    Hi,
    I am trying to run one of my application in SAP netweaver Studio(webdynpro).
    I want to connect to the oracle db on my local system.
    I wrote the code:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection cn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:DSNname","UsrId","password");
    I am getting the following error in the connection statement
    Error:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Oracle is 9.2.0.1.0  on windows XP platform.
    I can do an SQLPLUS and the connection is ok.
    I don't know were the problem is ?
    Can any body help me out.
    Thanks
    Smitha

    Hi,
    For the error "The Network Adapter could not establish the connection" check and do the following:
    In  the Computer Management - Services, check if the Oracle*TNSListener is started. If not, restart the listener  and set the Startup Type to "Automatic".
    Also check whether the port number in listener.ora is correct ($ORACLE_HOME\network\admin\listener.ora) and updated during the installation.
    For other details run through SAP Note 786673
    Hope this helps.
    Regards
    Srinivasan T

  • Error Connecting to Oracle from J2EE SDK1.4

    I am getting the following error when trying to Ping Oracle from a J2EE 1.4 SDK:
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Error getting connection from the EIS
    I have the following connection information
    <jdbc-connection-pool connection-validation-method="auto-commit" datasource-classname="oracle.jdbc.pool.OracleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-millis="60000" name="OraclePool" pool-resize-quantity="2" steady-pool-size="8" transaction-isolation-level="read-uncommitted">
    <property name="url" value="jdbc:oracle:thin:@10.1.4.98:1609:thesid"/>
    <property name="password" value="password"/>
    <property name="user" value="test"/>
    </jdbc-connection-pool>
    Can anyone give me any pointers?

    It looks okay to me. The only thing that jumped out at me is that normally Oracle is on 1521, not the current port you have. Otherwise, I'll drop back 15 and punt on this one.
    - Saish
    "My karma ran over your dogma." - Anon

  • Connect to Oracle from PHP

    Hello
    I have problems to connect to Oracle database from PHP. I use php_oracle.dll. (I can't use OCI8 because the version of our oracle is 8.0).
    We have 2 oracle servers:
    One of them connect ok. But I can't connect to the second server. The main difference is the user. In the second server is like 'ops$p123lmn'. In the first server is only text, e.g. 'dbaper'. Can be a problem the '$' in the username?
    I connected through ODBC in PHP and ok both oracle servers.
    I use ora_logon like:
    $ora_conn = ora_logon("ops$p123mln@siap","pass");
    when ops$p123mln is the user, siap is the SID and pass is the password.
    I'm desperate because I don't find a solution.
    Thanks in advance to all.
    Jose Martin

    If I had to guess, I would say that PHP is probably seeing the string "ops$p123mln@siap" and interpreting it as "ops${p123mln}@siap", which would resolve to "ops@siap", which is way wrong.
    Try replacing the string with 'ops$p123mln@siap' (single-quotes around the string instead of double-quotes).
    Hope that helps.

  • Database Connection to Oracle from Sun Studio

    I am trying to connect to Oracle 9i from the Sun IDE.
    When I test the driver from the databases in the runtime tab, it gives me the following message:
    Internal test driver incomplete. The driver may not support DatabaseMetadata methods.
    The output window shows this:
    Warning: No tables were found. Check your database.
    Warning: No views were found. Check your database.
    Warning: No procedures were found. Check your database.
    If I try to connect, it seems to connect successfully.
    When I expand the jdbc folder it show 3 folders, one for tables, one for views and one for procedures, but they are empty.
    I also set up the classpath to point to the drivers.
    Anyone know the answer?
    Jim

    I was successful and here're some pointers:
    When you configure the new data source for Oracle, configure the server type for Oracle Bundle and define the proper driver class name and add the proper jar file
    Also:
    Check the database URL
    Userid/password
    Typicaly the Driver Class can be: oracle.jdbc.driver.OracleDriver
    And the DB URL: jdbc:oracle:thin:@<host>:1521:<SID>
    (If connecting using thin drivers)
    Good luck ;-)

  • Connecting to oracle from a C program through  precompiler

    I am getting an error when connecting to oracle 11g express edition using precompiler Visual studio 2008.
    I am getting this error
    c:\users\indrani\documents\visual studio 2008\projects\firstproc\firstproc\proctest.c : fatal error C1853: 'Debug\firstproc.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
    1>Build log was saved at "file://c:\Users\indrani\Documents\Visual Studio 2008\Projects\firstproc\firstproc\Debug\BuildLog.htm"
    I am referring to Mark Williams blog

    Hi,
    Check the project properties and  under Configuration properties --> "Precompiled Headers" and see what is the value ?
    Regards,
    Ravi        

  • Runtime Exception - connection to CS from Webcentre Portal application

    UCM hosted on LINUX VM
    Local host file details - 192.168.88.128 owcvm03
    connection details socket/owcvm03/4444(user weblogic)
    Design time in Application resources I can access contents of CS (Contribution Folder)
    But at runtime connection to CS fails error-
    <IdentityStoreUtil> <getIdentityStoreFactory> Cannot initialize identity store, cause: javax.naming.CommunicationException: 127.0.0.1:7101 [Root exception is java.net.SocketException: Permission denied: connect].
    <PageUtils> <getUserName> Failed to get user name
    <Submission> <run> Submission[id=1, service=oracle.webcenter.content.jcr.login, resource=owcvm03] caught exception running task
    javax.jcr.RepositoryException: oracle.stellent.ridc.protocol.ProtocolException: Unable to initialize connection idc://owcvm03:4444
    at oracle.jcr.impl.ExceptionFactory.repository(ExceptionFactory.java:161)
    at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:179)
    at oracle.jcr.impl.OracleRepositoryImpl.login(OracleRepositoryImpl.java:444)
    at oracle.vcr.jam.LoginTask.call(LoginTask.java:68)
    at oracle.vcr.jam.LoginTask.call(LoginTask.java:29)
    at oracle.webcenter.concurrent.Submission$2.run(Submission.java:484)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.webcenter.concurrent.Submission.runAsPrivileged(Submission.java:498)
    at oracle.webcenter.concurrent.Submission.run(Submission.java:424)
    at oracle.webcenter.concurrent.Submission$SubmissionFutureTask.run(Submission.java:888)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.runTask(ModifiedThreadPoolExecutor.java:657)
    at oracle.webcenter.concurrent.ModifiedThreadPoolExecutor$Worker.run(ModifiedThreadPoolExecutor.java:682)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: Unable to initialize connection idc://owcvm03:4444
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnectionManager.initializeConnection(SocketConnectionManager.java:35)
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnectionManager.initializeConnection(SocketConnectionManager.java:22)
    at oracle.stellent.ridc.protocol.impl.SimpleConnectionPool.acquireConnection(SimpleConnectionPool.java:44)
    at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:151)
    at oracle.stellent.jcr.IdcPersistenceManagerFactory.pingServer(IdcPersistenceManagerFactory.java:209)
    at oracle.stellent.jcr.IdcPersistenceManagerFactory.createPersistenceManager(IdcPersistenceManagerFactory.java:168)
    ... 15 more
    Caused by: oracle.stellent.ridc.protocol.ProtocolException: java.net.SocketException: Permission denied: connect
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnection.connect(SocketConnection.java:52)
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnectionManager.initializeConnection(SocketConnectionManager.java:33)
    ... 20 more
    Caused by: java.net.SocketException: Permission denied: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:189)
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnection.createSocket(SocketConnection.java:126)
    at oracle.stellent.ridc.protocol.intradoc.socket.SocketConnection.connect(SocketConnection.java:44)
    ... 21 more
    <AbstractRepositoryLogic> <getItem> An error occurred while accessing the content repository.

    SocketHostAddressSecurityFilter=127.0.0.1|0:0:0:0:0:0:0:1|*.*.*.*
    #Database Variables
    DatabaseType=oracle
    JdbcDriver=oracle.jdbc.OracleDriver
    JdbcConnectionString=jdbc:oracle:thin:@localhost:1521:ORCL
    JdbcUser=system
    JdbcPassword=managed
    JdbcPasswordEncoding=managed
    DatabasePreserveCase=1
    SystemDatabase:DataSource=CSDS
    SystemDatabase:UseDataSource=true
    #Internet Variables
    HttpServerAddress=OEL5vm.local:16200
    MailServer=mail
    SysAdminAddress=[email protected]
    SmtpPort=25
    HttpRelativeWebRoot=/cs/
    UseSSL=No
    #General Option Variables
    GetCopyAccess=false
    ExclusiveCheckout=false
    IsAutoNumber=true
    AutoNumberPrefix=OEL5vmlocal162
    AuthorDelete=false
    ShowOnlyKnownAccounts=false
    UseAccounts=1
    IsJspServerEnabled=0
    JspEnabledGroups=
    #Additional Variables
    AllowUpdateForGenwww=1
    IdcServerThreadQueryTimeout=180
    DatabaseConnectionKeepAliveInterval=180
    IntradocServerPort=4444

  • SJSMQ from Apache tomcat

    Dear all,
    iam developing a distributed application using jms and messaging
    i chose the open source version of SJSMQ and am using apache tomcat as webserver
    i need to lookup my administrative objects using tomcat enviroment context but i cant find how to declare these objects in the context.xml file

    What error(s) are you getting?

  • Problem while connecting to Oracle from JAVA

    HI ,
    I am stuck with a problem.I could'nt connect from java to SQL.
    Do I need to install any drivers.I installed oracle 8i full version.and i am
    using j2sdk1.4.2.and included class12.zar file in class path......
    what els I have to do.
    please give me the solution.
    feel free to contact me at [email protected]

    I am stuck with a problem.I could'nt connect from java to SQL.
    Do I need to install any drivers.I installed oracle 8i full version.and i am
    using j2sdk1.4.2.and included class12.zar file in class path......
    what els I have to do.Well, what have you tried?
    You need the Oracle JDBC driver jar (ojdbc14.jar) which you can download from Oracle or somewhere I believe....I can't remember where I got it. Anyway, google for the Oracle JDBC driver and you should find it.
    You will probably need to read up on JDBC as I can't believe you even did that before you realised you needed a driver to connect. Good luck.
    feel free to contact me at [email protected]
    Nope.....post to forum, reply to forum.

  • Failing to connect to Oracle from Crystal Reports

    We have a client attempting to connect to 10g using crystal reports. They are getting ora-08001 as an error reported to them. Any ideas what could be causing this?

    I don't know Crystal Reports and what it sends to and requests from the database, but that's the formal description of this error:
    Error: ORA 8001
    Text: maximum number of sequences per session exceeded
    Cause: An operation requested a resource that was unavailable.
    The maximum number of user sequences per session is specified by the
    initialization parameter DC_SEQUENCES.
    When this maximum is reached, no more requests are processed.
    Action: Try the operation again in a few minutes.
    If this error occurs often, shut down Oracle, increase the
    DC_SEQUENCES parameter in the initialization parameter file, and
    restart Oracle.

  • Connection to Oracle from remote computer in local network

    I have local network with two computers: WinXP with Oracle 10g and Vista with Oracle Client tools. I need to connect to the Oracle 10g from the client PC with sqlplus and with Enterprise Manager Console. Sqlplus returns ORA-12154 error, EM console returns ORA-12541 error.
    Is the problem in configuration of listener.ora, tnsnames.ora and sqlnet.ora on the server side and on the client side? They look like this:
    Server side:
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.9)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.9)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    # sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    # listener.ora Network Configuration File:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.9)(PORT = 1521))
    Client side:
    # tnsnames.ora Network Configuration File:
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.9)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl)
    # sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0
    SQLNET.AUTHENTICATION_SERVICES= (NTS, EZCONNECT)
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    Are these files configured fine? Or do I have to configure also something else? When I do tnsping 10.0.0.9 from the client, the result is OK. So what is wrong? Thanks a lot for help, Petr.

    Sqlplus returns ORA-12154 error, EM console returns ORA-12541 error- Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
    - Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
    - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
    - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
    HTH

  • Connecting to oracle from j2ee server.

    this is my resource.properties file.
    jdbcDataSource.0.name=jdbc/Cloudscape
    jdbcDataSource.0.url=jdbc\:cloudscape\:rmi\:CloudscapeDB;create\=true
    jdbcDataSource.1.name=jdbc/DB1
    jdbcDataSource.1.url=jdbc\:cloudscape\:rmi\:CloudscapeDB;create\=true
    jdbcDataSource.2.name=jdbc/DB2
    jdbcDataSource.2.url=jdbc\:cloudscape\:rmi\:CloudscapeDB;create\=true
    jdbcDataSource.3.name=jdbc/EstoreDB
    jdbcDataSource.3.url=jdbc\:cloudscape\:rmi\:CloudscapeDB;create\=true
    jdbcDataSource.4.name=jdbc/InventoryDB
    jdbcDataSource.4.url=jdbc\:cloudscape\:rmi\:CloudscapeDB;create\=true
    jdbcDataSource.5.name=jdbc/Oracle1
    jdbcDataSource.5.url=jdbc\:oracle\:thin\:@rocky.ny.com\:1521\:ecom;create\=true
    jdbcDataSource.6.name=jdbc/mysql
    jdbcDataSource.6.url=jdbc\:mysql\://localhost\:3306/test;create\=true
    jdbcDriver.0.name=COM.cloudscape.core.RmiJdbcDriver
    jdbcDriver.1.name=com.mysql.jdbc.Driver
    jdbcDriver.2.name=oracle.jdbc.driver.OracleDriver
    jdbcXADataSource.0.name=jdbc/XACloudscape
    jdbcXADataSource.0.classname=COM.cloudscape.core.RemoteXaDataSource
    jdbcXADataSource.0.dbpassword=
    jdbcXADataSource.0.dbuser=
    jdbcXADataSource.0.prop.createDatabase=create
    jdbcXADataSource.0.prop.databaseName=CloudscapeDB
    jdbcXADataSource.0.prop.remoteDataSourceProtocol=rmi
    jdbcXADataSource.1.name=jndi/OracleDriver
    jdbcXADataSource.1.classname=oracle.jdbc.driver.OracleDriver
    jdbcXADataSource.1.dbpassword=
    jdbcXADataSource.1.dbuser=
    jdbcXADataSource.2.name=jndi/mysqlDriver
    jdbcXADataSource.2.classname=com.mysql.jdbc.Driver
    jdbcXADataSource.2.dbpassword=
    jdbcXADataSource.2.dbuser=
    jmsCnxFactory.0.name=QueueConnectionFactory
    jmsCnxFactory.0.isQueue=true
    jmsCnxFactory.1.name=TopicConnectionFactory
    jmsCnxFactory.1.isQueue=false
    jmsCnxFactory.2.name=jms/QueueConnectionFactory
    jmsCnxFactory.2.isQueue=true
    jmsCnxFactory.3.name=jms/TopicConnectionFactory
    jmsCnxFactory.3.isQueue=false
    jmsDestination.0.name=jms/Queue
    jmsDestination.0.isQueue=true
    jmsDestination.1.name=jms/Topic
    jmsDestination.1.isQueue=false
    and JNDI for resource is "jdbc/Oracle".
    when i run a client application, it returns error message like this..
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Caught an exception.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. Oracle not found; nested exception is:
    javax.ejb.EJBException: Unable to connect to database. Oracle not found
    at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:64)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
    at SavingsAccountHomeStub.create(Unknown Source)
    at SavingsAccountClient.main(SavingsAccountClient.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:229)
    at com.sun.enterprise.appclient.Main.main(Main.java:155)
    Caused by: java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to connect to database. Oracle not found; nested exception is
    javax.ejb.EJBException: Unable to connect to database. Oracle not found
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:389)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:431)
    at SavingsAccountBean_RemoteHomeImpl.create(SavingsAccountBean_RemoteHomeImpl.java:48)
    at SavingsAccountBeanRemoteHomeImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:520)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:210)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    Caused by: javax.ejb.EJBException: Unable to connect to database. Oracle not found
    at SavingsAccountBean.setEntityContext(SavingsAccountBean.java:168)
    at com.sun.ejb.containers.EntityContainer.getPooledEJB(EntityContainer.java:1239)
    at com.sun.ejb.containers.EntityContainer.getContext(EntityContainer.java:197)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:365)
    at SavingsAccountBean_RemoteHomeImpl.create(SavingsAccountBean_RemoteHomeImpl.java:40)
    ... 7 more
    please help... can't figure it out... thanks for anybody's help...

    java.rmi.RemoteException: nested exception is:
    ion is: javax.ejb.EJBException: Unable to connect to
    database. Oracle not found; nested exception is:That is the crux of your problem. The Server is unable to locate the database. Or to be more technical precise, it cant connect to it. This may be a configuration issue or a network issue. you will have to get in touch with your Network Administrator or DBA. Find out if the JDBC url is correct. Find out if the classes is there in the classpath, etc.
    Hope this helps
    Have a nice day

  • Oracle-Java-Apache-Tomcat-JK connector configuration help...

    Windows 7 Ultimate 64-bit
    Oracle 12c
    Java 8
    Apache HTTP server 2.4.10
    Tomcat 8.0.15
    JK Connector 1.2.40
    Here are the main configuration files httpd.conf, mod_jk.conf, server.xml, and workers.properties.
    When I browse to a .jsp file, it appears to be read as html, thus not reading <jsp:include> statements as such.
    Please suggest minimum configuration.
    httpd.conf
    Define SRVROOT "/apache"
    ServerRoot "${SRVROOT}"
    Listen 80
    LoadModule actions_module modules/mod_actions.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule allowmethods_module modules/mod_allowmethods.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule authn_core_module modules/mod_authn_core.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authz_core_module modules/mod_authz_core.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule env_module modules/mod_env.so
    LoadModule include_module modules/mod_include.so
    LoadModule isapi_module modules/mod_isapi.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    LoadModule ssl_module modules/mod_ssl.so
    ServerName localhost:80
    #experimental section starts here
    #experimental section ends here
    # Virtual hosts
    NameVirtualHost *
    Include conf/mod_jk.conf
    mod_jk.conf
    LoadModule jk_module modules/mod_jk.so
    JkWorkersFile "c:/tomcat/conf/jk/workers.properties"
    JkMount /servlet/*  ajp13
    JkMount /*.jsp  ajp13
    <VirtualHost *>
    ServerName om1001001.omnisocial.com
    DocumentRoot "c:/data/fxality/java001"
    </VirtualHost>
    <VirtualHost *>
    ServerName om1001002.omnisocial.com
    DocumentRoot "c:/data/fxality/java002"
    </VirtualHost>
    <VirtualHost *>
    ServerName om1001003.omnisocial.com
    DocumentRoot "c:/data/fxality/java003"
    </VirtualHost>
    server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8005" shutdown="SHUTDOWN">
    <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
    pathname="conf/tomcat-users.xml" />
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/></Realm>
    <Host name="localhost"  appBase="webapps"/>
    <Host name="om1001001.omnisocial.com" appBase="c:/data/fxality/java001">
    <Context path="" docBase=""></Context>
    </Host>
    <Host name="om1001002.omnisocial.com" appBase="c:/data/fxality/java002">
    <Context path="" docBase=""></Context>
    </Host>
    <Host name="om1001003.omnisocial.com" appBase="c:/data/fxality/java003">
    <Context path="" docBase=""></Context>
    </Host>
    </Engine>
    </Service>
    </Server>
    workers.properties
    # BEGIN workers.properties
    # Definition for Ajp13 worker
    worker.list=ajp13
    worker.ajp13.type=ajp13
    worker.ajp13.host=localhost
    worker.ajp13.port=8009
    # END workers.properties

    I haven't studied your problem in detail and don't actually use Tomcat 6, but in earlier versions of Tomcat the handling of JNDI leaves a lot to be desired. If you search this forum for posts about Tomcat and JNDI, you will find some useful information.
    One thing I found was that you really need to use the context.xml file in your Meta-inf directory, putting the datasource anywhere else gets into one kind of trouble or another. I tried using server.xml, a context file for the application and the web-inf file.

  • Connecting to Oracle from Microsoft Excel

    My apologies if it has already been answered in the past. However, what I am looking for is a way to connect excel to Oracle and pull data. I know that I can install SQLPLUS etc and that will install the appropriate drivers. However, is there any package which has minimal drivers and networking components? I do not want to install anything heavyweight for this.
    Also, if you could briefly explain the steps, I will be able to find my way through.

    If you're after a lightweight install and using a 10.2 client is acceptable (i.e. all your databases are 8.1.7.4 or later), you could use the Oracle Instant Client. The documentation on the Instant Client home page is pretty good and walks you through how to configure things.
    The Instant Client, though, is designed more for folks that are delivering packaged applications and need to deliver a stripped down Oracle client as part of that install process. As such, it requires rather more involved configuration than the full-blown Oracle client, which is a friendlier install process for humans.
    Justin

Maybe you are looking for