[Datasource Configuration] - Wrong driver class [class comm.ibm.db2.jcc.db2Driver]
by Joseph Fouts
Joseph Fouts [https://community.jboss.org/people/foutjo] created the discussion
"Wrong driver class [class comm.ibm.db2.jcc.db2Driver]"
To view the discussion, visit: https://community.jboss.org/message/716299#716299
--------------------------------------------------------------
Trying to get db2 univeral type 4 driver to work with jboss 7.1 and keep getting :
Caused by: javax.resource.ResourceException: Wrong driver class [class com.ibm.db2.jcc.DB2Driver] for this connection URL [jdbc:db2//10.90.10.125/apdev70:60009]
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:251)
---------------------------------------------------------------------------
DB2 Version 8.1
Used jar files from IBM/SQLLIB/java
--------------------------------------------------------------------------
Setup db2 driver as module:
modules/com/ibm/db2/main/db2jcc.jar
/db2jcc_license_cu
Created module.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This file will define the DB2 database driver and any
~ dependencies.
-->
<module xmlns="urn:jboss:module:1.1" name="com.ibm.db2">
<resources>
<resource-root path="db2jcc.jar"/>
<resource-root path="db2jcc_license_cu.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="sun.jdk"/>
</dependencies>
</module>
-----------------------------------------------------------------------------------
Verifed database IP/Port/Name
10.90.10.125
60009
apdev70
------------------------------------------------------------------------------------
Added db2 datasource to standalone.xml
| | <datasources> |
| | <datasource jndi-name="java:/admindatasource" pool-name="admindatasource" enabled="true" jta="true" use-java-context="true" use-ccm="true"> |
| | <connection-url> |
| | jdbc:db2//10.90.10.125/apdev70:60009 |
| | </connection-url> |
| | <driver> |
| | db2jcc |
| | </driver> |
| | <timeout> |
| | <idle-timeout-minutes> |
| | 0 |
| | </idle-timeout-minutes> |
| | <query-timeout> |
| | 600 |
| | </query-timeout> |
| | </timeout> |
| | </datasource> |
| | <drivers> |
| | <driver name="db2jcc" module="com.ibm.db2"> |
| | <driver-class> |
| | com.ibm.db2.jcc.DB2Driver |
| | </driver-class> |
| | </driver> |
| | </drivers> |
| | </datasources> |
--------------------------------------------------------------------------------------------------------
Java code connection:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("java:/admindatasource");
Connection con = ds.getConnection();
_____________________________________________________________
When starting standalone server get the following log messages:
(See that the db2 driver is deployed and that the "admindatsource" is Bound
13:00:15,404 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 26) JBAS010403: Deploying JDBC-compliant driver class com.ibm.db2.jcc.DB2Driver (version 2.11)
13:00:15,430 INFO [org.jboss.as.remoting] (MSC service thread 1-5) Listening on /10.100.100.12:4447
13:00:15,932 INFO [org.jboss.as.remoting] (MSC service thread 1-6) Listening on /10.100.100.12:9999
13:00:15,969 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory C:\apps\jboss-as-7.1.0.CR1b\standalone\deployments
13:00:16,388 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:/admindatasource]
------------------------------------------------------------------------------------------------------
So any ideas on why I am getting the following error when trying to make a connection?
Any help is greatly appreciated.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/716299#716299]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months
[Beginner's Corner] - java.lang.ClassNotFoundException: org.omg.CORBA.TRANSIENT
by Andy Smithson
Andy Smithson [https://community.jboss.org/people/ydrol] created the discussion
"java.lang.ClassNotFoundException: org.omg.CORBA.TRANSIENT"
To view the discussion, visit: https://community.jboss.org/message/716472#716472
--------------------------------------------------------------
Hi all, Im developing web services to expose an IBM application api as web services (using Metro).
I'd normally use tomcat, but found out the API has some EJB and websphere runtime dependencies, so I'm trying to deploy 'as is' to Jboss 7.0.2 Final
I think I have pulled in the right websphere runtime libraries without clashing with jboss jars,
However, when I try to deploy I get the following error:
java.lang.ClassNotFoundException: org.omg.CORBA.TRANSIENT
I'm totally new to Jboss, and I would assume this class would be in the standard jboss class path (either in rt.jar or jacorb-2.3.1jboss.patch01-brew.jar) ?
The jacorb file is present. I'm running 'standalone.bat'. Everything is untouched/OOTB appart from JAVA_HOME and listening ports. Is there more CORBA configuration to do?
10:17:40,108 SEVERE [com.sun.xml.ws.server.http] (MSC service thread 1-4) WSSERVLET11: failed to parse runtime descriptor: java.lang.NoClassDefFoundError: org/omg/CORBA/TRANSIENT: java.lang.NoClassDefFoundError: org/omg/CORBA/TRANSIENT
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:106) [naming.jar:]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) [:1.6.0_25]
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [:1.6.0_25]
at javax.naming.InitialContext.init(InitialContext.java:223) [:1.6.0_25]
at javax.naming.InitialContext.<init>(InitialContext.java:175) [:1.6.0_25]
at com.sun.xml.ws.tx.common.TransactionManagerImpl.jndiLookup(TransactionManagerImpl.java:73) [webservices-rt.jar:]
at com.sun.xml.ws.tx.common.TransactionManagerImpl.<init>(TransactionManagerImpl.java:88) [webservices-rt.jar:]
at com.sun.xml.ws.tx.common.TransactionManagerImpl.<clinit>(TransactionManagerImpl.java:64) [webservices-rt.jar:]
at com.sun.xml.ws.tx.common.Util.isJTAAvailable(Util.java:71) [webservices-rt.jar:]
at com.sun.xml.ws.tx.runtime.TxTubeFactory.isTransactionsEnabled(TxTubeFactory.java:61) [webservices-rt.jar:]
at com.sun.xml.ws.tx.runtime.TxTubeFactory.createTube(TxTubeFactory.java:45) [webservices-rt.jar:]
at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:82) [webservices-rt.jar:]
at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createServer(TubelineAssemblerFactoryImpl.java:166) [webservices-rt.jar:]
at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:157) [webservices-rt.jar:]
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:232) [webservices-rt.jar:]
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:505) [webservices-rt.jar:]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) [webservices-rt.jar:]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) [webservices-rt.jar:]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:124) [webservices-rt.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: java.lang.ClassNotFoundException: org.omg.CORBA.TRANSIENT from [Module "deployment.myapp.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/716472#716472]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months