Note that there are some explanatory texts on larger screens.

plurals
  1. POURIs when using domain.xml at embedded glassfish
    primarykey
    data
    text
    <p>I'm embedding a Java EE 5 application using GlassFish 3.0.1. I already can deploy it (when using without specific configuration), but when trying to run server with the domain.xml (basically JAAS info), I get this error:</p> <pre><code>java.lang.IllegalArgumentException: URI is not absolute </code></pre> <p>My code is this (error points to the last line):</p> <pre><code>Server.Builder builder = new Server.Builder("ipc"); EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder(); File domainDir = new File( "domains/ipc-domain" ); File domainXML = new File( domainDir.getAbsoluteFile(), "config/domain.xml" ); efsb.instanceRoot( domainDir.getAbsoluteFile() ); efsb.configurationFile( domainXML.getAbsoluteFile() ); EmbeddedFileSystem efs = efsb.build(); builder.embeddedFileSystem(efs); //Trying to set variable used at domain.xml (blind shot) Properties props = new Properties(); props.setProperty( "com.sun.aas.instanceRoot" , domainDir.toURI().toString()); Server server = builder.build( props ); </code></pre> <p>My domain.xml (specific part) have this:</p> <pre><code>&lt;domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="10.0"&gt; &lt;system-applications/&gt; &lt;applications&gt; &lt;application context-root="/IPC" location="${com.sun.aas.instanceRoot}/applications/IPC/" name="IPC" object-type="user"&gt; &lt;property name="keepSessions" value="false"&gt;&lt;/property&gt; &lt;property name="defaultAppName" value="IPC"&gt;&lt;/property&gt; &lt;module name="IPC"&gt; &lt;engine sniffer="ejb"&gt;&lt;/engine&gt; &lt;engine sniffer="security"&gt;&lt;/engine&gt; &lt;engine sniffer="jpa"&gt;&lt;/engine&gt; &lt;engine sniffer="web"&gt;&lt;/engine&gt; &lt;/module&gt; &lt;/application&gt; &lt;/applications&gt; &lt;resources&gt; &lt;jdbc-connection-pool pool-resize-quantity="1" datasource-classname="org.apache.derby.jdbc.ClientDataSource" max-pool-size="2" res-type="javax.sql.DataSource" steady-pool-size="1" name="ipc-pool"&gt; &lt;property name="PortNumber" value="1527"&gt;&lt;/property&gt; &lt;property name="ServerName" value="0.0.0.0"&gt;&lt;/property&gt; &lt;property name="User" value="app"&gt;&lt;/property&gt; &lt;property name="Password" value="root"&gt;&lt;/property&gt; &lt;property name="DatabaseName" value="IPC"&gt;&lt;/property&gt; &lt;/jdbc-connection-pool&gt; &lt;jdbc-resource pool-name="ipc-pool" jndi-name="jdbc/IPC"&gt;&lt;/jdbc-resource&gt; &lt;/resources&gt; </code></pre> <p>I've already tried to change the parts related to the "${com.sun.aas.instanceRoot}" variable, but then I have small variations of the URI error. Any insight?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload