8 Replies Latest reply: Apr 6, 2011 3:55 PM by Sri Narayanan RSS

    CreateProcess error=87, The parameter is incorrect

    Sri Narayanan Newbie

      Exception occurred executing command line.

      Cannot run program "C:\ECE21CP1_2\tools\jdk1.6.0_20\bin\javaw.exe" (in directory "G:\dev\arq_ws\arq.test"): CreateProcess error=87, The parameter is incorrect

       

      Exception while execution  TemperatureConverterTest in eclipse

      OS = windows

      JBOSS_HOME=G:\server

       

      Previous posts clain it depen on the classpath lenght , does it depend on java location as well

        • 1. CreateProcess error=87, The parameter is incorrect
          Sri Narayanan Newbie

          Exception occurred executing command line.

          Cannot run program "C:\java\bin\javaw.exe" (in directory "G:\dev\arq_ws\arq.test"): CreateProcess error=87, The parameter is incorrect

           

          After editing the java location as well getting the same exception

          • 3. Re: CreateProcess error=87, The parameter is incorrect
            Sri Narayanan Newbie

            Thanks Aslak,That helped ,

            But I guess now there is null pointer . think injection failed

             

            ----------------------------------------------------------------------------------------------------------

            package demo;

             

            import junit.framework.Assert;

             

            import org.jboss.arquillian.api.Deployment;

            import org.jboss.arquillian.junit.Arquillian;

            import org.jboss.arquillian.spi.core.annotation.Inject;

            import org.jboss.shrinkwrap.api.ArchivePaths;

            import org.jboss.shrinkwrap.api.ShrinkWrap;

            import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;

            import org.jboss.shrinkwrap.api.spec.JavaArchive;

            import org.junit.Test;

            import org.junit.runner.RunWith;

             

            import com.exp.TemperatureConverter;

             

            @RunWith(Arquillian.class)

            public class TemperatureConverterTest {

                @Inject

                private TemperatureConverter converter;

             

                @Deployment

                public static JavaArchive createTestArchive() {

             

                    return ShrinkWrap.create(JavaArchive.class, "test.jar")

             

                    .addClasses(TemperatureConverter.class)

             

                    .addAsManifestResource(

             

                    new ByteArrayAsset("<beans/>".getBytes()),

             

                    ArchivePaths.create("beans.xml"));

             

                }

             

                @Test

                public void testConvertToCelsius() {

             

                    System.out.println("converter=======>"+converter);

                    Assert.assertEquals(converter.convertToCelsius(32d), 0d);

             

                    Assert.assertEquals(converter.convertToCelsius(212d), 100d);

             

                }

             

                @Test

                public void testConvertToFarenheit() {

             

                    Assert.assertEquals(converter.convertToFarenheit(0d), 32d);

             

                    Assert.assertEquals(converter.convertToFarenheit(100d), 212d);

             

                }

            }

            -------------------------------------------------------------------------------------

             

            junit trace

            ---------------------------------------------------------------------------------------

            java.lang.NullPointerException

                at demo.TemperatureConverterTest.testConvertToCelsius(TemperatureConverterTest.java:41)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

                at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:259)

                at org.jboss.arquillian.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:63)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

                at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

                at org.jboss.arquillian.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.TestContextHandler.createTestContext(TestContextHandler.java:82)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:87)

                at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

                at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:101)

                at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:251)

                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:214)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:303)

                at org.jboss.arquillian.junit.Arquillian.access$300(Arquillian.java:45)

                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:228)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:173)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:303)

                at org.jboss.arquillian.junit.Arquillian.access$300(Arquillian.java:45)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:187)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:136)

                at org.jboss.arquillian.junit.JUnitTestRunner.execute(JUnitTestRunner.java:69)

                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:84)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

                at java.lang.Thread.run(Thread.java:619)

            • 4. Re: CreateProcess error=87, The parameter is incorrect
              Aslak Knutsen Master

              use @javax.inject.Inject, not org.jboss.arquillian.spi.core.annotation.Inject

              • 5. Re: CreateProcess error=87, The parameter is incorrect
                Sri Narayanan Newbie

                That works perfectly thanks

                • 6. CreateProcess error=87, The parameter is incorrect
                  Sri Narayanan Newbie

                  To debug code should I connect to jboss for remote debugging .

                  Cz break points in my junit test are not honoured as of now .