glassfish
  1. glassfish
  2. GLASSFISH-20438

Missing Bean Validator Provider in Embedded GlassFish

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0_b86_RC2
    • Fix Version/s: 4.1
    • Component/s: bean-validator, embedded
    • Labels:
      None
    • Environment:

      Embedded GlassFish

      Description

      In Embedded GlassFish when deploying JAX-RS applications, there is an exception raised, which follows:

      "C:\Program Files\Java\jdk1.7.0_17\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar;C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest
      classpath[0] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar
      classpath[1] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar
      classpath[2] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar
      classpath[3] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar
      classpath[4] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar
      classpath[5] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar
      classpath[6] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar
      classpath[7] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar
      classpath[8] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar
      classpath[9] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar
      classpath[10] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar
      classpath[11] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar
      classpath[12] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar
      classpath[13] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar
      classpath[14] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar
      classpath[15] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar
      classpath[16] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar
      classpath[17] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar
      classpath[18] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar
      classpath[19] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar
      classpath[20] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar
      classpath[21] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic
      classpath[22] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic
      classpath[23] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar
      classpath[24] = C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar
      classpath[25] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar
      classpath[26] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar
      classpath[27] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar
      classpath[28] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar
      classpath[29] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar
      classpath[30] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar
      classpath[31] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar
      classpath[32] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar
      classpath[33] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar
      Found populator: org.glassfish.kernel.embedded.EmbeddedDomainXml
      Apr 30, 2013 11:01:26 AM org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl initialize
      INFO: Authorization Service has successfully initialized.
      Apr 30, 2013 11:01:26 AM com.sun.enterprise.v3.admin.CommandRunnerImpl doCommand
      SEVERE: Exception while running a command
      javax.validation.ValidationException: Unable to load Bean Validation provider
      at javax.validation.Validation$GetValidationProviderList.run(Validation.java:346)
      at javax.validation.Validation$GetValidationProviderList.getValidationProviderList(Validation.java:310)
      at javax.validation.Validation$DefaultValidationProviderResolver.getValidationProviders(Validation.java:292)
      at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:252)
      at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:107)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.initBeanValidator(CommandRunnerImpl.java:462)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.checkAgainstBeanConstraints(CommandRunnerImpl.java:472)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.injectParameters(CommandRunnerImpl.java:444)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1190)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:109)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1676)
      at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:168)
      at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:93)
      at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:68)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
      at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
      at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
      at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: java.util.ServiceConfigurationError: javax.validation.spi.ValidationProvider: Provider org.hibernate.validator.HibernateValidator not found
      at java.util.ServiceLoader.fail(ServiceLoader.java:231)
      at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
      at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
      at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
      at javax.validation.Validation$GetValidationProviderList.run(Validation.java:343)
      ... 40 more

      org.glassfish.embeddable.GlassFishException: PlainTextActionReporterFAILUREjavax.validation.ValidationException: Unable to load Bean Validation providerDescription: set commandUnable to load Bean Validation provider
      Usage: set [?|-help[=<help(default:false)>]]
      (dotted-attribute-name=value)+

      at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:71)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
      at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
      at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
      at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      java.lang.NullPointerException
      at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      java.lang.NullPointerException
      at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      Process finished with exit code -1

      Embedded GlassFish does not have a default bean validator configured by default.
      There is a work around for this error, which is to configure in the application.

      Create an empty project file called `src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider' and add this configuration line:

      org.hibernate.validator.HibernateValidator

      This should be part of the embedded GF itself though.

        Activity

        peter_pilgrim created issue -
        michael.y.chen made changes -
        Field Original Value New Value
        Assignee michael.y.chen [ michael.y.chen ] Dhiru Pandey [ dhirup ]
        Fix Version/s 4.0.1 [ 16061 ]
        Description
        In Embedded GlassFish when deploying JAX-RS applications, there is an exception raised, which follows:

        "C:\Program Files\Java\jdk1.7.0_17\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar;C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest
        classpath[0] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar
        classpath[1] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar
        classpath[2] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar
        classpath[3] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar
        classpath[4] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar
        classpath[5] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar
        classpath[6] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar
        classpath[7] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar
        classpath[8] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar
        classpath[9] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar
        classpath[10] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar
        classpath[11] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar
        classpath[12] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar
        classpath[13] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar
        classpath[14] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar
        classpath[15] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar
        classpath[16] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar
        classpath[17] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar
        classpath[18] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar
        classpath[19] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar
        classpath[20] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar
        classpath[21] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic
        classpath[22] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic
        classpath[23] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar
        classpath[24] = C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar
        classpath[25] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar
        classpath[26] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar
        classpath[27] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar
        classpath[28] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar
        classpath[29] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar
        classpath[30] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar
        classpath[31] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar
        classpath[32] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar
        classpath[33] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar
        Found populator: org.glassfish.kernel.embedded.EmbeddedDomainXml
        Apr 30, 2013 11:01:26 AM org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl initialize
        INFO: Authorization Service has successfully initialized.
        Apr 30, 2013 11:01:26 AM com.sun.enterprise.v3.admin.CommandRunnerImpl doCommand
        SEVERE: Exception while running a command
        javax.validation.ValidationException: Unable to load Bean Validation provider
        at javax.validation.Validation$GetValidationProviderList.run(Validation.java:346)
        at javax.validation.Validation$GetValidationProviderList.getValidationProviderList(Validation.java:310)
        at javax.validation.Validation$DefaultValidationProviderResolver.getValidationProviders(Validation.java:292)
        at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:252)
        at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:107)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.initBeanValidator(CommandRunnerImpl.java:462)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.checkAgainstBeanConstraints(CommandRunnerImpl.java:472)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.injectParameters(CommandRunnerImpl.java:444)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1190)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1676)
        at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:168)
        at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:93)
        at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:68)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
        at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
        at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
        Caused by: java.util.ServiceConfigurationError: javax.validation.spi.ValidationProvider: Provider org.hibernate.validator.HibernateValidator not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:231)
        at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
        at javax.validation.Validation$GetValidationProviderList.run(Validation.java:343)
        ... 40 more


        org.glassfish.embeddable.GlassFishException: PlainTextActionReporterFAILUREjavax.validation.ValidationException: Unable to load Bean Validation providerDescription: set commandUnable to load Bean Validation provider
            Usage: set [-?|--help[=<help(default:false)>]]
        (dotted-attribute-name=value)+

        at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
        at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
        at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        java.lang.NullPointerException
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        java.lang.NullPointerException
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        Process finished with exit code -1

        Embedded GlassFish does not have a default bean validator configured by default.
        There is a work around for this error, which is to configure in the application.


        Create an empty project file called `src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider' and add this configuration line:

        org.hibernate.validator.HibernateValidator

        This should be part of the embedded GF itself though.
        In Embedded GlassFish when deploying JAX-RS applications, there is an exception raised, which follows:

        "C:\Program Files\Java\jdk1.7.0_17\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic;C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar;C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar;C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest
        classpath[0] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\lib\idea_rt.jar
        classpath[1] = C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1\plugins\junit\lib\junit-rt.jar
        classpath[2] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\charsets.jar
        classpath[3] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\deploy.jar
        classpath[4] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\javaws.jar
        classpath[5] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jce.jar
        classpath[6] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfr.jar
        classpath[7] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jfxrt.jar
        classpath[8] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\jsse.jar
        classpath[9] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\management-agent.jar
        classpath[10] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\plugin.jar
        classpath[11] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\resources.jar
        classpath[12] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\rt.jar
        classpath[13] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\access-bridge-64.jar
        classpath[14] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\dnsns.jar
        classpath[15] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\jaccess.jar
        classpath[16] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\localedata.jar
        classpath[17] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunec.jar
        classpath[18] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunjce_provider.jar
        classpath[19] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\sunmscapi.jar
        classpath[20] = C:\Program Files\Java\jdk1.7.0_17\jre\lib\ext\zipfs.jar
        classpath[21] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\test\jaxrs-basic
        classpath[22] = C:\Users\peter\Documents\IdeaProjects\javaee7-handbook\ch08\jaxrs-basic\out\production\jaxrs-basic
        classpath[23] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-api\7.0-bpeter-private\jar\9fa61bc3c788afba981ee07fa39e6b4c7e657546\javaee-api-7.0-bpeter-private.jar
        classpath[24] = C:\Users\peter\.m2\repository\com\javaeehandbook\book1\glassfish-embedded-runner\1.0\glassfish-embedded-runner-1.0.jar
        classpath[25] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-api\1.0.1\jar\83ee2ca1702d79ceda73634e33b0fac8e73acced\shrinkwrap-api-1.0.1.jar
        classpath[26] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-impl-base\1.0.1\jar\feb8c9e875222fae065b4c81937797b00c7ff347\shrinkwrap-impl-base-1.0.1.jar
        classpath[27] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax\javaee-web-api\7.0-bpeter-private\jar\100d0af33717b582e057607811df66f1b4531d38\javaee-web-api-7.0-bpeter-private.jar
        classpath[28] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.glassfish.main.extras\glassfish-embedded-all\4.0-b72\jar\942b982d5c005806a08843d2a1f411f278c04077\glassfish-embedded-all-4.0-b72.jar
        classpath[29] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\javax.activation\activation\1.1\jar\e6cb541461c2834bdea3eb920f1884d1eb508b50\activation-1.1.jar
        classpath[30] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\com.sun.mail\javax.mail\1.5.0-b01\jar\3f83e464cf9e42e31230d503e011d314755c02eb\javax.mail-1.5.0-b01.jar
        classpath[31] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.jboss.shrinkwrap\shrinkwrap-spi\1.0.1\jar\4bcb163157366c0f690362594dfa4baed67a6152\shrinkwrap-spi-1.0.1.jar
        classpath[32] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\junit\junit\4.11\jar\4e031bb61df09069aeb2bffb4019e7a5034a4ee0\junit-4.11.jar
        classpath[33] = C:\Users\peter\.gradle\caches\artifacts-23\filestore\org.hamcrest\hamcrest-core\1.3\jar\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar
        Found populator: org.glassfish.kernel.embedded.EmbeddedDomainXml
        Apr 30, 2013 11:01:26 AM org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl initialize
        INFO: Authorization Service has successfully initialized.
        Apr 30, 2013 11:01:26 AM com.sun.enterprise.v3.admin.CommandRunnerImpl doCommand
        SEVERE: Exception while running a command
        javax.validation.ValidationException: Unable to load Bean Validation provider
        at javax.validation.Validation$GetValidationProviderList.run(Validation.java:346)
        at javax.validation.Validation$GetValidationProviderList.getValidationProviderList(Validation.java:310)
        at javax.validation.Validation$DefaultValidationProviderResolver.getValidationProviders(Validation.java:292)
        at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:252)
        at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:107)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.initBeanValidator(CommandRunnerImpl.java:462)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.checkAgainstBeanConstraints(CommandRunnerImpl.java:472)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.injectParameters(CommandRunnerImpl.java:444)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1190)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:109)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1676)
        at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:168)
        at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:93)
        at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:68)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
        at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
        at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
        Caused by: java.util.ServiceConfigurationError: javax.validation.spi.ValidationProvider: Provider org.hibernate.validator.HibernateValidator not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:231)
        at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
        at javax.validation.Validation$GetValidationProviderList.run(Validation.java:343)
        ... 40 more


        org.glassfish.embeddable.GlassFishException: PlainTextActionReporterFAILUREjavax.validation.ValidationException: Unable to load Bean Validation providerDescription: set commandUnable to load Bean Validation provider
            Usage: set [-?|--help[=<help(default:false)>]]
        (dotted-attribute-name=value)+

        at com.sun.enterprise.glassfish.bootstrap.ConfiguratorImpl.configure(ConfiguratorImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.configure(GlassFishImpl.java:71)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.<init>(GlassFishImpl.java:65)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime$1.<init>(StaticGlassFishRuntime.java:115)
        at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:115)
        at je7hb.common.webcontainer.embedded.glassfish.AbstractEmbeddedRunner.init(AbstractEmbeddedRunner.java:46)
        at je7hb.common.webcontainer.embedded.glassfish.SimpleEmbeddedRunner.launchDeployWarFile(SimpleEmbeddedRunner.java:58)
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.assembleDeployAndStartServer(RestfulBookAsyncServiceClientTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        java.lang.NullPointerException
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        java.lang.NullPointerException
        at je7hb.jaxrs.basic.RestfulBookAsyncServiceClientTest.stopServer(RestfulBookAsyncServiceClientTest.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)


        Process finished with exit code -1

        Embedded GlassFish does not have a default bean validator configured by default.
        There is a work around for this error, which is to configure in the application.


        Create an empty project file called `src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider' and add this configuration line:

        org.hibernate.validator.HibernateValidator

        This should be part of the embedded GF itself though.
        Dhiru Pandey made changes -
        Assignee Dhiru Pandey [ dhirup ] jjsnyder83 [ jjsnyder83 ]
        jjsnyder83 made changes -
        Assignee jjsnyder83 [ jjsnyder83 ] mtaube [ mtaube ]
        Romain Grécourt made changes -
        Fix Version/s 4.1 [ 16387 ]
        Fix Version/s 4.0.1 [ 16061 ]

          People

          • Assignee:
            mtaube
            Reporter:
            peter_pilgrim
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: