Hi - I have build jbilling from source using following steps:
1. unzip jbilling.zip and jbilling-src.zip.
2. taken latest code from repository using git
3. build src - BUILD Successful
4. ant prepare-test
5. ant test-ws
I am getting following error on step #5 above.
test-ws:
[javac] Compiling 5 source files to C:\dev\jbilling\JBILLI~2\jbilling\src\build\test
[javac] Note: C:\dev\jbilling\JBILLI~2\jbilling\src\test\ws\com\sapienter\jbilling\server\user\WSTest.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[copy] Copying 1 file to C:\dev\jbilling\JBILLI~2\jbilling\src\build\test
[mkdir] Created dir: C:\dev\jbilling\JBILLI~2\jbilling\src\build\test-results\ws\xml
[junit] Testsuite: com.sapienter.jbilling.server.order.WSTest
[junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 13.109 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] Creating order ...
[junit] ------------- ---------------- ---------------
[junit] ------------- Standard Error -----------------
[junit] log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
[junit] log4j:WARN Please initialize the log4j system properly.
[junit] com.sapienter.jbilling.server.util.api.JbillingAPIException: com.sapienter.jbilling.common.SessionInternalError: Error calling jBilling API. Method: cre
[junit] at com.sapienter.jbilling.server.util.api.SpringAPI.createOrderAndInvoice(SpringAPI.java:103)
[junit] at com.sapienter.jbilling.server.order.WSTest.testCreateUpdateDelete(WSTest.java:114)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1339)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:831)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1785)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:785)
[junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[junit] at org.apache.tools.ant.Task.perform(Task.java:348)
[junit] at org.apache.tools.ant.Target.execute(Target.java:357)
[junit] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[junit] at org.apache.tools.ant.Main.runBuild(Main.java:758)
[junit] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[junit] Caused by: com.sapienter.jbilling.common.SessionInternalError: Error calling jBilling API. Method: createOrderAndInvoice Cause: Item pricing task error
[junit] at com.sapienter.jbilling.server.util.WSExceptionAdvice.afterThrowing(WSExceptionAdvice.java:52)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invokeHandlerMethod(ThrowsAdviceInterceptor.java:146)
[junit] at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:131)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[junit] at $Proxy128.createOrderAndInvoice(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
[junit] at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:77)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[junit] at $Proxy127.createOrderAndInvoice(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:180)
[junit] at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109)
[junit] at org.springframework.remoting.caucho.Hessian2SkeletonInvoker.invoke(Hessian2SkeletonInvoker.java:94)
[junit] at org.springframework.remoting.caucho.HessianExporter.invoke(HessianExporter.java:142)
[junit] at org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:70)
[junit] at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
[junit] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
[junit] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
[junit] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
[junit] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
[junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
[junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[junit] at com.sapienter.jbilling.client.util.WebServicesAuthenticationFilter.doFilter(WebServicesAuthenticationFilter.java:128)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
[junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
[junit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[junit] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
[junit] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
[junit] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
[junit] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
[junit] at java.lang.Thread.run(Thread.java:619)
[junit] Caused by: com.sapienter.jbilling.common.SessionInternalError: Item pricing task error
[junit] at com.sapienter.jbilling.server.util.WebServicesSessionSpringBean.doCreateOrder(WebServicesSessionSpringBean.java:1553)
[junit] at com.sapienter.jbilling.server.util.WebServicesSessionSpringBean.createOrderAndInvoice(WebServicesSessionSpringBean.java:764)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
[junit] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[junit] at $Proxy127.createOrderAndInvoice(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
[junit] at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
[junit] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
[junit] at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:126)
[junit] ... 47 more
[junit] ------------- ---------------- ---------------
[junit] Testcase: testCreateUpdateDelete(com.sapienter.jbilling.server.order.WSTest): FAILED
[junit] Exception caught:com.sapienter.jbilling.server.util.api.JbillingAPIException: com.sapienter.jbilling.common.SessionInternalError: Error calling jBilling
[junit] junit.framework.AssertionFailedError: Exception caught:com.sapienter.jbilling.server.util.api.JbillingAPIException: com.sapienter.jbilling.common.Sessio
[junit] at com.sapienter.jbilling.server.order.WSTest.testCreateUpdateDelete(WSTest.java:349)
[junit]
I am unable to determine if it could be a data issue or a code issue. The code is latest from repo for sure. This issue might have been faced by people starting to use jbilling. let me know if someone can make something out from this. I was thinking that at least the ant-test would work out of the box.
Thanks
Vikas
solved this issue
Hi - I have solved that issue. Unfortunately, I was checking only the client logs that I have posted above. I checked the server trace, I found that the base_dir properties in jbilling properties file was pointing to resources folder without a slash at the end.
Thanks
Vikas