0 Replies Latest reply on Apr 5, 2005 11:55 AM by Mukti furtado

    Jboss and Junit

    Mukti furtado Newbie

      Hello,

      I have written a junit testcase class for EJB's and i am running it through a jsp.I have set junit.jar file in the classpath. I get the following error

      junit.framework.TestCase.class not found

      So i copied the junit.jar file in the C:\jboss\server\default\lib directory
      then i am getting the following error

      17:15:14,967 INFO [STDOUT] FAILURES!!!
      17:15:14,967 INFO [STDOUT] Tests run: 2, Failures: 0, Errors: 1
      17:15:14,967 INFO [STDOUT] .
      17:15:14,967 INFO [STDOUT] context>>>>javax.naming.InitialContext@ae4f8b
      17:15:14,967 INFO [STDOUT] Object>>>>ejb/Example/EnduserHome
      17:15:14,967 INFO [STDOUT] Home>>>>ejb/Example/EnduserHome
      17:15:14,967 INFO [STDOUT] before create call>>>>>>>>>>>
      17:15:14,967 INFO [STDOUT] E
      17:15:14,967 INFO [STDOUT] Time: 111.797
      17:15:14,967 INFO [STDOUT] There was 1 error:
      17:15:14,967 INFO [STDOUT] 1) testInsert(teste.EndUserTests)
      17:15:14,983 INFO [STDOUT] java.lang.NoClassDefFoundError
      at org.jboss.proxy.SecurityInterceptor$SecurityActions$UTIL.getSecurityA
      ctions(SecurityInterceptor.java:64)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
      1)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy50.create(Unknown Source)
      at teste.EndUserTests.createEndUser(EndUserTests.java:21)
      at teste.EndUserTests.testInsert(EndUserTests.java:45)
      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at teste.EndUserTests.test1(EndUserTests.java:37)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at teste.EndUserTests.test1(EndUserTests.java:37)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
      92)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
      ContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:153)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:54)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
      0)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
      :577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
      ool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      17:15:14,983 INFO [STDOUT] FAILURES!!!
      17:15:14,983 INFO [STDOUT] Tests run: 2, Failures: 0, Errors: 1
      17:15:14,983 INFO [STDOUT] .
      17:15:14,983 INFO [STDOUT] context>>>>javax.naming.InitialContext@1e8614a
      17:15:14,983 INFO [STDOUT] Object>>>>ejb/Example/EnduserHome
      17:15:14,983 INFO [STDOUT] Home>>>>ejb/Example/EnduserHome
      17:15:14,983 INFO [STDOUT] before create call>>>>>>>>>>>
      17:15:14,983 INFO [STDOUT] E
      17:15:14,983 INFO [STDOUT] Time: 111.859
      17:15:14,999 INFO [STDOUT] There was 1 error:
      17:15:14,999 INFO [STDOUT] 1) testInsert(teste.EndUserTests)
      17:15:14,999 INFO [STDOUT] java.lang.NoClassDefFoundError
      at org.jboss.proxy.SecurityInterceptor$SecurityActions$UTIL.getSecurityA
      ctions(SecurityInterceptor.java:64)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:4
      1)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy50.create(Unknown Source)
      at teste.EndUserTests.createEndUser(EndUserTests.java:21)
      at teste.EndUserTests.testInsert(EndUserTests.java:45)
      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at teste.EndUserTests.test1(EndUserTests.java:37)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:324)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
      92)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
      ContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:153)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:54)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
      eContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
      a:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
      0)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
      :577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
      ool.java:683)
      at java.lang.Thread.run(Thread.java:534)

      can anyone tell me why this error is coming