0 Replies Latest reply on May 21, 2006 7:01 PM by Arthur Wang

    CLASSPATH problem with ojdbc14.jar

    Arthur Wang Newbie

      I run jboss4.0.2 on Redhat ES and put ojdbc14.jar in

      /usr/local/jboss4.0.2/server/all/lib,

      then I start my application, and print out the driver version of jdbc: it's 10.1.0 which is not what I expect, it's supposed to be 10.2.0, because I copy the ojdbc14.jar from oracle 10.2 , and the same package print out the jdbc driver version is 10.2 in window 2003 stardard server. then, I remove the ojdbc14.jar from the folder: /usr/local/jboss4.0.2/server/all/lib

      the application still has jdbc driver with 10.1 version, that means jboss did not pick up the ojdbc14.jar file in ..../server/all/lib folder, there must have other package privde jdbc driver with 10.1 version. but I can not find it even I tried command:

      find -name 'ojdbc14.jar'

      does jdk1.5 contain jdbc driver 10.1?

      please look at the output below
      *****************************************************
      SSH Secure Shell 3.2.3 (Build 279)
      Copyright (c) 2000-2003 SSH Communications Security Corp - http://www.ssh.com/

      This copy of SSH Secure Shell is a non-commercial version.
      This version does not include PKI and PKCS #11 functionality.


      Last login: Fri May 19 17:22:06 2006 from 192.168.1.190
      [root@appserver2 ~]# ll
      total 187932
      -rw-r--r-- 1 root root 1382 May 1 15:21 anaconda-ks.cfg
      drwxr-xr-x 2 root root 4096 May 3 12:58 Desktop
      -rw-r--r-- 1 root root 50005 May 1 15:20 install.log
      -rw-r--r-- 1 root root 5247 May 1 15:20 install.log.syslog
      drwxr-xr-x 7 root root 4096 May 4 17:13 jboss-4.0.2
      -rw-r--r-- 1 root root 61652409 May 3 03:25 jboss-4.0.2.tar.gz
      -rw-r--r-- 1 root root 47479578 Nov 10 2005 jdk-1_5_0_06-linux-i586.rpm
      -rwxr-xr-x 1 root root 47152737 May 3 00:49 jdk-1_5_0_06-linux-i586-rpm.bin
      -rw-r--r-- 1 root root 16396554 Nov 10 2005 jre-1_5_0_06-linux-i586.rpm
      -rwxr-xr-x 1 root root 16221170 May 3 02:40 jre-1_5_0_06-linux-i586-rpm.bin
      -rw-r--r-- 1 root root 1536554 Aug 16 2005 ojdbc14.jar
      -rw-r--r-- 1 root root 1642006 Aug 17 2005 orai18n.jar
      [root@appserver2 ~]# cp orai18n.jar /usr/local/jboss-4.0.2/server/all/lib/
      [root@appserver2 ~]# cd /usr/local/jboss-4.0.2/server/all/l
      lib/ log/
      [root@appserver2 ~]# cd /usr/local/jboss-4.0.2/server/all/lib/
      [root@appserver2 lib]# ll
      total 15688
      -rw-r--r-- 1 root root 54850 May 11 21:30 activation.jar
      -rw-r--r-- 1 root root 5173 May 11 21:30 autonumber-plugin.jar
      -rw-r--r-- 1 root root 73729 May 11 21:30 avalon-framework.jar
      -rw-r--r-- 1 root root 516248 May 11 21:30 bcel.jar
      -rw-r--r-- 1 root root 20726 May 11 21:30 bindingservice-plugin.jar
      -rw-r--r-- 1 root root 242474 May 11 21:30 bsh-1.3.0.jar
      -rw-r--r-- 1 root root 12885 May 11 21:30 bsh-deployer.jar
      -rw-r--r-- 1 root root 188671 Aug 1 2004 commons-beanutils.jar
      -rw-r--r-- 1 root root 222862 May 11 21:30 commons-httpclient.jar
      -rw-r--r-- 1 root root 31774 May 11 21:30 commons-logging.jar
      -rw-r--r-- 1 root root 616896 May 11 21:30 hsqldb.jar
      -rw-r--r-- 1 root root 8115 May 11 21:30 hsqldb-plugin.jar
      -rw-r--r-- 1 root root 4249746 May 11 21:30 jacorb.jar
      -rw-r--r-- 1 root root 98717 May 11 21:30 javax.servlet.jar
      -rw-r--r-- 1 root root 51514 May 11 21:30 javax.servlet.jsp.jar
      -rw-r--r-- 1 root root 395402 May 11 21:30 jboss-cache.jar
      -rw-r--r-- 1 root root 68351 May 11 21:30 jboss-common-jdbc-wrapper.jar
      -rw-r--r-- 1 root root 218616 May 11 21:30 jbossha.jar
      -rw-r--r-- 1 root root 353472 May 11 21:30 jboss-iiop.jar
      -rw-r--r-- 1 root root 432166 May 11 21:30 jboss-j2ee.jar
      -rw-r--r-- 1 root root 2000642 May 11 21:30 jboss.jar
      -rw-r--r-- 1 root root 29451 May 11 21:30 jboss-jaxrpc.jar
      -rw-r--r-- 1 root root 170442 May 11 21:30 jboss-jca.jar
      -rw-r--r-- 1 root root 14207 May 11 21:30 jboss-jsr77.jar
      -rw-r--r-- 1 root root 160421 May 11 21:30 jboss-management.jar
      -rw-r--r-- 1 root root 41936 May 11 21:30 jboss-monitoring.jar
      -rw-r--r-- 1 root root 513017 May 11 21:30 jbossmq.jar
      -rw-r--r-- 1 root root 177685 May 11 21:30 jboss-remoting.jar
      -rw-r--r-- 1 root root 17753 May 11 21:30 jboss-saaj.jar
      -rw-r--r-- 1 root root 302706 May 11 21:30 jbosssx.jar
      -rw-r--r-- 1 root root 43682 May 11 21:30 jboss-transaction.jar
      -rw-r--r-- 1 root root 1652704 May 11 21:30 jgroups.jar
      -rw-r--r-- 1 root root 26487 May 11 21:30 jmx-adaptor-plugin.jar
      -rw-r--r-- 1 root root 38037 May 11 21:30 jnpserver.jar
      -rw-r--r-- 1 root root 3510 May 11 21:30 jpl-pattern.jar
      -rw-r--r-- 1 root root 16988 May 11 21:30 jpl-util.jar
      -rw-r--r-- 1 root root 3585 May 11 21:30 license.html
      -rw-r--r-- 1 root root 353231 May 11 21:30 log4j.jar
      -rw-r--r-- 1 root root 327831 May 11 21:30 mail.jar
      -rw-r--r-- 1 root root 5713 May 11 21:30 mail-plugin.jar
      -rw-r--r-- 1 root root 1642006 May 19 17:56 orai18n.jar
      -rw-r--r-- 1 root root 8396 May 11 21:30 properties-plugin.jar
      -rw-r--r-- 1 root root 3795 May 11 21:30 scheduler-plugin-example.jar
      -rw-r--r-- 1 root root 48448 May 11 21:30 scheduler-plugin.jar
      -rw-r--r-- 1 root root 76242 May 11 21:30 scout.jar
      -rw-r--r-- 1 root root 98503 May 11 21:30 snmp-support.jar
      -rw-r--r-- 1 root root 2207 May 11 21:30 webcallbackhandler.jar
      [root@appserver2 lib]# echo $CLASSPATH
      .:/usr/local/jboss-4.0.2/server/all/lib:/usr/local/jboss-4.0.2/lib:/usr/java/jdk1.5.0_06/lib:
      [root@appserver2 lib]# echo $PATH
      /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/jboss-4.0.2/bin:/usr/java/jdk1.5.0_06/bin:/usr/java/jdk1.5.0_06/jre/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin::/root/bin
      [root@appserver2 lib]# run.sh -c all
      =========================================================================

      JBoss Bootstrap Environment

      JBOSS_HOME: /usr/local/jboss-4.0.2

      JAVA: /usr/java/jdk1.5.0_06/bin/java

      JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh

      CLASSPATH: /usr/local/jboss-4.0.2/bin/run.jar:/usr/java/jdk1.5.0_06/lib/tools.jar

      =========================================================================

      17:58:03,860 INFO [Server] Starting JBoss (MX MicroKernel)...
      17:58:03,862 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)
      17:58:03,863 INFO [Server] Home Dir: /usr/local/jboss-4.0.2
      17:58:03,863 INFO [Server] Home URL: file:/usr/local/jboss-4.0.2/
      17:58:03,864 INFO [Server] Library URL: file:/usr/local/jboss-4.0.2/lib/
      17:58:03,865 INFO [Server] Patch URL: null
      17:58:03,865 INFO [Server] Server Name: all
      17:58:03,866 INFO [Server] Server Home Dir: /usr/local/jboss-4.0.2/server/all
      17:58:03,866 INFO [Server] Server Home URL: file:/usr/local/jboss-4.0.2/server/all/
      17:58:03,867 INFO [Server] Server Data Dir: /usr/local/jboss-4.0.2/server/all/data
      17:58:03,867 INFO [Server] Server Temp Dir: /usr/local/jboss-4.0.2/server/all/tmp
      17:58:03,867 INFO [Server] Server Config URL: file:/usr/local/jboss-4.0.2/server/all/conf/
      17:58:03,868 INFO [Server] Server Library URL: file:/usr/local/jboss-4.0.2/server/all/lib/
      17:58:03,868 INFO [Server] Root Deployment Filename: jboss-service.xml
      17:58:03,873 INFO [Server] Starting General Purpose Architecture (GPA)...
      17:58:04,267 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
      17:58:04,267 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_06-b05,Sun Microsystems Inc.
      17:58:04,267 INFO [ServerInfo] OS-System: Linux 2.6.9-34.ELsmp,i386
      17:58:05,092 INFO [Server] Core system initialized
      17:58:09,442 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
      17:58:09,539 INFO [WebService] Using RMI server codebase: http://appserver2.mailamerica.com:8083/
      17:58:09,872 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
      17:58:18,449 INFO [SnmpAgentService] SNMP agent going active
      17:58:19,269 INFO [DefaultPartition] Initializing
      17:58:19,351 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is appserver2:32800 (additional data: 14 bytes)
      -------------------------------------------------------
      17:58:21,373 INFO [DefaultPartition] Number of cluster members: 1
      17:58:21,373 INFO [DefaultPartition] Other members: 0
      17:58:21,373 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
      17:58:21,388 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 0, delta: 0) : [127.0.0.1:1099]
      17:58:21,392 INFO [DefaultPartition] I am (127.0.0.1:1099) received membershipChanged event:
      17:58:21,392 INFO [DefaultPartition] Dead members: 0 ([])
      17:58:21,392 INFO [DefaultPartition] New Members : 0 ([])
      17:58:21,392 INFO [DefaultPartition] All Members : 1 ([127.0.0.1:1099])
      17:58:21,416 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/0.0.0.0
      17:58:21,422 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on 0.0.0.0/0.0.0.0:1102, group=230.0.0.4, HA-JNDI address=127.0.0.1:1100
      17:58:23,978 INFO [orb] ORB run
      17:58:24,097 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000D0000102000000000A3132372E302E302E31000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000004C000000000000000100000000000000240000001C0000007E00000000000000010000000A3132372E302E302E31000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
      17:58:24,303 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000D0000102000000000A3132372E302E302E31000DC8000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000004C000000000000000100000000000000240000001C0000007E00000000000000010000000A3132372E302E302E31000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
      17:58:25,541 INFO [MailService] Mail Service bound to java:/Mail
      17:58:26,104 INFO [TreeCache] setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=8;loopback=false;mcast_addr=230.1.2.7;mcast_port=45577;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
      17:58:26,150 INFO [TreeCache] interceptor chain is:
      class org.jboss.cache.interceptors.CallInterceptor
      class org.jboss.cache.interceptors.LockInterceptor
      class org.jboss.cache.interceptors.UnlockInterceptor
      class org.jboss.cache.interceptors.ReplicationInterceptor
      17:58:26,151 INFO [TreeCache] cache mode is REPL_ASYNC
      17:58:26,182 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is appserver2:32803
      -------------------------------------------------------
      17:58:28,187 INFO [TreeCache] viewAccepted(): new members: [appserver2:32803]
      17:58:28,187 INFO [TreeCache] new cache is null (maybe first member in cluster)
      17:58:28,187 INFO [TreeCache] state could not be retrieved (must be first member in group)
      17:58:28,373 INFO [Embedded] Catalina naming disabled
      17:58:29,208 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
      17:58:29,211 INFO [Catalina] Initialization processed in 781 ms
      17:58:29,215 INFO [StandardService] Starting service jboss.web
      17:58:29,221 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.9
      17:58:29,305 INFO [StandardHost] XML validation disabled
      17:58:29,343 INFO [Catalina] Server startup in 131 ms
      17:58:29,538 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy/httpha-invoker.sar/invoker.war/
      17:58:29,874 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
      17:58:30,528 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=file:/usr/local/jboss-4.0.2/server/all/tmp/deploy/tmp36771jboss-ws4ee.war/
      17:58:30,656 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy/jbossweb-tomcat55.sar/ROOT.war/
      17:58:30,820 INFO [TomcatDeployer] deploy, ctxPath=/juddi, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy/juddi-service.sar/juddi.war/
      17:58:31,459 INFO [RegistryServlet] Loading jUDDI configuration.
      17:58:31,461 INFO [RegistryServlet] Resources loaded from: /WEB-INF/juddi.properties
      17:58:31,461 INFO [RegistryServlet] Initializing jUDDI components.
      17:58:31,691 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy/management/console-mgr.sar/web-console.war/
      17:58:32,441 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy-hasingleton/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
      17:58:33,417 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/jboss-ha-local-jdbc.rar
      17:58:33,615 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/jboss-ha-xa-jdbc.rar
      17:58:34,209 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/jboss-local-jdbc.rar
      17:58:34,522 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/jboss-xa-jdbc.rar
      17:58:34,719 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/jms/jms-ra.rar
      17:58:34,935 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/usr/local/jboss-4.0.2/server/all/deploy/mail-ra.rar
      17:58:35,870 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS to JNDI name 'java:DefaultDS'
      17:58:36,250 INFO [A] Bound to JNDI name: queue/A
      17:58:36,254 INFO [B] Bound to JNDI name: queue/B
      17:58:36,290 INFO [C] Bound to JNDI name: queue/C
      17:58:36,314 INFO [D] Bound to JNDI name: queue/D
      17:58:36,318 INFO [ex] Bound to JNDI name: queue/ex
      17:58:36,453 INFO [testTopic] Bound to JNDI name: topic/testTopic
      17:58:36,457 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      17:58:36,461 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      17:58:36,465 INFO [testQueue] Bound to JNDI name: queue/testQueue
      17:58:36,584 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
      17:58:36,707 INFO [DLQ] Bound to JNDI name: queue/DLQ
      17:58:37,117 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA'
      17:58:37,162 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/usr/local/jboss-4.0.2/server/all/deploy/jmx-console.war/
      17:58:38,883 INFO [TomcatDeployer] deploy, ctxPath=/wts, warUrl=file:/usr/local/jboss-4.0.2/server/all/tmp/deploy/tmp36823wts.war/
      17:58:40,082 INFO [TilesPlugin] Tiles definition factory loaded for module ''.
      17:58:40,095 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
      17:58:40,096 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
      17:58:40,606 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
      17:58:40,957 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      17:58:41,083 INFO [JkMain] Jk running ID=0 time=0/216 config=null
      17:58:41,100 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 37s:227ms
      17:59:14,798 INFO [TilesRequestProcessor] Tiles definition factory found for request processor ''.
      17:59:15,788 INFO [STDOUT] jdbc driver version is: 10.1.0.2.0
      17:59:15,789 INFO [STDOUT] the active connection is:1
      17:59:16,090 INFO [STDOUT] java.sql.SQLException: Bigger type length than Maximum
      17:59:16,092 INFO [STDOUT] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      17:59:16,092 INFO [STDOUT] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
      17:59:16,093 INFO [STDOUT] at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:885)
      17:59:16,093 INFO [STDOUT] at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2231)
      17:59:16,093 INFO [STDOUT] at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1048)
      17:59:16,094 INFO [STDOUT] at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:112)
      17:59:16,094 INFO [STDOUT] at oracle.jdbc.driver.T4CTTIdcb.receiveFromRefCursor(T4CTTIdcb.java:104)
      17:59:16,094 INFO [STDOUT] at oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRow(T4CResultSetAccessor.java:165)
      17:59:16,094 INFO [STDOUT] at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:788)
      17:59:16,095 INFO [STDOUT] at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:705)
      17:59:16,095 INFO [STDOUT] at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:527)
      17:59:16,095 INFO [STDOUT] at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
      17:59:16,096 INFO [STDOUT] at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:783)
      17:59:16,096 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
      17:59:16,096 INFO [STDOUT] at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
      17:59:16,097 INFO [STDOUT] at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2979)
      17:59:16,097 INFO [STDOUT] at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4103)
      ..................