• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

3 days stucked - NullPointer Persistent Unit no Caused By

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ds-mysql


oracle-ds
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic