Created
October 1, 2010 15:47
-
-
Save BinaryMuse/606373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| authenticate() called | |
| authenticate() entered | |
| Authenticating... | |
| Authenticated. | |
| authenticate() called | |
| authenticate() entered | |
| authenticate() skipped (already authenticated) | |
| Fetching report 1736710 | |
| Fetching report 492582 | |
| Starting Jetty on port 8888 | |
| [WARN] Exception while dispatching incoming RPC call | |
| com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.Map edu.fresno.samples.gwt.informerrmi.client.service.GeoMapService.getData() throws edu.fresno.samples.gwt.informerrmi.shared.DataRetrievalException' threw an unexpected exception: com.entrinsik.informer.core.exception.AuthenticationException: Unauthenticated | |
| at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378) | |
| at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581) | |
| at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188) | |
| at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224) | |
| at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) | |
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) | |
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) | |
| at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) | |
| at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) | |
| at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) | |
| at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) | |
| at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) | |
| at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) | |
| at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) | |
| at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) | |
| at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) | |
| at org.mortbay.jetty.Server.handle(Server.java:324) | |
| at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) | |
| at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) | |
| at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) | |
| at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) | |
| at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) | |
| at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) | |
| at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) | |
| Caused by: com.entrinsik.informer.core.exception.AuthenticationException: Unauthenticated | |
| at com.entrinsik.informer.core.server.security.spring.SecurityInterceptor.invoke(SecurityInterceptor.java:66) | |
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) | |
| at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) | |
| at $Proxy54.lookup(Unknown Source) | |
| at com.entrinsik.informer.core.server.service.impl.ReportServiceImpl.lookup(ReportServiceImpl.java:111) | |
| at sun.reflect.GeneratedMethodAccessor20522.invoke(Unknown Source) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | |
| at java.lang.reflect.Method.invoke(Unknown Source) | |
| at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) | |
| at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) | |
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) | |
| at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70) | |
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) | |
| at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) | |
| at $Proxy70.lookup(Unknown Source) | |
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | |
| at java.lang.reflect.Method.invoke(Unknown Source) | |
| at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205) | |
| at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38) | |
| at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78) | |
| at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72) | |
| at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:72) | |
| at sun.reflect.GeneratedMethodAccessor1625.invoke(Unknown Source) | |
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | |
| at java.lang.reflect.Method.invoke(Unknown Source) | |
| at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) | |
| at sun.rmi.transport.Transport$1.run(Unknown Source) | |
| at java.security.AccessController.doPrivileged(Native Method) | |
| at sun.rmi.transport.Transport.serviceCall(Unknown Source) | |
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) | |
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) | |
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) | |
| at java.lang.Thread.run(Unknown Source) | |
| at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:47) | |
| at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:347) | |
| at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:258) | |
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) | |
| at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) | |
| at $Proxy30.lookup(Unknown Source) | |
| at edu.fresno.samples.gwt.informerrmi.server.InformerService.getReportById(InformerService.java:57) | |
| at edu.fresno.samples.gwt.informerrmi.server.services.GeoMapServiceImpl.getData(GeoMapServiceImpl.java:32) | |
| at edu.fresno.samples.gwt.informerrmi.server.services.GeoMapServiceImpl.getData(GeoMapServiceImpl.java:1) | |
| 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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562) | |
| ... 22 more | |
| [ERROR] 500 - POST /informerrmi/geomapservice (127.0.0.1) 57 bytes | |
| Request headers | |
| Host: 127.0.0.1:8888 | |
| User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 | |
| Accept: */* | |
| Referer: http://127.0.0.1:8888/informerrmi/hosted.html?informerrmi | |
| Accept-Language: en-us | |
| Accept-Encoding: gzip, deflate | |
| Connection: keep-alive | |
| Origin: http://127.0.0.1:8888 | |
| X-Gwt-Module-Base: http://127.0.0.1:8888/informerrmi/ | |
| Content-Type: text/x-gwt-rpc; charset=UTF-8 | |
| X-Gwt-Permutation: HostedMode | |
| Content-Length: 156 | |
| Response headers | |
| Content-Type: text/plain | |
| authenticate() called | |
| authenticate() entered | |
| authenticate() skipped (already authenticated) | |
| Running report 492582 with grouping on majdivision... | |
| Report 492582 complete. | |
| Creating bar chart table... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.fresno.samples.gwt.informerrmi.server; | |
| import java.util.List; | |
| import com.entrinsik.informer.core.client.data.LoadOptions; | |
| import com.entrinsik.informer.core.client.data.Page; | |
| import com.entrinsik.informer.core.domain.DataGroup; | |
| import com.entrinsik.informer.core.domain.Order; | |
| import com.entrinsik.informer.core.domain.report.Report; | |
| import com.entrinsik.informer.core.domain.report.ReportExecutionRequest; | |
| import com.entrinsik.informer.core.domain.report.Row; | |
| import com.entrinsik.informer.core.exception.AuthenticationException; | |
| import com.entrinsik.informer.core.remote.RemoteInformerContext; | |
| import com.entrinsik.informer.core.server.report.ReportResults; | |
| import edu.fresno.samples.gwt.informerrmi.shared.DataRetrievalException; | |
| public abstract class InformerService extends ContextRemoteServiceServlet { | |
| private static final long serialVersionUID = 5648350751018879521L; | |
| private static boolean authenticated = false; | |
| private static String hostname = "informer_host"; | |
| private static int port = 1199; | |
| private static String username = "abcdefg"; | |
| private static String password = "abcdefg"; | |
| private static RemoteInformerContext informerContext = new RemoteInformerContext(hostname, port); | |
| protected static synchronized void authenticate() throws DataRetrievalException { | |
| System.out.println("authenticate() called"); | |
| //synchronized(informerContext) { | |
| System.out.println("authenticate() entered"); | |
| if(!authenticated) { | |
| try { | |
| authenticated = true; | |
| login(); | |
| } catch(Throwable e) { | |
| authenticated = false; | |
| throw new DataRetrievalException(); | |
| } | |
| } else { | |
| System.out.println("authenticate() skipped (already authenticated)"); | |
| } | |
| //} | |
| } | |
| protected static Report getReportById(int id) throws DataRetrievalException { | |
| authenticate(); | |
| System.out.println("Fetching report " + String.valueOf(id)); | |
| return informerContext.getReportService().lookup(id); | |
| } | |
| protected static ReportResults runReport(Report report) throws DataRetrievalException { | |
| authenticate(); | |
| System.out.println("Running report " + String.valueOf(report.getId()) + "..."); | |
| ReportExecutionRequest request = new ReportExecutionRequest(report); | |
| ReportResults results = informerContext.getReportService().runReport(request); | |
| System.out.println("Report " + String.valueOf(report.getId()) + " complete"); | |
| return results; | |
| } | |
| protected static List<DataGroup<Row>> runReportWithGrouping(Report report, String group_on) throws DataRetrievalException { | |
| authenticate(); | |
| System.out.println("Running report " + String.valueOf(report.getId()) + " with grouping on " + group_on + "..."); | |
| LoadOptions options = new LoadOptions(100); | |
| options.setInput(new ReportExecutionRequest(report)); | |
| Page<Row> page = informerContext.getViewService().newReportResultsView(options); | |
| List<DataGroup<Row>> groups = informerContext.getViewService().group(page.getViewToken(), new Order[] { Order.asc(group_on) }, null, null); | |
| System.out.println("Report " + String.valueOf(report.getId()) + " complete."); | |
| return groups; | |
| } | |
| private static void login() { | |
| System.out.println("Authenticating..."); | |
| informerContext.getAuthenticationService().login(username, password); | |
| System.out.println("Authenticated."); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment