jndi for db2 datasource
by Aljosa Mohorovic
i've can't deploy spring/hibernate application that deploys normally
on websphere, some error related to jndi.
i'm sure it's something stupid but i can't figure it out. any
instructions are appreciated.
Aljosa Mohorovic
20:12:48,612 INFO [ConnectionFactoryBindingService] Bound
ConnectionManager
'jboss.jca:service=DataSourceBinding,name=jdbc/db2test' to JNDI name
'java:jdbc/db2test'
[...]
20:17:29,011 INFO [TomcatDeployer] deploy, ctxPath=/db2testWeb,
warUrl=.../tmp/deploy/tmp39160db2testWeb-exp.war/
20:17:29,141 INFO [[/db2testWeb]] Initializing Spring root
WebApplicationContext
20:17:29,332 ERROR [[/db2testWeb]] Exception sending context
initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'db2testDataSource' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is javax.naming.NameNotFoundException: jdbc
not bound
Caused by:
javax.naming.NameNotFoundException: jdbc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
[...]jboss-4.2.3.GA$ cat server/default/deploy/db2-jcc-xa-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<!--
IBM DB2 XA driver
db2jcc.jar
-->
<xa-datasource>
<jndi-name>jdbc/db2test</jndi-name>
<xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
<xa-datasource-property
name="DatabaseName">db2test</xa-datasource-property>
<xa-datasource-property name="User">user</xa-datasource-property>
<xa-datasource-property
name="Password">password</xa-datasource-property>
<!-- Note, as opposed to the Type2 driver, DB2 Type 4 requires
the PortNumber. By default this is 50000-->
<xa-datasource-property name="PortNumber">50000</xa-datasource-property>
<!-- Must be set if using multiple DB2 XA resources in same
transaction -->
<isSameRM-override-value>false</isSameRM-override-value>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<metadata>
<type-mapping>DB2</type-mapping>
</metadata>
</xa-datasource>
</datasources>
17 years, 9 months
[JBoss Portal] - PC2.0 and SAR files?
by iamnew2jboss
Hello Friends,
Does JBoss Portlet Container 2.0 support deployment and usage of Custom SAR files?
As per my understanding following JARs are required for SAR (in Enterprise Portal Server scenario):
1. Jakarta Commons IO
2. Jakarta Commons Logging
3. jboss-common.jar
4. jboss-jmx.jar
5. jboss-system.jar
6. jboss-xml-binding.jar
However, I do see some *common*.jar files under: ..\jboss-portletcontainer-2.0.0-tomcat6\lib.
Is it be ok to add above (# 1,2,3) "common" jar files under the PC2.0 lib? Will it conflict with the existing common jars? Has anybody tried it before and would like to share their experiences using SARs in PC2.0?
Thank you so much in advance.
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165706#4165706
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165706
17 years, 9 months