[jboss-user] [EJB 3.0] - Unable to deploy persistence entity on JBOss : Please Help

ashusri000 do-not-reply at jboss.com
Tue Jun 19 06:45:19 EDT 2007


Dear All , 
              I am trying to deploy make a simple flow as :
Servlet ---> (invokes) Stateless Bean ---- > (invokes) Entity Bean(persistence object )


But I am unable to deploy this Entity Bean on JBoss 4.xx. I have packed this entity bean as an ear . The persistence.xml has following entries :

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="testApp" transaction-type="RESOURCE_LOCAL">
<jta-data-source>java:/XAOracleDS</jta-data-source>	
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
Emp
Employee
Software
SoftwareFile

            <!-- Provider-specific connection properties -->
            
            
            
            
            <!-- Provider-specific settings -->
            
<!-- other values are: drop-and-create-tables|none -->

</persistence-unit>




I have put the  Oracle jdbc libraries in the jboss/server/lib directory and have also configured the oracle-xa-ds.xml file for the system user and password . 

The ear contains the application.xml file which has the entry for persistence.jar as :

      sample.jar
    

    
      
		<web-uri>

            </web-uri>
		<context-root>
			sample
            </context-root>

      
    
   
            persist.jar
   


Now  when I go for the deployment I get this error on the Server console :---

 ERROR [PersistenceXmlLoader] Error parsing XML: XML InputStream(5) cvc-complex-type.2.4.a: Invalid content was found starting with element 'provider'. One of '{"http://java.sun.com/xml/ns/persistence":non-jta-data-source, "http://java.sun.com/xml/ns/persistence":mapping-file, "http://java.sun.com/xml/ns/persistence":jar-file, "http://java.sun.com/xml/ns/persistence":class, "http://java.sun.com/xml/ns/persistence":exclude-unlisted-classes, "http://java.sun.com/xml/ns/persistence":properties}' is expected.
15:53:37,093 WARN  [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=persist.jar
javax.persistence.PersistenceException: invalid persistence.xml
	at org.hibernate.ejb.packaging.PersistenceXmlLoader.loadURL(PersistenceXmlLoader.java:66)
	at org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(PersistenceXmlLoader.java:73)
	at org.jboss.ejb3.Ejb3Deployment.initializePersistenceUnits(Ejb3Deployment.java:602)
	at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:465)
	at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)




Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'provider'. One of '{"http://java.sun.com/xml/ns/persistence":non-jta-data-source, "http://java.sun.com/xml/ns/persistence":mapping-file, "http://java.sun.com/xml/ns/persistence":jar-file, "http://java.sun.com/xml/ns/persistence":class, "http://java.sun.com/xml/ns/persistence":exclude-unlisted-classes, "http://java.sun.com/xml/ns/persistence":properties}' is expected.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)



PLEASE HELP ME FIGURE OUT WHERE THE ERROR IS :?????????













View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055539#4055539

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055539



More information about the jboss-user mailing list