Closed andreasernst closed 5 years ago
What method are you using to change the virtual server and context root? How does it fail?
Ah, sorry, the web gui.
What goes wrong? Is there any message in the logs?
I cannot edit the Virtual Server and the Context Root ( Applications -> click on the deployed App). An EJB App does not offer to edit Virtual Server and the Context Root, but an Web App does. No, there is nothing in the logs, because it isn't an exception.
I looked into the files: applications.jsf at line 76 ... Key="#{pageSession.appType}" ... at line 80 gf.redirect(page="#{request.contextPath}/#{requestScope.dPage}?appName=#{pageSession.encodedAppName}&appType=#{pageSession.appType}")
The appType (Engine) is EJB and WEB, but editWar.jsf?appName=AEOnline-iOS&appType=war&bare=true editEjb.jsf?appName=AEOnlineExtranet&appType=ejb&bare=true
If the Engine is EJB and WEB, we need the editWar.jsf otherwise we can't change Virtual Server and the Context Root. Only undeploy and redeploy.
After a restart Payara does not mount the Virual Server, so you see the Payara standard webpage.
Is the EJB app just containing some RESTful web services. I am just trying to understand what is using the virtual root in the EJB application?
No, at the moment not. The EJB contains the persistence classes from the databases.
IIRC RESTful services uses HTTP. If i use rest.domain.com, i need to add this to Payara.
This is an anoying bug, because after a restart, you have to redeploy, Payara show it's webpage.
@andreasernst, do you still have the same problem with Virtual Server and Contet Root in a more recent version of Payara Server? If yes, would you please provide your domain.xml and ideally the application you are deploying?
I am having a very similar problem:
Somehow on the path when regularly altering "Default Web Module" something gets broken which omits saving the form for Virtual Server "server":
[#|2017-01-14T21:35:41.069+0100|SEVERE|Payara 4.1|org.glassfish.admingui|_Thread
ID=102;_ThreadName=admin-thread-pool(5);_TimeMillis=1484426141069;_LevelValue=10
00;|
RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4848/m
anagement/domain/configs/config/server-config/http-service/virtual-server//prope
rty.json'; attrs = '{}'|#]
After trying to save the form some of the input values are cleared (without having been saved).
It´s Payara 4.1.1.164
Hi @MartinSchmid2409, why do you think that this is a similar problem? It does not seem to me - you are referring to using "default web module", but the original issues is virtual server and context root (no mention about the default). Also, your error message is completely new.
Please raise a new issue for your problem. And provide more details, please, as I was not able to reproduce any issue when setting altering "Default Web Module" via the gui admin console. Try observing some patterns in when it happens, and describe several steps that repeatedly lead to the error.
Hi, the error is still in 164. I setup a new Payara, attached the domain.xml
<domain application-root="${com.sun.aas.instanceRoot}/applications" version="28" log-root="${com.sun.aas.instanceRoot}/logs">
<security-configurations>
<authentication-service default="true" name="adminAuth" use-password-credential="true">
<security-provider provider-name="adminSpc" name="spcrealm" type="LoginModule">
<login-module-config control-flag="sufficient" module-class="com.sun.enterprise.admin.util.AdminLoginModule" name="adminSpecialLM">
<property name="config" value="server-config"></property>
<property name="auth-realm" value="admin-realm"></property>
</login-module-config>
</security-provider>
<security-provider provider-name="adminFile" name="filerealm" type="LoginModule">
<login-module-config control-flag="sufficient" module-class="com.sun.enterprise.security.auth.login.FileLoginModule" name="adminFileLM">
<property name="config" value="server-config"></property>
<property name="auth-realm" value="admin-realm"></property>
</login-module-config>
</security-provider>
</authentication-service>
<authorization-service default="true" name="authorizationService">
<security-provider provider-name="simpleAuthorizationProvider" name="simpleAuthorization" type="Simple">
<authorization-provider-config name="simpleAuthorizationProviderConfig" support-policy-deploy="false"></authorization-provider-config>
</security-provider>
</authorization-service>
</security-configurations>
<managed-job-config></managed-job-config>
<system-applications>
<application context-root="" object-type="system-admin" directory-deployed="true" name="__admingui" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui">
<module name="__admingui">
<engine sniffer="web"></engine>
<engine sniffer="security"></engine>
</module>
</application>
</system-applications>
<resources>
<jdbc-resource pool-name="__TimerPool" object-type="system-admin" jndi-name="jdbc/__TimerPool"></jdbc-resource>
<jdbc-resource pool-name="DerbyPool" object-type="system-all" jndi-name="jdbc/__default"></jdbc-resource>
<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" name="__TimerPool" res-type="javax.sql.XADataSource">
<property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
<property name="connectionAttributes" value=";create=true"></property>
</jdbc-connection-pool>
<jdbc-connection-pool is-isolation-level-guaranteed="false" datasource-classname="org.apache.derby.jdbc.ClientDataSource" name="DerbyPool" res-type="javax.sql.DataSource">
<property name="PortNumber" value="1527"></property>
<property name="Password" value="APP"></property>
<property name="User" value="APP"></property>
<property name="serverName" value="localhost"></property>
<property name="DatabaseName" value="sun-appserv-samples"></property>
<property name="connectionAttributes" value=";create=true"></property>
</jdbc-connection-pool>
<connector-connection-pool max-pool-size="250" resource-adapter-name="jmsra" steady-pool-size="1" name="jms/__defaultConnectionFactory-Connection-Pool" connection-definition-name="javax.jms.ConnectionFactory"></connector-connection-pool>
<connector-resource pool-name="jms/__defaultConnectionFactory-Connection-Pool" object-type="system-all-req" jndi-name="jms/__defaultConnectionFactory"></connector-resource>
<context-service object-type="system-all" jndi-name="concurrent/__defaultContextService"></context-service>
<managed-executor-service object-type="system-all" jndi-name="concurrent/__defaultManagedExecutorService"></managed-executor-service>
<managed-scheduled-executor-service object-type="system-all" jndi-name="concurrent/__defaultManagedScheduledExecutorService"></managed-scheduled-executor-service>
<managed-thread-factory object-type="system-all" jndi-name="concurrent/__defaultManagedThreadFactory"></managed-thread-factory>
<jdbc-connection-pool datasource-classname="org.mariadb.jdbc.MariaDbDataSource" name="payaraPool" wrap-jdbc-objects="false" connection-validation-method="auto-commit" res-type="javax.sql.DataSource">
<property name="URL" value="jdbc:mariadb://localhost/database“></property>
<property name="Password" value=""></property>
<property name="User" value=""></property>
</jdbc-connection-pool>
<jdbc-resource pool-name="payaraPool" jndi-name="jdbc/payara"></jdbc-resource>
</resources>
<servers>
<server config-ref="server-config" name="server">
<application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref>
<application-ref ref="WebApp" virtual-servers="server"></application-ref>
<resource-ref ref="jdbc/__TimerPool"></resource-ref>
<resource-ref ref="jdbc/__default"></resource-ref>
<resource-ref ref="jms/__defaultConnectionFactory"></resource-ref>
<resource-ref ref="concurrent/__defaultContextService"></resource-ref>
<resource-ref ref="concurrent/__defaultManagedExecutorService"></resource-ref>
<resource-ref ref="concurrent/__defaultManagedScheduledExecutorService"></resource-ref>
<resource-ref ref="concurrent/__defaultManagedThreadFactory"></resource-ref>
<resource-ref ref="jdbc/payara"></resource-ref>
</server>
</servers>
<nodes>
<node name="localhost-domain1" install-dir="${com.sun.aas.productRoot}" type="CONFIG" node-host="localhost"></node>
</nodes>
<configs>
<config name="server-config">
<system-property name="JMS_PROVIDER_PORT" description="Port Number that JMS Service will listen for remote clients connection." value="7676"></system-property>
<http-service>
<access-log></access-log>
<virtual-server network-listeners="http-listener-1,http-listener-2" id="server"></virtual-server>
<virtual-server network-listeners="admin-listener" id="__asadmin"></virtual-server>
</http-service>
<iiop-service>
<orb use-thread-pool-ids="thread-pool-1"></orb>
<iiop-listener address="0.0.0.0" port="3700" lazy-init="true" id="orb-listener-1"></iiop-listener>
<ssl></ssl>
<iiop-listener address="0.0.0.0" port="3820" id="SSL" security-enabled="true">
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
</iiop-listener>
<iiop-listener address="0.0.0.0" port="3920" id="SSL_MUTUALAUTH" security-enabled="true">
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
</iiop-listener>
</iiop-service>
<admin-service system-jmx-connector-name="system" type="das-and-server">
<jmx-connector address="0.0.0.0" port="8686" name="system" auth-realm-name="admin-realm" security-enabled="false"></jmx-connector>
<property name="adminConsoleContextRoot" value="/admin"></property>
<property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
<property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property>
<das-config></das-config>
</admin-service>
<connector-service></connector-service>
<transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
<hazelcast-runtime-configuration></hazelcast-runtime-configuration>
<asadmin-recorder-configuration></asadmin-recorder-configuration>
<request-tracing-service-configuration>
<log-notifier></log-notifier>
</request-tracing-service-configuration>
<notification-service-configuration enabled="true">
<log-notifier-configuration enabled="true"></log-notifier-configuration>
</notification-service-configuration>
<batch-runtime-configuration></batch-runtime-configuration>
<phone-home-runtime-configuration></phone-home-runtime-configuration>
<jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
<jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
</jms-service>
<web-container>
<session-config>
<session-manager>
<store-properties></store-properties>
<manager-properties></manager-properties>
</session-manager>
<session-properties></session-properties>
</session-config>
</web-container>
<ejb-container>
<ejb-timer-service></ejb-timer-service>
</ejb-container>
<rest-config></rest-config>
<cdi-service></cdi-service>
<diagnostic-service></diagnostic-service>
<security-service>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
<property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
<property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
<jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
<property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
</jacc-provider>
<jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
<audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
<property name="auditOn" value="false"></property>
</audit-module>
<message-security-config auth-layer="SOAP">
<provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="dynamic.username.password" value="false"></property>
<property name="debug" value="false"></property>
</provider-config>
<provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="dynamic.username.password" value="false"></property>
<property name="debug" value="false"></property>
<property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
</provider-config>
<provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="debug" value="false"></property>
</provider-config>
<provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="debug" value="false"></property>
<property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
</provider-config>
</message-security-config>
<message-security-config auth-layer="HttpServlet">
<provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule">
<request-policy auth-source="sender"></request-policy>
<response-policy></response-policy>
<property name="loginPage" value="/login.jsf"></property>
<property name="loginErrorPage" value="/loginError.jsf"></property>
</provider-config>
</message-security-config>
<property name="default-digest-algorithm" value="SHA-256"></property>
</security-service>
<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="">
<jvm-options>-XX:MaxPermSize=192m</jvm-options>
<jvm-options>-client</jvm-options>
<jvm-options>-Djava.awt.headless=true</jvm-options>
<jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
<jvm-options>-Djavax.xml.accessExternalSchema=all</jvm-options>
<jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
<jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
<jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
<jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
<jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
<jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
<jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall</jvm-options>
<jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
<jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
<jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
<jvm-options>-Dgosh.args=--nointeractive</jvm-options>
<jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
<jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
<jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-Dcom.ctc.wstx.returnNullForDefaultNamespace=true</jvm-options>
<jvm-options>-Djdk.tls.rejectClientInitiatedRenegotiation=true</jvm-options>
<jvm-options>-Dorg.jboss.weld.serialization.beanIdentifierIndexOptimization=false</jvm-options>
<jvm-options>-Dorg.glassfish.grizzly.DEFAULT_MEMORY_MANAGER=org.glassfish.grizzly.memory.HeapMemoryManager</jvm-options>
</java-config>
<network-config>
<protocols>
<protocol name="http-listener-1">
<http max-connections="250" default-virtual-server="server">
<file-cache></file-cache>
</http>
<ssl></ssl>
</protocol>
<protocol name="http-listener-2" security-enabled="true">
<http max-connections="250" default-virtual-server="server">
<file-cache></file-cache>
</http>
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
</protocol>
<protocol name="admin-listener">
<http encoded-slash-enabled="true" max-connections="250" default-virtual-server="__asadmin">
<file-cache></file-cache>
</http>
</protocol>
</protocols>
<network-listeners>
<network-listener protocol="http-listener-1" port="8080" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
<network-listener protocol="http-listener-2" port="8181" name="http-listener-2" thread-pool="http-thread-pool" transport="tcp"></network-listener>
<network-listener protocol="admin-listener" port="4848" name="admin-listener" thread-pool="admin-thread-pool" transport="tcp"></network-listener>
</network-listeners>
<transports>
<transport name="tcp"></transport>
</transports>
</network-config>
<thread-pools>
<thread-pool name="admin-thread-pool" min-thread-pool-size="1" max-thread-pool-size="15" max-queue-size="256"></thread-pool>
<thread-pool name="http-thread-pool"></thread-pool>
<thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool>
</thread-pools>
<group-management-service>
<failure-detection></failure-detection>
</group-management-service>
<monitoring-service>
<module-monitoring-levels></module-monitoring-levels>
</monitoring-service>
<availability-service></availability-service>
</config>
<config name="default-config">
<http-service>
<access-log></access-log>
<virtual-server network-listeners="http-listener-1, http-listener-2" id="server">
<property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property>
</virtual-server>
<virtual-server network-listeners="admin-listener" id="__asadmin"></virtual-server>
</http-service>
<iiop-service>
<orb use-thread-pool-ids="thread-pool-1"></orb>
<iiop-listener address="0.0.0.0" port="${IIOP_LISTENER_PORT}" id="orb-listener-1"></iiop-listener>
<ssl></ssl>
<iiop-listener address="0.0.0.0" port="${IIOP_SSL_LISTENER_PORT}" id="SSL" security-enabled="true">
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
</iiop-listener>
<iiop-listener address="0.0.0.0" port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" security-enabled="true">
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
</iiop-listener>
</iiop-service>
<admin-service system-jmx-connector-name="system">
<jmx-connector address="0.0.0.0" port="${JMX_SYSTEM_CONNECTOR_PORT}" name="system" auth-realm-name="admin-realm" security-enabled="false"></jmx-connector>
<property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
<das-config></das-config>
</admin-service>
<web-container>
<session-config>
<session-manager>
<manager-properties></manager-properties>
<store-properties></store-properties>
</session-manager>
<session-properties></session-properties>
</session-config>
</web-container>
<ejb-container>
<ejb-timer-service></ejb-timer-service>
</ejb-container>
<mdb-container></mdb-container>
<jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host" type="EMBEDDED">
<jms-host port="${JMS_PROVIDER_PORT}" name="default_JMS_host" host="localhost"></jms-host>
</jms-service>
<log-service file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000">
<module-log-levels></module-log-levels>
</log-service>
<security-service>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
<property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
<property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
<property name="jaas-context" value="fileRealm"></property>
</auth-realm>
<auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
<jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
<property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
</jacc-provider>
<jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
<audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
<property name="auditOn" value="false"></property>
</audit-module>
<message-security-config auth-layer="SOAP">
<provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="dynamic.username.password" value="false"></property>
<property name="debug" value="false"></property>
</provider-config>
<provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="dynamic.username.password" value="false"></property>
<property name="debug" value="false"></property>
<property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
</provider-config>
<provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="debug" value="false"></property>
</provider-config>
<provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
<request-policy auth-source="content"></request-policy>
<response-policy auth-source="content"></response-policy>
<property name="encryption.key.alias" value="s1as"></property>
<property name="signature.key.alias" value="s1as"></property>
<property name="debug" value="false"></property>
<property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
</provider-config>
</message-security-config>
</security-service>
<transaction-service automatic-recovery="true" tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
<hazelcast-runtime-configuration></hazelcast-runtime-configuration>
<request-tracing-service-configuration>
<log-notifier></log-notifier>
</request-tracing-service-configuration>
<notification-service-configuration enabled="true">
<log-notifier-configuration enabled="true"></log-notifier-configuration>
</notification-service-configuration>
<diagnostic-service></diagnostic-service>
<java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="">
<jvm-options>-XX:MaxPermSize=192m</jvm-options>
<jvm-options>-server</jvm-options>
<jvm-options>-Djava.awt.headless=true</jvm-options>
<jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
<jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
<jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
<jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
<jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
<jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>
<jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
<jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
<jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
<jvm-options>-Dgosh.args=--nointeractive</jvm-options>
<jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
<jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
<jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
<jvm-options>-Djdk.tls.rejectClientInitiatedRenegotiation=true</jvm-options>
<jvm-options>-Dorg.jboss.weld.serialization.beanIdentifierIndexOptimization=false</jvm-options>
<jvm-options>-Dorg.glassfish.grizzly.DEFAULT_MEMORY_MANAGER=org.glassfish.grizzly.memory.HeapMemoryManager</jvm-options>
</java-config>
<availability-service>
<web-container-availability></web-container-availability>
<ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
<jms-availability></jms-availability>
</availability-service>
<network-config>
<protocols>
<protocol name="http-listener-1">
<http default-virtual-server="server">
<file-cache></file-cache>
</http>
<ssl></ssl>
</protocol>
<protocol name="http-listener-2" security-enabled="true">
<http default-virtual-server="server">
<file-cache></file-cache>
</http>
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
</protocol>
<protocol name="admin-listener">
<http max-connections="250" default-virtual-server="__asadmin">
<file-cache></file-cache>
</http>
</protocol>
<protocol name="sec-admin-listener" security-enabled="true">
<http encoded-slash-enabled="true" default-virtual-server="__asadmin">
<file-cache></file-cache>
</http>
<ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" client-auth="want" cert-nickname="glassfish-instance" renegotiate-on-client-auth-want="false"></ssl>
</protocol>
<protocol name="admin-http-redirect">
<http-redirect secure="true"></http-redirect>
</protocol>
<protocol name="pu-protocol">
<port-unification>
<protocol-finder protocol="sec-admin-listener" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="http-finder"></protocol-finder>
<protocol-finder protocol="admin-http-redirect" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="admin-http-redirect"></protocol-finder>
</port-unification>
</protocol>
</protocols>
<network-listeners>
<network-listener protocol="http-listener-1" port="${HTTP_LISTENER_PORT}" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
<network-listener protocol="http-listener-2" port="${HTTP_SSL_LISTENER_PORT}" name="http-listener-2" thread-pool="http-thread-pool" transport="tcp"></network-listener>
<network-listener protocol="pu-protocol" port="${ASADMIN_LISTENER_PORT}" name="admin-listener" thread-pool="admin-thread-pool" transport="tcp"></network-listener>
</network-listeners>
<transports>
<transport name="tcp"></transport>
</transports>
</network-config>
<thread-pools>
<thread-pool name="http-thread-pool"></thread-pool>
<thread-pool name="thread-pool-1" min-thread-pool-size="2" max-thread-pool-size="200"></thread-pool>
<thread-pool name="admin-thread-pool" min-thread-pool-size="1" max-thread-pool-size="15" max-queue-size="256"></thread-pool>
</thread-pools>
<group-management-service>
<failure-detection></failure-detection>
</group-management-service>
<system-property name="JMS_PROVIDER_PORT" description="Port Number that JMS Service will listen for remote clients connection." value="27676"></system-property>
<system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
<system-property name="HTTP_LISTENER_PORT" value="28080"></system-property>
<system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property>
<system-property name="IIOP_LISTENER_PORT" value="23700"></system-property>
<system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property>
<system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property>
<system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property>
<system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property>
<system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property>
<monitoring-service>
<module-monitoring-levels></module-monitoring-levels>
</monitoring-service>
</config>
</configs>
<property name="administrative.domain.name" value="domain1"></property>
<secure-admin special-admin-indicator="67ff66ac-4700-4d49-b343-94d436a641bf">
<secure-admin-principal dn="CN=localhost,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
<secure-admin-principal dn="CN=localhost-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
</secure-admin>
<clusters></clusters>
<applications>
<application context-root="/" object-type="user" name="WebApp" location="${com.sun.aas.instanceRootURI}/applications/WebApp/">
<property name="archiveType" value="war"></property>
<property name="java-web-start-enabled" value="true"></property>
<property name="appLocation" value="${com.sun.aas.instanceRootURI}/applications/__internal/WebApp/WebApp5893325303732779653.war"></property>
<property name="org.glassfish.ejb.container.application_unique_id" value="97303545499025408"></property>
<property name="org.glassfish.persistence.app_name_property" value="WebApp"></property>
<property name="defaultAppName" value="WebApp5893325303732779653"></property>
<module name="WebApp">
<engine sniffer="ejb"></engine>
<engine sniffer="security"></engine>
<engine sniffer="weld"></engine>
<engine sniffer="jpa"></engine>
<engine sniffer="resources"></engine>
<engine sniffer="web"></engine>
</module>
<resources>
<jdbc-connection-pool datasource-classname="org.mariadb.jdbc.MariaDbDataSource" name="java:app/payaraPool" wrap-jdbc-objects="false" connection-validation-method="auto-commit" res-type="javax.sql.DataSource">
<property name="URL" value="jdbc:mariadb://localhost/database“></property>
<property name="Password" value=""></property>
<property name="User" value=""></property>
</jdbc-connection-pool>
<jdbc-resource pool-name="java:app/payaraPool" jndi-name="java:app/jdbc/payara"></jdbc-resource>
</resources>
</application>
</applications>
</domain>
Setup the database like:
CREATE TABLE laender (nkz char(2) COLLATE latin1_bin NOT NULL, land varchar(50) COLLATE latin1_bin NOT NULL, PRIMARY KEY (nkz)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO laender (nkz, land) VALUES ('AD', 'Andorra');
INSERT INTO laender (nkz, land) VALUES ('AE', 'Vereinigte Arabische Emirate');
INSERT INTO laender (nkz, land) VALUES ('AF', 'Afghanistan');
INSERT INTO laender (nkz, land) VALUES ('AG', 'Antigua und Barbuda');
The issue is, if you need EJB, like the Timer or a Facade class, you cannot change VirtualServer and Context Root.
Here is the code https://andreasernst@github.com/andreasernst/webapp.git build with Maven and NetBeans. The database is not really needed.
Closing as very old. Please reopen if still a problem
I got a Tapestry5 App with EJB. When i deploy the WAR to Payara, i can set the Virtual Server and the Context Root. After that i can not change the Virtual Server and Context Root. Payara Server 4.1.1.154 #badassfish (build 270)