Re: Request implementation couldn't be found.

2011-09-07 Thread Nik
To handle server-side errors I have defined an custom servlet extending the 
default RequestFactoryServlet and passed a custom exception handler in the 
constructor.. That has shown me a real causes of my problem located on the 
server side. 
Good tutorial to define a custom servlet can be found here 
http://cleancodematters.wordpress.com/2011/05/29/improved-exceptionhandling-with-gwts-requestfactory/#more-74
. I hope it will also help others. My problem  was JPA and particularly 
@GeneratedValue annotation for Id because that uses a native generating 
policy and datanucleus is not supporting it. So i had to define another one 
. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/okeYYsepIPEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-09-03 Thread Nik
Thank you for your help!! I have found what causes the problem.

On 2 Sep., 21:07, Thomas Broyer t.bro...@gmail.com wrote:
 On Friday, September 2, 2011 7:59:31 PM UTC+2, Nik wrote:

  Caused by: java.lang.RuntimeException: Server Error: null

 Your server-side code is causing a NullPointerException. Set a breakpoint
 into DefaultExceptionHandler to get the whole stack-trace.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-09-02 Thread Nik
Downloaded the project to google code.

https://code.google.com/p/ratesexchange/source/checkout



On 31 авг, 17:44, Thomas Broyer t.bro...@gmail.com wrote:
 Can you show you code ? (RatesRequest, RateProxy, and associated server-side
 classes –method declarations only–)

 It can be as simple as a method not being public, or a missing
 Locator/ServiceLocator on your @ProxyFor/@Service, or  @ProxyFor/@Service
 not point at the right class; or possibly a mistake in declaring the method
 on the RatesRequest (e.g. using an InstanceRequest Instead of a Request)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-09-02 Thread Thomas Broyer
As RF complains: you declare a findRate() InstanceRequestRateProxy,Void on 
the RateRequest with no corresponding findRate() method on Rate. RF find the 
static findRate(Long) method (same name) which is required in the absence of 
a Locator, which it lists as possible match (same name) in the error 
message.
In other words, it's exactly what I told you earlier: your method findRate 
in the RateRequest has no corresponding method findRate in the server-side 
rate class (which by the way, is exactly what the error message says too)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/zDKe0ze5OhEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-09-02 Thread Nik
Thank you! I was really blind.  I have removed the declaration from
the request. But still getting exceptions on firing requests and not
able to find the source of my problem.

Stack is:
19:51:52.743 [ERROR] [ratesexchange] Uncaught exception escaped

com.google.gwt.event.shared.UmbrellaException: One or more exceptions
caught, see full set in UmbrellaException#getCauses
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$StandardPayloadDialect.processPayload(AbstractRequestContext.java:
317)
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$4.onTransportSuccess(AbstractRequestContext.java:959)
at com.google.gwt.requestfactory.client.DefaultRequestTransport
$1.onResponseReceived(DefaultRequestTransport.java:141)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
326)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
207)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
281)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
531)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Server Error: null
at
com.google.gwt.requestfactory.shared.Receiver.onFailure(Receiver.java:
41)
at
com.google.gwt.requestfactory.shared.impl.AbstractRequest.onFail(AbstractRequest.java:
118)
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$StandardPayloadDialect.processPayload(AbstractRequestContext.java:
288)
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$4.onTransportSuccess(AbstractRequestContext.java:959)
at com.google.gwt.requestfactory.client.DefaultRequestTransport
$1.onResponseReceived(DefaultRequestTransport.java:141)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
326)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
207)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at 

Re: Request implementation couldn't be found.

2011-09-02 Thread Thomas Broyer


On Friday, September 2, 2011 7:59:31 PM UTC+2, Nik wrote:

 Caused by: java.lang.RuntimeException: Server Error: null 


Your server-side code is causing a NullPointerException. Set a breakpoint 
into DefaultExceptionHandler to get the whole stack-trace. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Ysslfaxqj2gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-08-31 Thread Nik
The thing is that it happens when i try to fire a request with any of
the methodes implemented on the entity side. Console is always saying

 [ERROR] Could not find matching method in
synlogistics.ratesexchange.server.domain.Rate.
Possible matches:
  synlogistics.ratesexchange.server.domain.Rate
findRate(java.lang.Long )

I will definitely try to configure it manually, but I will be happy to
get it working also on the normal way.  Could there be any other
reasons why it is not working?

Thank you for your help and for your blog also!



On 29 Aug., 23:49, Thomas Broyer t.bro...@gmail.com wrote:
 Sorry, as the error says, this is not about findRates (plural), but findRate
 (singular).

 You can try downloading 
 requestfactory-apt-2011-08-18.jarhttp://google-web-toolkit.googlecode.com/svn/tools/lib/requestfactory...and
  configuring it in Eclipse; it's more accurate, and points the exact
 method directly in the code: 
 seehttp://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterf...

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-08-31 Thread Thomas Broyer
Can you show you code ? (RatesRequest, RateProxy, and associated server-side 
classes –method declarations only–)

It can be as simple as a method not being public, or a missing 
Locator/ServiceLocator on your @ProxyFor/@Service, or  @ProxyFor/@Service 
not point at the right class; or possibly a mistake in declaring the method 
on the RatesRequest (e.g. using an InstanceRequest Instead of a Request)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ALfps8svRu4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Request implementation couldn't be found.

2011-08-29 Thread Nik
When starting my application it fails on firing the request. Debug
mode says RatesRequestImpl.findrates(int a, int b) source couldn't be
found. Where findrates is one of my methods. Struggling with this
problem really long, checked all possible places of the app and no
solution found. I will appreciate any help, because it is already
driving me crazy.

Development mode stack is (after the Stack i will also post the
console) :

19:29:52.641 [ERROR] [ratesexchange] Uncaught exception escaped

com.google.gwt.event.shared.UmbrellaException: One or more exceptions
caught, see full set in UmbrellaException#getCauses
at
com.google.gwt.requestfactory.shared.impl.AbstractRequestContext.fail(AbstractRequestContext.java:
608)
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$4.onTransportFailure(AbstractRequestContext.java:955)
at com.google.gwt.requestfactory.client.DefaultRequestTransport
$1.onResponseReceived(DefaultRequestTransport.java:146)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
326)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
207)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
167)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
281)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
531)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Server Error 500 lt;htmlgt;
lt;headgt;
lt;meta http-equiv=quot;Content-Typequot; content=quot;text/html;
charset=ISO-8859-1quot;/gt;
lt;titlegt;Error 500 INTERNAL_SERVER_ERRORlt;/titlegt;
lt;/headgt;
lt;bodygt;lt;h2gt;HTTP ERROR 500lt;/h2gt;
lt;pgt;Problem accessing /gwtRequest. Reason:
lt;pregt;INTERNAL_SERVER_ERRORlt;/pregt;lt;/pgt;lt;hr /
gt;lt;igt;lt;smallgt;Powered by Jetty://lt;/smallgt;lt;/igt;lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;
lt;br/gt;

lt;/bodygt;
lt;/htmlgt;

at
com.google.gwt.requestfactory.shared.Receiver.onFailure(Receiver.java:
41)
at
com.google.gwt.requestfactory.shared.impl.AbstractRequest.onFail(AbstractRequest.java:
118)
at
com.google.gwt.requestfactory.shared.impl.AbstractRequestContext.fail(AbstractRequestContext.java:
588)
at com.google.gwt.requestfactory.shared.impl.AbstractRequestContext
$4.onTransportFailure(AbstractRequestContext.java:955)
at com.google.gwt.requestfactory.client.DefaultRequestTransport
$1.onResponseReceived(DefaultRequestTransport.java:146)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
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
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at

Re: Request implementation couldn't be found.

2011-08-29 Thread Thomas Broyer


On Monday, August 29, 2011 7:42:08 PM UTC+2, Nik wrote:

 Console says : 

 [ERROR] Could not find matching method in 
 synlogistics.ratesexchange.server.domain.Rate. 
 Possible matches: 
   synlogistics.ratesexchange.server.domain.Rate 
 findRate(java.lang.Long )


Your method findRates in your RatesRequest request context has no 
corresponding findRates method in the Rate service class on the server.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/j1f-avPSpxAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-08-29 Thread Nik
The problem is it definitely has one in the Rate class (my Entity
class, all annotations set and checked everywhere)
Defined as :

@SuppressWarnings(unchecked)
public static ListRate findRates(int first, int max){
EntityManager em = EMF.get().createEntityManager();
try{
Query query = em.createQuery(select o from Rate o);
query.setFirstResult(first);
query.setMaxResults(max);
ListRate list = query.getResultList();
list.size();
return list;
}

finally {
em.close();
}
}

On 29 Aug., 20:53, Thomas Broyer t.bro...@gmail.com wrote:
 On Monday, August 29, 2011 7:42:08 PM UTC+2, Nik wrote:

  Console says :

  [ERROR] Could not find matching method in
  synlogistics.ratesexchange.server.domain.Rate.
  Possible matches:
    synlogistics.ratesexchange.server.domain.Rate
  findRate(java.lang.Long )

 Your method findRates in your RatesRequest request context has no
 corresponding findRates method in the Rate service class on the server.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request implementation couldn't be found.

2011-08-29 Thread Thomas Broyer
Sorry, as the error says, this is not about findRates (plural), but findRate 
(singular).

You can try downloading 
requestfactory-apt-2011-08-18.jarhttp://google-web-toolkit.googlecode.com/svn/tools/lib/requestfactory/requestfactory-apt-2011-08-18.jarand
 configuring it in Eclipse; it's more accurate, and points the exact 
method directly in the code: see 
http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vqDjh7bfgrwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.