Forums Register Login

3 days stucked - NullPointer Persistent Unit no Caused By

+Pie Number of slices to send: Send
I´m taking the following error, my jboss 5.1 do not start and I can´t find the cause:


ejb-jar.xml


persistence.xml


Bean


interface


I´m 3 days stucked on this, please help me!
+Pie Number of slices to send: Send

ds-mysql


oracle-ds
+Pie Number of slices to send: Send
Hello,

Actuallly i have the same problem, i spent a week trying to make it work but no way!!

I need to define a new oracle datasource, i am using Oracle 11g , Jboss 5.1

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>jdbcracle:thin:@localhost:1521:test</connection-url> -->
<connection-url>jdbc:oracle:thin:@localhost:1521:test</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>USER</user-name>
<password>passwd</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>200</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<blocking-timeout-millis>10000</blocking-timeout-millis>

<metadata> <type-mapping>Oracle9i</type-mapping> </metadata>


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



My persistence.xml

<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

<persistence-unit name="Persistance" transaction-type="JTA">
<jta-data-source>java:/OracleDS</jta-data-source>

<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>


</persistence-unit>
</persistence>



when i deploy my ejb project on jboss i get these errors,

2012-05-24 15:37:07,908 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (main) Starting persistence unit persistence.unit:unitName=#Persistance
2012-05-24 15:37:07,908 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=persistence.unit:unitName=#Persistance state=Create
javax.naming.NameNotFoundException: OracleDS not bound



DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=Persistence2.jar,name=TotoBean,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=Persistence2.jar,name=TotoBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#Persistance' **")
Deployment "jboss.j2ee:jar=Persistence2.jar,name=TotoBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:jar=Persistence2.jar,name=TotoBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")

DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:jar=Persistence2.jar,name=TotoBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#Persistance' **
Deployment "persistence.unit:unitName=#Persistance" is in error due to the following reason(s): javax.naming.NameNotFoundException: OracleDS not bound



but in the JMX console i can see my beans!

Please can anyone help me, i really need it :s ???
No more fooling around. Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2089 times.
Similar Threads
problem: Deployment of same EJB components with different JNDI name.
instantiate Seam component: hibernateSessionFactory:
instantiate Seam component: hibernateSessionFactory:
Server starts but page can't display (JBoss AS 5.1.0.GA)
@PostConstruct is never called.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:38:41.