Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Status of JIRA LCDS http://bugs.adobe.com/jira/browse/LCDS-1500 ?

Avatar

Former Community Member

Has this ORACLE Driver issue been fixed?

My company and clients use Oracle versions 10g and above and would like to use the Model Driven Development  tools of FB4.

I have not been able to get the RDS Data View to recognize any Oracle data sources.

I have also tried Ojdbc14.jar with Oracle 8i as type to no avail. Using JBoss 5.1 Data Sources.

An example of how the Adobe employee(?) (ksmith) got ojdbc14.jar to work would be most appreciated.

Thanks in advance!

Mike Valenza

CTG

4 Replies

Avatar

Level 2

This bug was fixed and tested last March. The tested version was 272700, which means the lcds 3.1 release version had the fix. The bug indicates this issue was with Tomcat, so it likely differs from your issue. I personally have not recently setup a jboss -> Oracle dbms connection.

Generally I find the easiest way to get a connection working with a newer version of Oracle (10+) is to download the newest instant-client distribution from Oracle's download site. You should always use a driver that matches your server release or newer. Then use their recommended driver for your JVM version, ojdbc5.jar or ojdbc6.jar. If you continue to have issues, I would test the driver you are trying to use in a 3rd party JDBC query tool like DbVisualizer.

Finally, if you still cannot connect reply with the specifics of your issue - driver version, stacktrace, oracle-ds.xml, etc.

Regards,

KenS

Avatar

Former Community Member

Well your suggestion was good advice, I was using

the wrong driver and JDK version so I down downloaded the ojdbc5.jar to go w

ith correct JDK 1.5 but no luck, Also tried ojdbc6.jar and jdk 1.6 same results.

I do not get an error message in the JVM console for Jboss 5.1 when server loads:

13:56:46,754 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=HERS2DataSource' to JNDI name 'java:HERS2DataSource'

13:56:46,832 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=HERSDataSource' to JNDI name 'java:HERSDataSource'

13:56:47,457 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'

13:56:47,972 INFO [ServerPeer] JBoss Messaging 1.4.3.GA server [0] started

13:56:48,738 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000

13:56:48,769 INFO [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover

13:56:48,769 INFO [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing

13:56:48,816 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds

13:56:48,816 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@163cb4d started

13:56:48,816 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds

13:56:48,816 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@50ae47 started

13:56:48,816 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000

13:56:48,816 INFO [ConnectionFactory] Connector bisocket://localhost:4457 has leasing enabled, lease period 10000 milliseconds

13:56:48,816 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@6e57d1 started

13:56:48,988 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'

13:56:49,050 INFO [TomcatDeployment] deploy, ctxPath=/admin-console

13:56:49,160 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'

13:56:52,175 INFO [TomcatDeployment] deploy, ctxPath=/

13:56:52,315 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console

13:56:52,394 INFO [TomcatDeployment] deploy, ctxPath=/lcds3mdd

13:56:52,675 INFO [STDOUT] [LCDS][INFO] Adobe LiveCycle Data Services: 3.0.0.254255

13:56:52,722 INFO [STDOUT] [LCDS][INFO] Endpoint 'my-amf' created with security: None

at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf

13:56:52,753 INFO [STDOUT] [LCDS][DEBUG] MessageBroker id: __default__ classLoader is: the MessageBroker's class loader (classLoader hashCode: 1236701 (parent null)

13:56:52,784 INFO [STDOUT] [LCDS][INFO] Starting Adobe LiveCycle Data Services: 3.0.0.254255 Developer License

13:56:52,909 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080

13:56:52,940 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009

13:56:52,940 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 53s:23ms

Funny thing is that the native localDB that ships with JBoss does show up in RDS view here are two of the -ds.xml files

1) JBOSS -ds that is displayed in RDS and works with Modeling tools

<?xml version="1.0" encoding="UTF-8"?>

<!-- The Hypersonic embedded database JCA connection factory config -->

<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
<!-- $Id: hsqldb-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ -->

<datasources>
   <local-tx-datasource>

      <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
      <!-- Datasources are not available outside the virtual machine -->
      <jndi-name>DefaultDS</jndi-name>

      <!-- For server mode db, allowing other processes to use hsqldb over tcp.
      This requires the org.jboss.jdbc.HypersonicDatabase mbean.
      <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
      -->
      <!-- For totally in-memory db, not saved when jboss stops.
      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
      <connection-url>jdbc:hsqldb:.</connection-url>
      -->
      <!-- For in-process persistent db, saved when jboss stops.
      The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
      -->
      <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>

      <!-- The driver class -->
      <driver-class>org.hsqldb.jdbcDriver</driver-class>

      <!-- The login and password -->
      <user-name>sa</user-name>
      <password></password>

      <!--example of how to specify class that determines if exception means connection should be destroyed-->
      <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->

      <!-- this will be run before a managed connection is removed from the pool for use by a client-->
      <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->

      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
      <min-pool-size>5</min-pool-size>

      <!-- The maximum connections in a pool/sub-pool -->
      <max-pool-size>20</max-pool-size>

      <!-- The time before an unused connection is destroyed -->
      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
      <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
      <idle-timeout-minutes>0</idle-timeout-minutes>

      <!-- sql to call when connection is created
        <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->

      <!-- sql to call on an existing pooled connection when it is obtained from pool
         <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->

      <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
         <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
      -->

      <!-- Whether to check all statements are closed when the connection is returned to the pool,
           this is a debugging feature that should be turned off in production -->
      <track-statements/>

      <!-- Use the getConnection(user, pw) for logins
        <application-managed-security/>
      -->

      <!-- Use the security domain defined in conf/login-config.xml -->
      <security-domain>HsqlDbRealm</security-domain>

      <!-- Use the security domain defined in conf/login-config.xml or the
           getConnection(user, pw) for logins. The security domain takes precedence.
        <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
      -->

      <!-- HSQL DB benefits from prepared statement caching -->
      <prepared-statement-cache-size>32</prepared-statement-cache-size>

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
         <type-mapping>Hypersonic SQL</type-mapping>
      </metadata>

      <!-- When using in-process (standalone) mode -->
      <depends>jboss:service=Hypersonic,database=localDB</depends>
      <!-- Uncomment when using hsqldb in server mode
      <depends>jboss:service=Hypersonic</depends>
      -->
   </local-tx-datasource>

   <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
   <mbean code="org.jboss.jdbc.HypersonicDatabase"
     name="jboss:service=Hypersonic">
     <attribute name="Port">       
        <value-factory bean="ServiceBindingManager" method="getIntBinding"
           parameter="jboss:service=Hypersonic"/>
     </attribute>
     <attribute name="BindAddress">       
        <value-factory bean="ServiceBindingManager" method="getStringBinding"
           parameter="jboss:service=Hypersonic"/>
     </attribute>    
     <attribute name="Silent">true</attribute>
     <attribute name="Database">default</attribute>
     <attribute name="Trace">false</attribute>
     <attribute name="No_system_exit">true</attribute>
   </mbean>
   -->

   <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
   <mbean code="org.jboss.jdbc.HypersonicDatabase"
     name="jboss:service=Hypersonic,database=localDB">
     <attribute name="Database">localDB</attribute>
     <attribute name="InProcessMode">true</attribute>
   </mbean>
  
</datasources>

2)Oracle -ds that does not show. pwd and username changed for security reasons

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<datasources>
    <local-tx-datasource>
        <jndi-name>HERS2DataSource</jndi-name>
        <use-java-context>true</use-java-context>
        <connection-definition>javax.sql.DataSource</connection-definition>
        <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
        <min-pool-size>5</min-pool-size>
        <max-pool-size>20</max-pool-size>
        <blocking-timeout-millis>30000</blocking-timeout-millis>
        <idle-timeout-minutes>30</idle-timeout-minutes>
        <prefill>false</prefill>
        <background-validation>false</background-validation>
        <background-validation-millis>0</background-validation-millis>
        <validate-on-match>true</validate-on-match>
        <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
        <isSameRM-override-value>false</isSameRM-override-value>
        <allocation-retry>0</allocation-retry>
        <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
        <application-managed-security xsi:type="securityMetaData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <local-transaction/>
        <user-name>*******</user-name>
        <password>***************</password>
        <check-valid-connection-sql>SELECT * FROM DUAL</check-valid-connection-sql>
        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
        <prepared-statement-cache-size>0</prepared-statement-cache-size>
        <share-prepared-statements>false</share-prepared-statements>
        <set-tx-query-timeout>false</set-tx-query-timeout>
        <query-timeout>0</query-timeout>
        <use-try-lock>60000</use-try-lock>
        <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
        <connection-url>jdbc:oracle:thin:@buf-ont1.ctg.com:1521:orcl</connection-url>
    </local-tx-datasource>
</datasources>

I have been able to get all driver connections to show from within Eclipse Database Development perspective so I know the drivers are working.

Any ideas?

Avatar

Level 2

Here is a JBoss tutorial on connecting to Oracle: http://community.jboss.org/wiki/SetupAOracleDataSource.

I would update your oracle-ds to match the file in the tutorial. Initially take out the additional properties defined in your xml. You can add them back when a basic connection is working. Also match the order of your tags as in their example just in case.

I will try to test an Oracle/JBoss 5.1 connection when I am able. I suspect it will be several days before I get to it though.

Avatar

Former Community Member

OK, tried the JBoss template example version supplied with JBoss (and tutorial) and same issue.

RDS view does not see the source.

The previous post -ds.xml came from creating a DS in the JBoss Admin console.

Which the admin console shows the data source status as available and the smaller DS attached as unavailable even after JBoss restart.

I also thought I'd try configuring a XA-ds.xml and found out that my Oracle drivers did not contain the oracle.jdbc.xa.client.OracleXADataSource class so no luck there:

Attache sample does not work either (username and pwd **** out for post):

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>HERSDataSource</jndi-name>
    <connection-url>jdbc:oracle:thin:@buf-ont1.ctg.com:1521:orcl</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>******</user-name>
    <password>*******</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>5</idle-timeout-minutes>
<!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
    <!-- Checks the Oracle error codes and messages for fatal errors -->
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter     </exception-sorter-class-name>
        <!-- sql to call when connection is created
        <new-connection-sql>some arbitrary sql</new-connection-sql>
        -->

        <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is preferred
        <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
         <type-mapping>Oracle9i</type-mapping>
      </metadata>

  </local-tx-datasource>
</datasources>

Incidentally I noticed that the logs do not show any messages that the RDS servlet is even running is there something I need to add to the service-config.xml

in order to see debug messages that may help here?

<filters>

<pattern>Endpoint.*</pattern>

<pattern>Service.*</pattern>

<!-- <pattern>Service.Data.Fiber</pattern>-->

<pattern>Configuration</pattern>

<pattern>Message.*</pattern> <pattern>DataService.*</pattern><pattern>SocketServer.*</pattern>

</filters>