I am migrating my wildfly server 10 to 24. I am using some .properties files to use initiliaze variables for later use. But after running wildfly 24 I got this error:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."app-service-2.2.14-SNAPSHOT.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."app-service-2.2.14-SNAPSHOT.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "app-service-2.2.14-SNAPSHOT.war" at org.jboss.as.server@16.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189) at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.base/java.lang.Thread.run(Thread.java:833)
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010058: ${DB_MIN_POOL_SIZE} isn't a valid number for element min-pool-size at org.jboss.as.connector@24.0.1.Final//org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:105) at org.jboss.as.server@16.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182) ... 8 more Caused by: org.jboss.jca.common.metadata.ParserException: IJ010058: ${DB_MIN_POOL_SIZE} isn't a valid number for element min-pool-size at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.common.AbstractParser.elementAsInteger(AbstractParser.java:233) at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.ds.DsParser.parsePool(DsParser.java:663) at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.ds.DsParser.parseDataSource(DsParser.java:1165) at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:177) at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:120) at org.jboss.ironjacamar.impl@1.4.35.Final//org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:79) at org.jboss.as.connector@24.0.1.Final//org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:90) ... 9 more
app-ds.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema/datasources_1_1.xsd">
<datasource jndi-name="java:jboss/datasources/appDS"
pool-name="app-connection-pool" enabled="true" use-java-context="true">
<connection-url>${APP_DB_JDBC_URL}</connection-url>
<driver>${APP_DB_JDBC_DRIVER}</driver>
<pool>
<min-pool-size>${APP_DB_MIN_POOL_SIZE}</min-pool-size>
<max-pool-size>${APP_DB_MAX_POOL_SIZE}</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>${APP_DB_USERNAME}</user-name>
<password>${APP_DB_PASSWORD}</password>
</security>
<transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
<!--
These setting use a background thread to verify connections periodically. Using
validate-on-match/false disables verifying the connection with each use. The
"ping" comment is a hint to some JDBC implementations to skip parsing and contact
the SQL server directory, a slight optimization over SELECT 1 -->
<validation>
<background-validation>true</background-validation>
<background-validation-millis>60000</background-validation-millis>
<check-valid-connection-sql>/* ping */ SELECT 1;</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
</validation>
</datasource>
</datasources>
When I check my WAR file my initiliazation file for all variables is in the WAR. DB_MIN_POOL_SIZE variable also initiliazed. But my app-ds.xml file is not getting the variables from properties file. It just can not read it. I am thinking maybe ironjacamar jar is not working correctly for me because these error coming from it. I will try ironjacamar version in wildfly 10 for the wildfly 24.
I am open to any suggestions , thanks.
1条答案
按热度按时间rekjcdws1#
您需要允许在描述符中进行表达式解析。这是通过jboss-cli完成的: