| 
					
						 Dear Community,
  I'm actually developing an swing application that should run on a PCs without any internet or network connection the application entites are retrieved from a postgres database with hibernate/JPA.  Everything is fine when the App is started inside eclipse/STS. Then I generate a runnable jar with all dependend libs with export -> runnable jar for tha isolated target pc
  when I start the App on the target pc  > java -jar -<jarname> the App crashed:
 
  13374 [main] WARN org.hibernate.ejb.packaging.PersistenceXmlLoader - Warning par sing XML: XML InputStream(14) schema_reference.4: Failed to read schema document  'http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd', because 1) could  not find the document; 2) the document could not be read; 3) the root element o f the document is not <xsd:schema>. Initial EntityManagerFactory creation failed.javax.persistence.PersistenceExcept ion: No Persistence provider for EntityManager named AppDemo: Provider named org .hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityM anagerFactory: javax.persistence.PersistenceException javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java: 265)         at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hib ernatePersistence.java:125)         at javax.persistence.Persistence.createEntityManagerFactory(Persistence. java:110)         at javax.persistence.Persistence.createEntityManagerFactory(Persistence. java:83)         at util.JPAUtil.<clinit>(JPAUtil.java:19)         at main.program.createAndWriteEntities(program.java:93)         at main.program.main(program.java:55)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
 
  that how my persistence.xml looks like:
  <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1"  xmlns="http://xmlns.jcp.org/xml/ns/persistence"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> 	<persistence-unit name="AppDemo"> 		<provider>org.hibernate.ejb.HibernatePersistence</provider>    <mapping-file>model/patient.hbm.xml</mapping-file>          <properties>             <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>     		<property name="hibernate.hbm2ddl.auto" value="none"/>             <property name="hibernate.show_sql" value="true" />             <property name="hibernate.default_schema" value="patienten"/>            	<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>             <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/postgres"/>    			<property name="hibernate.connection.user" value="postgres"/>          	<property name="hibernate.connection.password" value="ligeti"/>  	                     </properties>      </persistence-unit> </persistence>
 
  Any idea? Thank for any hint.
  Kagel 
					
  
						
					 |