rukia [
https://community.jboss.org/people/rukia] created the discussion
"Re: Oracle datasource configuration with jboss 5.1"
To view the discussion, visit:
https://community.jboss.org/message/737912#737912
--------------------------------------------------------------
Yes i tried but nothing change !
I am using Oracle 11g with jboss5.1
I got this error
2012-05-25 13:21:43,798 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (main)
Starting persistence unit persistence.unit:unitName=#IAMPersistence
2012-05-25 13:21:43,798 ERROR
[org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to
Start: name=persistence.unit:unitName=#IAMPersistence state=Create
javax.naming.NameNotFoundException: OracleDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at
org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275)
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:597)
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at
org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at
org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at
org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at
org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
2012-05-25 13:22:09,314 INFO [com.sun.jersey.server.impl.application.WebApplicationImpl]
(main) Initiating Jersey application, version 'Jersey: 1.1.5.1 03/10/2010 02:33
PM'
2012-05-25 13:22:09,783 ERROR
[org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load
profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=IAMPersistence.jar,name=RequestBean,service=EJB3"
is missing the following dependencies:
Dependency "<UNKNOWN
jboss.j2ee:jar=IAMPersistence.jar,name=RequestBean,service=EJB3>" (should be in
state "Described", but is actually in state "** UNRESOLVED Demands
'persistence.unit:unitName=#IAMPersistence' **")
Deployment
"jboss.j2ee:jar=IAMPersistence.jar,name=RequestBean,service=EJB3_endpoint" is
missing the following dependencies:
Dependency "jboss.j2ee:jar=IAMPersistence.jar,name=RequestBean,service=EJB3"
(should be in state "Configured", but is actually in state
"PreInstall")
Deployment "jboss.j2ee:jar=IAMPersistence.jar,name=StepBean,service=EJB3" is
missing the following dependencies:
Dependency "<UNKNOWN
jboss.j2ee:jar=IAMPersistence.jar,name=StepBean,service=EJB3>" (should be in state
"Described", but is actually in state "** UNRESOLVED Demands
'persistence.unit:unitName=#IAMPersistence' **")
Deployment
"jboss.j2ee:jar=IAMPersistence.jar,name=StepBean,service=EJB3_endpoint" is
missing the following dependencies:
Dependency "jboss.j2ee:jar=IAMPersistence.jar,name=StepBean,service=EJB3"
(should be in state "Configured", but is actually in state
"PreInstall")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN
jboss.j2ee:jar=IAMPersistence.jar,name=RequestBean,service=EJB3>" is in error due
to the following reason(s): ** UNRESOLVED Demands
'persistence.unit:unitName=#IAMPersistence' **
Deployment "persistence.unit:unitName=#IAMPersistence" is in error due to the
following reason(s): javax.naming.NameNotFoundException: OracleDS not bound
Deployment "<UNKNOWN
jboss.j2ee:jar=IAMPersistence.jar,name=StepBean,service=EJB3>" is in error due to
the following reason(s): ** UNRESOLVED Demands
'persistence.unit:unitName=#IAMPersistence' **
My persistence.xml
<persistence
xmlns="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="IAMPersistence">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/OracleDS</jta-data-source>
<properties>
<!-- property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle10gDialect"/-->
<property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
</properties>
</persistence-unit>
</persistence>
my oracle-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<use-java-context>false</use-java-context>
<!--<connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url>
-->
<connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>ADMIAMSAAS</user-name>
<password>iamsaas</password>
<!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name-->
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<!-- 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 prefered
<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>
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/737912#737912]
Start a new discussion in Datasource Configuration at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]