Wildfly 27.0.1 serves blank page instead of administration console - keycloak

I think I lost some hair on this one. I'm having a problem with Wildfly - I installed it on a remote server, however, when I try to enter the administration console it gives me a blank page only.
Wildfly version 27.0.1.Final
Problem:
I visit MYDOMAIN.XYZ where I should see the administration console
I pass the authorization with user details created via ssh
I'm redirected to MYDOMAIN.XYZ/console/index.html
The loader is briefly visible, but it disappears very soon
As a final result this document is served:
<!DOCTYPE html\>
<html class="layout-pf layout-pf-fixed" lang="en"\>
<head\>
<title\>HAL Management Console\</title\>
<meta charset="utf-8"\>
<meta http-equiv="x-ua-compatible" content="ie=edge"\>
<meta name="viewport" content="width=device-width, initial-scale=1"\>
<link rel="icon shortcut" type="image/x-icon" href="favicon.db74b3b0.ico"\>
<link rel="apple-touch-icon" href="apple-touch-icon.fedc4af6.png"\>
<link rel="stylesheet" href="dev.291b1e16.css" media="screen"\>
<script type="module" src="dev.75953f7e.js"\>\</script\>\<script src="dev.159a2c8f.js" nomodule defer\>\</script\>\<script src="hal.nocache.js"\>\</script\>
</head\>
<body\> \</body\>
</html\>
Here's a log from console
index.html:1 GET https://MYDOMAIN.XYZ/console/dev.75953f7e.js net::ERR_ABORTED 403
hal-0.js:10337 Set log level to INFO
hal.nocache.js:6 \[Violation\] 'readystatechange' handler took 202ms
hal-0.js:10706 GET https://MYDOMAIN.XYZ/keycloak/adapter/wildfly-console 404
hal-0.js:10713 10:09:20.670 ERROR o.j.h.c.b.endpoint.EndpointManager Keycloak adapter 'https://MYDOMAIN.XYZ/keycloak/adapter/wildfly-console' doesn't exist - status: 404
hal-0.js:8553 POST https://MYDOMAIN.XYZ/management 403
hal-0.js:10713 10:09:20.730 ERROR o.j.h.d.dispatch.Dispatcher Dispatcher error: Authentication required.
hal-0.js:10713 10:09:20.730 ERROR o.j.h.c.bootstrap.HalBootstrapper Bootstrap error: Dispatcher error: Authentication required.
dev.291b1e16.css:1 GET https://MYDOMAIN.XYZ/console/OpenSans-Regular-webfont.b6d3c411.woff2 net::ERR_ABORTED 403
dev.291b1e16.css:1 GET https://MYDOMAIN.XYZ/console/OpenSans-Regular-webfont.e5de314f.woff net::ERR_ABORTED 403
dev.291b1e16.css:1 GET https://MYDOMAIN.XYZ/console/OpenSans-Regular-webfont.8bd2b33b.ttf net::ERR_ABORTED 403
When I start wildfly several warnings are logged:
10:08:17,750 WARN \[org.jboss.as.warn.fd-limit\] (main) WFLYSRV0071: The operating system has limited the number of open files to 3000 for this process; a value of at least 4096 is recommended 10:08:19,117 WARN \[org.jboss.as.controller\] (ServerService Thread Pool -- 26) WFLYCTL0481: The runtime dependency package 'io.smallrye.opentracing-contrib' is already registered at location '/subsystem=microprofile-opentracing-smallrye' 10:08:19,126 WARN \[org.jboss.as.controller\] (ServerService Thread Pool -- 26) WFLYCTL0481: The runtime dependency package 'io.smallrye.opentracing-contrib' is already registered at location '/subsystem=microprofile-opentracing-smallrye' 10:08:19,821 WARN \[org.jboss.as.txn\] (ServerService Thread Pool -- 76) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique. 10:08:20,355 WARN \[org.wildfly.extension.elytron\] (MSC service thread 1-6) WFLYELY00023: KeyStore file '/home/FOLDER/wildfly/standalone/configuration/application.keystore' does not exist. Used blank. 10:08:20,372 WARN \[org.wildfly.extension.elytron\] (MSC service thread 1-1) WFLYELY01084: KeyStore /home/FOLDER/wildfly/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self-signed certificate for host localhost
I tried disabling WAF and changing the configuration in standalone.xml from:
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
to
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
However, this did not have any effect.
These keycloak errors are suspicious, especially that Wildfly moved to elytrum (from what I read). However, I'm not sure how I should handle them. What can be the problem? Is there something I can do to fix this? I really appreciate any help you can provide.

