This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes 3 days stucked - NullPointer Persistent Unit no Caused By Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "3 days stucked - NullPointer Persistent Unit no Caused By" Watch "3 days stucked - NullPointer Persistent Unit no Caused By" New topic
Author

3 days stucked - NullPointer Persistent Unit no Caused By

Floriano Peixoto
Greenhorn

Joined: Aug 31, 2011
Posts: 2
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!
Floriano Peixoto
Greenhorn

Joined: Aug 31, 2011
Posts: 2

ds-mysql


oracle-ds
rukia rukita
Greenhorn

Joined: May 24, 2012
Posts: 2
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>jdbcracle: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 ???
 
jQuery in Action, 2nd edition
 
subject: 3 days stucked - NullPointer Persistent Unit no Caused By
 
Similar Threads
@PostConstruct is never called.
jboss deployment exception
Server starts but page can't display (JBoss AS 5.1.0.GA)
Error on Starting jboss 5.1.0
problem: Deployment of same EJB components with different JNDI name.