[jboss-user] [JNDI and Naming] - Re: javax.naming.NameNotFoundException: persistence not bound

Trong Nguyen do-not-reply at jboss.com
Fri May 11 22:46:57 EDT 2012


Trong Nguyen [https://community.jboss.org/people/memberall] created the discussion

"Re: javax.naming.NameNotFoundException: persistence not bound"

To view the discussion, visit: https://community.jboss.org/message/735172#735172

--------------------------------------------------------------
You have to add below libs into: "c:\jboss-6.1.0.Final\server\default\lib" (I used JBoss 6.1.final ).  
1. eclipselink-2.3.0.jar
2. javax.persistence-2.0.jar
3. org.eclipse.persistence.jpa.jar
4. org.eclipse.persistence.jpa.jpql_1.0.0.jar
my persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 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_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="BluePumpkin-ejbPU" transaction-type="JTA">
     <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>java:/Bluepumpkin</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties/>
  </persistence-unit>
</persistence>
My jboos-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>Bluepumpkin</jndi-name>
    <connection-
url>jdbc:sqlserver://localhost:1433;databaseName=BluePumpkinDB</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>sa</user-name>
    <password/>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>5</idle-timeout-minutes>
  </local-tx-datasource>
</datasources>


--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/735172#735172]

Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120511/622a519c/attachment-0001.html 


More information about the jboss-user mailing list