Related

ActiveMQ has correct dialect but the SQL statements are incorrect AUTO_INCREMENT instead of IDENTITY tables creation

I'm using the following:
JBoss Wildfly 15.0.1.Final
MSSQL JDBC connector (i.e. mssql-jdbc-7.2.2.jre11.jar)
standalone-full.xml
I believe I have setup everything correctly. The MSSQL JDBC jar is in the modules directory with its associated module.xml. The datasource is correctly defined and functional. ActiveMQ Artemis has been setup (works fine using the file system). However when I attempt to have it use JDBC it fails trying to create the necessary tables with the following error:
SQLState: S0001 ErrorCode: 102 Message: Incorrect syntax near AUTO_INCREMENT'.
So I'm wondering what is wrong. ActiveMQ says it supports SQL Server, and it automatically figures out which SQL dialect to use based on the return value of the driver (I've checked that name with an 6.0 version of the driver and it is the same), also in the debug output it says
[org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] ServerService Thread Pool -- 80) Detect database dialect as 'MSSQL'".
So that looks good. So I'm a bit confused on what is wrong and would like to get it to work. I'm providing the critical elements that I have in the standalone-full.xml. Is there any other setup I need or is this a bug?
Is this also a symptom of a problem? (i.e. see the log output...the broker is not initialized with correct driver/url that was specified by the datasource definition)
AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,jdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver,jdbcConnectionUrl=null,messageTableName=AMQ_MESSAGES,bindingsTableName=AMQ_BINDINGS,largeMessageTableName=AMQ_LARGE_MESSAGES,pageStoreTableName=AMQ_PSTORE,)
excerpts from the standalone-full.xml settings
<extensions>
<extension module="org.wildfly.extension.messaging-activemq"/>
</extensions>
<datasources>
<datasource jndi-name="java:/RMBM-DEFAULT-DS" pool-name="RMBM-DEFAULT-DS" enabled="true">
<connection-url>jdbc:sqlserver://${rmbm.default.ds.host}:${rmbm.default.ds.port:1433};DatabaseName=${rmbm.default.ds.dbname}
</connection-url>
<driver>SQLSVR</driver>
</datasource>
<drivers>
<driver name="SQLSVR" module="com.microsoft.sqlserver.jdbc">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver- class>
</driver>
</drivers>
<subsystem xmlns="urn:jboss:domain:messaging-activemq:5.0">
<server name="default">
<journal datasource="RMBM-DEFAULT-DS" messages-table="AMQ_MESSAGES" bindings-table="AMQ_BINDINGS"
jms-bindings-table="AMQ_JMS_BINDINGS" large-messages-table="AMQ_LARGE_MESSAGES" page-store-table="AMQ_PGSTORE"/>
</server>
</subsystem>
Here is a portion of the log output:
18:36:27,116 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) WFLYMSGAMQ0001: AIO wasn't located on this platform, it will fall back to using pure Java NIO.
18:36:27,665 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:443
18:36:27,808 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBossWS 5.2.4.Final (Apache CXF 3.2.5.jbossorg-1)
18:36:27,964 DEBUG [org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] (MSC service thread 1-8) Detect database dialect as 'MSSQL'.
18:36:27,968 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) use JDBC store for Artemis server, bindingsTable:AMQ_BINDINGS
18:36:28,065 DEBUG [org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl] (ServerService Thread Pool -- 80) Starting server ActiveMQServerImpl::
18:36:28,069 DEBUG [org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl] (ServerService Thread Pool -- 80) Detected no Shared Store HA options on JDBC store
18:36:28,121 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 80) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,jdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver,jdbcConnectionUrl=null,messageTableName=AMQ_MESSAGES,bindingsTableName=AMQ_BINDINGS,largeMessageTableName=AMQ_LARGE_MESSAGES,pageStoreTableName=AMQ_PSTORE,)
18:36:28,306 DEBUG [org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl] (ServerService Thread Pool -- 80) Detect database dialect as 'MSSQL'.
18:36:28,398 ERROR [org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver] (ServerService Thread Pool -- 80)
SQL STATEMENTS:
CREATE TABLE AMQ_LARGE_MESSAGES (ID BIGINT AUTO_INCREMENT, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))
SQL EXCEPTIONS:
SQLState: S0001 ErrorCode: 102 Message: Incorrect syntax near 'AUTO_INCREMENT'.
18:36:28,425 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 80) AMQ222010: Critical IO Error, shutting down the server. file=NULL, message=Unable to start database driver: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'AUTO_INCREMENT'.
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1621)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:868)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:768)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2935)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
at com.microsoft.sqlserver.jdbc//com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:711)
at org.jboss.ironjacamar.jdbcadapters#1.4.11.Final//org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:430)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.createTableIfNotExists(AbstractJDBCDriver.java:258)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.createTable(AbstractJDBCDriver.java:118)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.createSchema(JDBCSequentialFileFactoryDriver.java:69)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jdbc.store.drivers.AbstractJDBCDriver.start(AbstractJDBCDriver.java:83)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactory.start(JDBCSequentialFileFactory.java:131)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.init(JDBCJournalStorageManager.java:92)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.<init>(AbstractJournalStorageManager.java:229)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.<init>(JournalStorageManager.java:106)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.persistence.impl.journal.JDBCJournalStorageManager.<init>(JDBCJournalStorageManager.java:55)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createStorageManager(ActiveMQServerImpl.java:2155)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2296)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:64)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:535)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:474)
at org.apache.activemq.artemis#2.6.3.jbossorg-00014//org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:376)
at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.jms.JMSService.doStart(JMSService.java:206)
at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.jms.JMSService.access$000(JMSService.java:65)
at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.jms.JMSService$1.run(JMSService.java:100)
It appears that even though the dialect is correctly detected as MSSQL the broker doesn't have the corresponding SQL statements to properly support it. The SQL statements for MSSQL were added in ActiveMQ Artemis 2.6.4 via ARTEMIS-2202. You're using 2.6.3 so you don't have those.
Upgrading ActiveMQ Artemis in Wildfly can sometimes fail due to the tight coupling between the two so if you don't want to try upgrading you could theoretically crack open the artemis-jdbc-store jar file and add/replace these lines to journal-sql.properties
# MSSQL SQL statements
create-file-table.mssql=CREATE TABLE %s (ID BIGINT NOT NULL IDENTITY, FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA VARBINARY(max), PRIMARY KEY(ID))
create-journal-table.mssql=CREATE TABLE %s(id BIGINT,recordType SMALLINT,compactCount SMALLINT,txId BIGINT,userRecordType SMALLINT,variableSize INTEGER,record VARBINARY(max),txDataSize INTEGER,txData VARBINARY(max),txCheckNoRecords INTEGER,seq BIGINT NOT NULL, PRIMARY KEY(seq))
max-blob-size.mssql=2147483647
Regarding the AMQ221000 log message that indicates there is an incorrect JDBC driver configuration...This is due to the fact that the ActiveMQ Artemis broker has its own JDBC driver configuration for when it's running standalone. When it's embedded in Wildfly and configured to use a datasource via JNDI then the standalone JDBC driver configuration isn't used. It will simply look up the specified datasource and use that.

Failed to read challenge file [Caused by java.io.FileNotFoundException: /jboss/standalone/tmp/auth/local4123__.challenge (No such file or directory)

I am trying to connect two machines both running JBoss EAP 7.1.0 using a JMS bridge. Machine 1 is to act as a web server and has a WAR file deployed which is accessible, and Machine 2 is to act as the app server and has all the necessary components deployed just fine.
This is the error I am receiving:
WARN [org.apache.activemq.artemis.jms.bridge] (ServerService Thread Pool -- 72) AMQ342010: Failed to connect JMS Bridge N/A: javax.naming.CommunicationException: WFNAM00018: Failed to connect to remote host [Root exception is javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed:
JBOSS-LOCAL-USER: javax.security.sasl.SaslException: ELY05128: [JBOSS-LOCAL-USER] Failed to read challenge file [Caused by java.io.FileNotFoundException: /.../.../jboss/standalone/tmp/auth/local3093626581916142639.challenge (No such file or directory)]]
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:110)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNaming(RemoteNamingProvider.java:53)
at org.wildfly.naming.client.NamingProvider.getPeerIdentityForNamingUsingRetry(NamingProvider.java:105)
at org.wildfly.naming.client.remote.RemoteNamingProvider.getPeerIdentityForNamingUsingRetry(RemoteNamingProvider.java:91)
at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:189)
at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222)
at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100)
at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188)
at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)
at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.apache.activemq.artemis.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:46)
at org.apache.activemq.artemis.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:32)
at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1072)
at org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.start(JMSBridgeImpl.java:398)
at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService.startBridge(JMSBridgeService.java:114)
at org.wildfly.extension.messaging.activemq.jms.bridge.JMSBridgeService$1.run(JMSBridgeService.java:84)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
The connection to the target machine (application server) is being made as the path to JBoss is that of the path on the machine, which I verified by testing with a Windows application server environment and the path was the correct Windows path to the directory where the challenge file should be, so clearly the connection is being made as the directories are being accessed. However, the .challenge file isn't present each time which understandably causes the error message.
I have scoured SO and JBoss forums for days now and nothing is resolving my issue.
I saw this post: JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge
This is the same issue that I am facing, but the answer which was marked as correct doesn't help me very much. The solution, in this case, was to replace the default ApplicationRealm with a JAAS realm, but I do not know if this is what I need, and I certainly do not currently have one. I did research it, but it seemed to not be applicable to my setup, but I could be wrong.
I also tried this solution: https://access.redhat.com/solutions/3209281 (Subscription only access)
This solution was to remove default-user="$local" from here:
<security-realm name="ApplicationRealm">
<authentication>
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
I did this to both standalone-full.xml files on both machines, and it appeared to make no difference at all.
I have created application users on both machines and given them superuser privileges through the JBoss console as I figured it was probably an issue with permissions when trying to write the file but this too was to no avail. I have also verified that both user credentials are correct.
The workaround was to switch to using a core bridge instead of a JMS bridge, as per the recommendation from Justin in the comments.

How to avoid printing this WARN message in JBoss

My logs are getting hammered by below log message in JBOSS 7. Can you anyone suggest how to stop this log message.
2018-02-28 13:37:13,618 WARN [com.arjuna.ats.arjuna] (default-threads - 48) ARJUNA012141: Multiple last resources have been added to the current transaction. This is transactionally unsafe and should not be relied upon. Current resource is LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl#5d70439b[connectionListener=653eac5d connectionManager=7f6856e8 warned=false currentXid=null productName=MySQL productVersion=10.2.13-MariaDB-log jndiName=java:/jdbc/db_jndi]))
In your standalone.xml file, in the logging section, add something like this under the appropriate handler element:
<filter>
<not>
<match pattern="ARJUNA012141"/>
</not>
</filter>
Of course, you should add these lines using the jboss-cli utility. Did you know that changes to logging don't require a server restart, but will be picked up at the defined refresh interval?

How to increase the heap size of WebSphere Application Server V8.5 Liberty Profile in Eclipse?

I have a WebSphere Application Server V8.5 Liberty Profile in eclipse. My webapp has been giving java.lang.OutOfMemoryError and thus I need to increase the heap size.
As this and this post suggested I changed the server.xml, by adding jvmEntries tag (It was not previously there):
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
<feature>jpa-2.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to
the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
<jvmEntries initialHeapSize="1024" maximumHeapSize="2048" />
<applicationMonitor updateTrigger="mbean" />
<webApplication id="app" location="app.war"
name="app" />
</server>
But eclipse shows it as an invalid tag, with following error:
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'jvmEntries'. One of '{include, variable, trustAssociation,
applicationMonitor, application, classloading, basicRegistry,
bundleRepository, osgiApplication, authentication, authCache,
jaasLoginModule, jaasLoginContextEntry, cdiContainer, channelfw,
tcpOptions, library, collectiveMember, hostAuthInfo,
managedExecutorService, connectionManager, contextService,
distributedMap, enterpriseApplication, webApplication, httpDispatcher,
mimeTypes, httpEncoding, virtualHost, httpOptions,
httpAccessLogging, httpEndpoint, authData, dataSource, jdbcDriver,
jndiEntry, jpa, jspEngine, fileset, executor, featureManager, config,
customLdapFilterProperties, edirectoryLdapFilterProperties,
domino50LdapFilterProperties, netscapeLdapFilterProperties,
ldapRegistry, securewayLdapFilterProperties,
iplanetLdapFilterProperties, idsLdapFilterProperties,
activedLdapFilterProperties, logging, ltpa, ejbContainer, monitor,
oauthProvider, oauth-roles, remoteFileAccess, administrator-role,
quickStartSecurity, pluginConfiguration, webContainer, httpSession,
httpSessionDatabase, sslDefault, keyStore, ssl, sslOptions,
timedOperation, transaction, webAppSecurity, federatedRepository,
zosLogging, authorization-roles}' is expected.
How should I increase the heap size then?
Correct way to do it is to create jvm.options file in the server directory with the following content e.g.:
-Xms512m
-Xmx1024m
Check this link Customizing the Liberty profile environment
In Eclipse, in the Servers view you can right-click the server, and select New > Server Environment File > jvm.options
The Liberty profile is a bit different than the regular WebSphere profile. You will need to configure a jvm.options file per these instructions:
IBM Setting generic JVM arguments in the WebSphere Application Server V8.5 Liberty profile
Customizing the Liberty profile environment

OpenJPA PersistenceException in Liberty 8.5.5.3 Profile due to invalid URL

I have just found an annoying mistake I made during the configuration of the DB2 JCC Properties in the "server.xml" of my Liberty Profile v8.5.5.3 which I wanted to share with you since it took me a long time searching the Web for helpful hints.
I configured a DB2 Datasource for JPA access in the "server.xml" using the Liberty Developer Tools in Eclipse Luna (Design tab): The "DB2 JCC Properties" are not sorted very clearly in my opinion. The required DB user name and password are not listed next to each other and made it hard for me to identify the correct properties. I unfortunately entered the DB user name in the field "Client User" instead of in "User" which is located nearly at the end of the list.
The thrown exception was:
<openjpa-2.2.3-SNAPSHOT-r422266:1595313 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: <openjpa-2.2.3-SNAPSHOT-r422266:1595313 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "null" and URL "null". You may have specified an invalid URL.
at org.apache.openjpa.jdbc.schema.DataSourceFactory.newConnectException(DataSourceFactory.java:255)
at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:241)
at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:733)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) ... ... at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:795) Caused by: java.sql.SQLNonTransientException: [jcc][t4][10205][11234][4.18.60] Null userid is not supported. ERRORCODE=-4461, SQLSTATE=42815 DSRA0010E: SQL State = 42815, Error Code = -4,461
at com.ibm.db2.jcc.am.kd.a(kd.java:747)}
This exception indicates an incorrect connection URL: "You may have specified an invalid URL." but "A connection could not be obtained for driver class 'null' and URL 'null'" really pointed me in the wrong direction.
I recommend using the Source tab instead of the Design tab in the Liberty profile configuration tools and edit the XML entries manually to avoid wrong configuration values that may lead to confusion, e.g.
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>jdbc-4.0</feature>
<feature>jpa-2.0</feature>
</featureManager>
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
<applicationMonitor updateTrigger="mbean"/>
<dataSource id="DB2Connection" jndiName="jdbc/DB2Connection">
<jdbcDriver libraryRef="DB2jdbc4libs"/>
<properties.db2.jcc user="Administrator" databaseName="CUSTDB" password="{xor}password" portNumber="50000" serverName="dbserver.mycompany.com"/>
</dataSource>
<library id="DB2jdbc4libs">
<fileset caseSensitive="true" dir="/opt/db2/V10.5/java" includes="db2jcc_license_cu.jar, db2jcc.jar"/>
</library>
<webApplication id="DynWebJPASample" location="DynWebJPASample.war" name="DynWebJPASample"/>