asadmin commands with quotes are not parsed properly in postbootcommandfile #1866
Labels
Status: Accepted
Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev
Type: Bug
Label issue as a bug defect
Milestone
Description
When using a postbootcommandfile, there is some weird issue in parsing attributes with quotes
Expected Outcome
The commands are executed successfully, in this specific case: the JDBC connection pool is created
Current Outcome
java.lang.IllegalArgumentException: Unbalanced quotes
| at org.glassfish.common.util.admin.ParamTokenizer.scanToken(ParamTokenizer.java:142)
| at org.glassfish.common.util.admin.ParamTokenizer.nextTokenKeepEscapes(ParamTokenizer.java:113)
| at org.glassfish.common.util.admin.MapInjectionResolver.convertStringToProperties(MapInjectionResolver.java:501)
| at org.glassfish.common.util.admin.MapInjectionResolver.convertStringToObject(MapInjectionResolver.java:375)
| at org.glassfish.common.util.admin.MapInjectionResolver.getValue(MapInjectionResolver.java:179)
| at org.jvnet.hk2.config.InjectionManager.syncDoInject(InjectionManager.java:169)
| at org.jvnet.hk2.config.InjectionManager.inject(InjectionManager.java:74)
| at com.sun.enterprise.v3.admin.CommandRunnerImpl.injectParameters(CommandRunnerImpl.java:371)
| at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1224)
| at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
| at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
| at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
| at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:169)
| at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:94)
| at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.doBootCommands(GlassFishMain.java:245)
| at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:126)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.lang.reflect.Method.invoke(Method.java:498)
| at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:102)
| at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Steps to reproduce (Only for bug reports)
1 -** Create a postbootcommandfile postboot.txt
Contents:
create-jdbc-connection-pool --restype javax.sql.ConnectionPoolDataSource --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --property "serverName=localhost:databaseName=mydb:user=user:password=password" pool/db
2 -** Specify the postbootcommandfile
In my case with Docker:
ENTRYPOINT ["/opt/payara41/bin/asadmin", "start-domain", "--verbose", "--postbootcommandfile", "./postboot.txt", "payaradomain"]
Context (Optional)
I'm trying to create a JDBC connection pool with the --postbootcommandfile option
Environment
The text was updated successfully, but these errors were encountered: