Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to connect to DB via JNDI through Properties File - Please give us an example!

    Hey there,

    I looked at some other posts, many guys have the same problem: I can connect to the oracle database successfully via the following properties file (snippet):

    # # -------------- SETTINGS FOR ORACLE --------------------
    #
    # # These are the settings for use with the Oracle database.
    #
    # # hostname and port where the database server is installed
    sql.Oracle.interface.type: dataSource
    sql.Oracle.driver: oracle.jdbc.pool.OracleDataSource
    sql.Oracle.driver.serverName: xyz.abc.de
    sql.Oracle.driver.portNumber: 1521
    #
    # # SID of Oracle Database
    sql.Oracle.driver.databaseName: ABCDE
    #
    # # username and password that can create and modify tables in that database
    # # this user must have the following privileges for the system to function
    # # properly: create/alter/drop table; create/drop sequences;
    # # insert/update/replace/delete rows.
    sql.Oracle.driver.user: SYS as SYSDBA
    sql.Oracle.driver.password: SYS

    It works perfectly! Also the JNDI connection works perfectly within the Container (by the way: we use WebSphere AS 6.1)

    But I cannot connect through JNDI! If I try it through the admin console, an error eccours - InitialContext problem (as in the other posts). I cannot find a JNDI name in Visual Builder - although the connection works, I see my database tables in the "DataSources"-Window....


    So please please please please:
    Give us an example properties file. Not again a hint that we should use this tool or that gui builder. I just want to see an example property file for a Oracle or MySQL database connection through JNDI.
    Which properties are necessary? Which are not?

    If you post such an example, we can be sure, that it is only a JNDI-name problem and we can try out different combinations with and without prefixes, backslashes and so on...

    Because there is no documentation for this, you should be able to post such file? That would be great and help me and many other users a lot...

    Thank you !!!

    best regards,
    Kai

    #2
    We're already planning to add documentation of the minimal JNDI properties, however, we'd still recommend grabbing the latest nightly and using the Admin Console, because we've now made the process even simpler and corrected some bugs. As soon as you bring up the new Admin Console you'll see the available JNDI connections.

    Comment


      #3
      That said, here is the example you asked for. This is a simple JNDI resource defined in my Tomcat configuration:

      Code:
      <Resource name="jdbc/jndiTest"
                       auth="Container"
                       type="javax.sql.DataSource"
                       driverClassName="oracle.jdbc.driver.OracleDriver"
                       url="jdbc:oracle:thin:@192.168.132.152:1521:xe"
                       username="system"
                       password="manager"
                       initialSize="5"                 
                       maxActive="50" />
      And this is the minimal set of properties needed in "server.properties" to define a SmartClient/SmartGWT database connection called "wrOracle" that uses that JNDI resource:

      Code:
      sql.wrOracle.driver.name: java:comp/env/jdbc/jndiTest
      sql.wrOracle.database.type: oracle
      sql.wrOracle.interface.type: jndi
      Note that the java:comp/env/ prelude is optional - simply specifying jdbc/jndiTest would also have worked

      Comment


        #4
        Thank you a lot for the example. One additional question:

        Is there a reason for the "wr" in "sql.wrOracle". My server.properties file does not have that? Mine says "sql.Oracle" always. Do you really have to add your database name "wrOracle" to the lines, or is this just a typo?

        Because (without JNDI) my generated server.properties also contains "sql.Oracle.XYZ", although my database connection has another name instead of "Oracle". And it works...

        Thank you. Best regards, Kai.
        Last edited by KaiW; 28 Sep 2010, 23:49.

        Comment


          #5
          Ok, I tried out myself:

          "sql.Oracle.XYZ" works, "sql.'database-connection-name'.XYZ does not work. So I think your lines have a typo, right?

          Now, My JNDI connection works - there is no JNDI exception in the log files. But the following error occurs: ORA-00942 - table or view not found.

          I do not understand that error. All tables are available, they are found, if I use the server.properites with the JDBC configuration instead of the JDNI configuration.

          Here is the exception of my websphere log file:

          Code:
          [29.09.10 11:07:26:353 CEST] 0000021a  O UOW=  source=SystemOut org=IBM prod=WebSphere component=Application Server thread=[Migrated.Servlet.Engine.Transports : 9]
                    === 2010-09-29 11:07:26,351 [ : 9] DEBUG DataSourceDMI - Invocation threw exception
          java.sql.SQLException: ORA-00942: table or view does not exist
          
                  at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:793)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:719)
                  at oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:812)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1132)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
                  at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4939)
                  at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:5126)
                  at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1482)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery(WSJdbcStatement.java:1540)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:880)
                  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:267)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:261)
                  at com.isomorphic.sql.SQLDriver.getScalarResult(SQLDriver.java:354)
                  at com.isomorphic.sql.SQLDriver.executeScalar(SQLDriver.java:552)
                  at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1342)
                  at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1158)
                  at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
                  at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
                  at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
                  at com.isomorphic.application.AppBase.execute(AppBase.java:491)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1382)
                  at de.telekom.vtm.nb.gwt.server.AllAlarmDMI.fetch(Unknown Source)
                  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:585)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
                  at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
                  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
                  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                  at de.telekom.vtm.nb.gwt.server.UserRoleFilter.doFilter(Unknown Source)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
                  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
                  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3507)
                  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
                  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
                  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
                  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
                  at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
                  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
                  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
                  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
                  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
          [29.09.10 11:07:26:354 CEST] 0000021a  O UOW=  source=SystemOut org=IBM prod=WebSphere component=Application Server thread=[Migrated.Servlet.Engine.Transports : 9]
                    === 2010-09-29 11:07:26,351 [ : 9] DEBUG DataSourceDMI - Invocation threw exception
          java.sql.SQLException: ORA-00942: table or view does not exist
          
                  at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:793)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:719)
                  at oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:812)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1132)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
                  at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4939)
                  at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:5126)
                  at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1482)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery(WSJdbcStatement.java:1540)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:880)
                  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:267)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:261)
                  at com.isomorphic.sql.SQLDriver.getScalarResult(SQLDriver.java:354)
                  at com.isomorphic.sql.SQLDriver.executeScalar(SQLDriver.java:552)
                  at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1342)
                  at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1158)
                  at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
                  at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
                  at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
                  at com.isomorphic.application.AppBase.execute(AppBase.java:491)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1382)
                  at de.telekom.vtm.nb.gwt.server.AllAlarmDMI.fetch(Unknown Source)
                  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:585)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
                  at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
                  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
                  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                  at de.telekom.vtm.nb.gwt.server.UserRoleFilter.doFilter(Unknown Source)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
                  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
                  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3507)
                  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
                  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
                  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
                  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
                  at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
                  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
                  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
                  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
                  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
          [29.09.10 11:07:26:354 CEST] 000001ea  O UOW=  source=SystemOut org=IBM prod=WebSphere component=Application Server thread=[Migrated.Servlet.Engine.Transports : 7]
                    DDDDDDDDDDDDDD:D
          [29.09.10 11:07:26:355 CEST] 0000021a  O UOW=  source=SystemOut org=IBM prod=WebSphere component=Application Server thread=[Migrated.Servlet.Engine.Transports : 9]
                    === 2010-09-29 11:07:26,354 [ : 9] WARN  RequestContext - dsRequest.execute() failed: 
          java.sql.SQLException: ORA-00942: table or view does not exist
          
                  at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:793)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:719)
                  at oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:812)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1132)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
                  at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4939)
                  at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:5126)
                  at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1482)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery(WSJdbcStatement.java:1540)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:880)
                  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:267)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:261)
                  at com.isomorphic.sql.SQLDriver.getScalarResult(SQLDriver.java:354)
                  at com.isomorphic.sql.SQLDriver.executeScalar(SQLDriver.java:552)
                  at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1342)
                  at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1158)
                  at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
                  at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
                  at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
                  at com.isomorphic.application.AppBase.execute(AppBase.java:491)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1382)
                  at de.telekom.vtm.nb.gwt.server.AllAlarmDMI.fetch(Unknown Source)
                  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:585)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
                  at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
                  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
                  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                  at de.telekom.vtm.nb.gwt.server.UserRoleFilter.doFilter(Unknown Source)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
                  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
                  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3507)
                  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
                  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
                  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
                  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
                  at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
                  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
                  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
                  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
                  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
          [29.09.10 11:07:26:355 CEST] 0000021a  O UOW=  source=SystemOut org=IBM prod=WebSphere component=Application Server thread=[Migrated.Servlet.Engine.Transports : 9]
                    === 2010-09-29 11:07:26,354 [ : 9] WARN  RequestContext - dsRequest.execute() failed: 
          java.sql.SQLException: ORA-00942: table or view does not exist
          
                  at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:793)
                  at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:719)
                  at oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:812)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1132)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
                  at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4939)
                  at oracle.jdbc.driver.OracleStatement.doScrollStmtExecuteQuery(OracleStatement.java:5126)
                  at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1482)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteQuery(WSJdbcStatement.java:1540)
                  at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:880)
                  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:324)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:267)
                  at com.isomorphic.sql.SQLDriver.getTransformedResults(SQLDriver.java:261)
                  at com.isomorphic.sql.SQLDriver.getScalarResult(SQLDriver.java:354)
                  at com.isomorphic.sql.SQLDriver.executeScalar(SQLDriver.java:552)
                  at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1342)
                  at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1158)
                  at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:251)
                  at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
                  at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
                  at com.isomorphic.application.AppBase.execute(AppBase.java:491)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1382)
                  at de.telekom.vtm.nb.gwt.server.AllAlarmDMI.fetch(Unknown Source)
                  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:585)
                  at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:879)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:553)
                  at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:63)
                  at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1379)
                  at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155)
                  at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106)
                  at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
                  at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
                  at de.telekom.vtm.nb.gwt.server.UserRoleFilter.doFilter(Unknown Source)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:125)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
          at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
                  at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
                  at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
                  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
                  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
                  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3507)
                  at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
                  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
                  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
                  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
                  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
                  at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
                  at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
                  at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
                  at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
                  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
                  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
                  at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
                  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
                  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
          Maybe I need some more configuration in the server.properties? I only used the three lines of your example.
          Last edited by KaiW; 29 Sep 2010, 04:19.

          Comment


            #6
            By the way: Here is the configuration of my Oracle JDBC Datasource in our WebSphere Application Server 6.1:

            - Connection name: xyz_Datasource
            - JNDI name: jdbc/xyz_Datasource
            - URL: jdbc:oracle:oci8:@XYZ
            - Database name: XYZ
            - Driver type: OCI
            - server-url, port, user, password
            - Classpath to Oracle driver: /opt/oracle/product/10.2/jdbc/lib/ojdbc14_g.jar

            My client also uses ojdbc14.jar to connect to the DB if using JDBC instead of JNDI.

            Comment


              #7
              The example is correct. The "wrOracle" is an arbitrary name for the database connection, and is what you would set as "dbName" in your .ds.xml file if you want that DataSource to use that connection.

              The "table or view does not exist" message indicates that your JNDI connection settings are for a user with insufficient privileges, are accessing a different table namespace, or a similar problem.

              If you're having any trouble with this, just use the Admin Console as originally recommended. As soon as you pull up the tool it will show you available JNDI connections.

              Comment


                #8
                Originally posted by Isomorphic
                The example is correct. The "wrOracle" is an arbitrary name for the database connection, and is what you would set as "dbName" in your .ds.xml file if you want that DataSource to use that connection.

                The "table or view does not exist" message indicates that your JNDI connection settings are for a user with insufficient privileges, are accessing a different table namespace, or a similar problem.

                If you're having any trouble with this, just use the Admin Console as originally recommended. As soon as you pull up the tool it will show you available JNDI connections.
                Thank you a lot. I figured this information out some some minutes ago by myself. Now it works...

                I propose you do document such very important information in a user guide. Many people would thank you for this :-)

                Comment


                  #9
                  Hi,Isomorphic!
                  i also made a jndi datasource for my application with mysql,the server.properties like that :
                  Code:
                  sql.mysql5.interface.credentialsInURL:true
                  sql.mysql5.database.type:mysql
                  sql.mysql5.driver.serverName:localhost
                  sql.mysql5.driver.portNumber:3306
                  sql.mysql5.driver.user:root
                  sql.mysql5.driver.password:wangrui
                  sql.mysql5.driver.databaseName:test
                  sql.mysql5.driver:com.mysql.jdbc.jdbc2.optional.MysqlDataSource
                  sql.mysql5.interface.type:dataSource
                  sql.mysql5.pool.enabled:true
                  sql.mysql5.driver.networkProtocol:tcp
                  sql.mysql5.driver.driverType:thin
                  sql.mysql5.driver.context:_container_
                  and config the tomcat file like context.xml,web.xml and server.xml.
                  Code:
                  <Resource  
                  
                        auth="Container"   
                        type="javax.sql.DataSource"   
                        name="jdbc/jndiTest"   
                        description="mysql"   
                        username="root"   
                        password="wangrui"   
                        maxActive="4"   
                        maxIdle="2"   
                        maxWait="5000"   
                        driverClassName="com.mysql.jdbc.Driver"   
                        url="jdbc:mysql://localhost:3306/test"/>
                  but when i run my application ,i still load the data from database.

                  i want to ask that is there any file i could config? thanks!

                  Comment

                  Working...
                  X