[jboss-user] Re: 4.2.2 wont deploy my persistency unit

samk at twinix.com samk at twinix.com
Mon Mar 24 13:01:38 EDT 2008


See Thread at: http://www.techienuggets.com/Detail?tx=18328 Posted on behalf of a User

Where is the patch? I couldn't find the URL for the discussed patch zip anywhere in this thread. Has it been removed? I use MDB in my application and running into the exact same issue.

In Response To: 

Migration from 4.2.1 to 4.2.2
using linux, java 1.5.0_13-b05

I try to deploy an .ear with a .jar inside, containing the META-INF/persistence.xml below. 

15:20:27,725 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=q.ear,unitName=manager1
15:20:27,741 WARN  [ServiceController] Problem starting service persistence.units:ear=q.ear,unitName=manager1
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial

  |   <persistence>
  |     <persistence-unit name="manager1" >    
  |       <jar-file>../ejb3/beans.jar</jar-file>
  |       <jar-file>../ejb3/beans2.jar</jar-file>
  |       <jta-data-source>java:/DefaultDS</jta-data-source>
  |       <properties>
  |         <property value="java:/Manager1" name="jboss.entity.manager.jndi.name" />
  |         <property value="java:/Manager1Factory" name="jboss.entity.manager.factory.jndi.name" />
  |         <property value="org.hibernate.dialect.HSQLDialect" name="hibernate.dialect" />
  |         <property value="update" name="hibernate.hbm2ddl.auto" />
  |         <property value="8" name="hibernate.connection.isolation" />
  |       </properties>
  |     </persistence-unit>
  |   </persistence>
  | 

Since it's complaining about jndi-factory properties, i tried to add these properties in the persistence.xml, or add a jndi.properties inside beans.jar


  | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
  | 

That didn't help.

The ear deploys on 4.2.1, but there i need to add ejb3/beans.jar in the .ear as well as in the nested .jar.





More information about the jboss-user mailing list