Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException when starting a payara micro on Windows via cli with --rootDir or --domainConfig #395

Closed
bseiller opened this issue Aug 14, 2015 · 1 comment

Comments

@bseiller
Copy link

starting a micro instance under Windows like this
java -jar payara-micro-4.1.153.jar --rootDir c:\path\
java -jar payara-micro-4.1.153.jar --domainConfig c:\path\domain.xml
results in the following error:

Exception in thread "main" fish.payara.micro.BootstrapException: java.lang.IllegalArgumentException: Illegal character in authority at index 7: file://c:\path\domain.xml
                at fish.payara.micro.PayaraMicro.bootStrap(PayaraMicro.java:712)
                at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:105)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.IllegalArgumentException: Illegal character in authority at index 7: file://c:\path\domain.xml
                at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:139)
                at fish.payara.micro.PayaraMicro.bootStrap(PayaraMicro.java:692)
                ... 1 more
Caused by: java.lang.IllegalArgumentException: Illegal character in authority at index 7: file://c:\path\domain.xml
                at java.net.URI.create(Unknown Source)
                at org.glassfish.kernel.embedded.EmbeddedDomainXml.getDomainXml(EmbeddedDomainXml.java:73)
                at org.glassfish.kernel.embedded.EmbeddedDomainXml.getDomainXml(EmbeddedDomainXml.java:66)
                at org.glassfish.config.support.DomainXml.run(DomainXml.java:117)
                at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:58)
                at org.glassfish.hk2.bootstrap.HK2Populator.populateConfig(HK2Populator.java:106)
                at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:211)
                at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:273)
                at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:112)
                ... 2 more
Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: file://c:\path\domain.xml
                at java.net.URI$Parser.fail(Unknown Source)
                at java.net.URI$Parser.parseAuthority(Unknown Source)
                at java.net.URI$Parser.parseHierarchical(Unknown Source)
                at java.net.URI$Parser.parse(Unknown Source)
                at java.net.URI.<init>(Unknown Source)
                ... 11 more

The reason seems to be, that the results of getAbsolutePath calls in the method PayaraMicro.bootStrap that are passed down as parameter via "setConfigFileURI" are not valid URIs and should be escaped/transformed if OS == Windows.

@bseiller
Copy link
Author

bseiller commented Sep 3, 2015

Cool - thanks a lot!

@smillidge smillidge added this to the Payara Server 4.1.154 milestone Sep 6, 2015
smillidge added a commit to smillidge/Payara that referenced this issue Sep 14, 2015
Pandrex247 pushed a commit to Pandrex247/Payara that referenced this issue Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants