adutra commented on issue #939:
URL: https://github.com/apache/polaris/issues/939#issuecomment-2633351081

   Is this the admin tool or the server? I just tried both and both can start 
normally.
   
   ```shell
   # Start Postgres
   docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e 
POSTGRES_DB=POLARIS -p 5432:5432 postgres:17.2
   
   # Build Polaris
   ./gradlew clean :polaris-quarkus-admin:assemble 
:polaris-quarkus-server:assemble 
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
   
   # Run the admin tool
   java 
-Dpolaris.persistence.eclipselink.configuration-file="/path/to/persistence.xmll"
 -Dpolaris.persistence.type=eclipse-link -jar 
quarkus/admin/build/polaris-quarkus-admin-1.0.0-incubating-SNAPSHOT-runner.jar 
bootstrap -r POLARIS -c POLARIS,root,s3cr3t
   
   # Run the server
   java 
-Dpolaris.persistence.eclipselink.configuration-file="/path/to/persistence.xml" 
-Dpolaris.persistence.type=eclipse-link -jar 
quarkus/server/build/quarkus-app/quarkus-run.jar
   
   # Grab a token
   curl -s http://localhost:8181/api/catalog/v1/oauth/tokens --user root:s3cr3t 
-d 'grant_type=client_credentials' -d 'scope=PRINCIPAL_ROLE:ALL' -H 
'Polaris-Realm: POLARIS'
   ```
   
   My persistence file:
   
   ```xml
   <persistence version="2.0" 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_2_0.xsd";>
     <persistence-unit name="polaris" transaction-type="RESOURCE_LOCAL">
       <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
       <class>org.apache.polaris.jpa.models.ModelEntity</class>
       <class>org.apache.polaris.jpa.models.ModelEntityActive</class>
       <class>org.apache.polaris.jpa.models.ModelEntityChangeTracking</class>
       <class>org.apache.polaris.jpa.models.ModelEntityDropped</class>
       <class>org.apache.polaris.jpa.models.ModelGrantRecord</class>
       <class>org.apache.polaris.jpa.models.ModelPrincipalSecrets</class>
       <class>org.apache.polaris.jpa.models.ModelSequenceId</class>
       <shared-cache-mode>NONE</shared-cache-mode>
       <properties>
         <property name="jakarta.persistence.jdbc.url" 
value="jdbc:postgresql://localhost:5432/POLARIS"/>
         <property name="jakarta.persistence.jdbc.user" value="postgres"/>
         <property name="jakarta.persistence.jdbc.password" value="postgres"/>
         <property name="jakarta.persistence.schema-generation.database.action" 
value="create"/>
         <property name="eclipselink.logging.level.sql" value="FINE"/>
         <property name="eclipselink.logging.parameters" value="true"/>
         <property name="eclipselink.persistence-context.flush-mode" 
value="auto"/>
       </properties>
     </persistence-unit>
   </persistence>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to