Getting Unexpected internal compiler error

2016-02-04 Thread Jay Shukla
Hi All,

I am new to GWT and I imported existing Web GWT project to Eclipse and when 
i try to compile it through "GWT Compile" option of Eclipse it is throwing 
below error.
Project looks to be properly set up in Eclipse Workspace.

I am using GWT 2.7.0.

Can anyone please help in resolving below exception?


[ERROR] Unexpected internal compiler error
> java.lang.RuntimeException: Unexpectedly unable to access 
> Enum.createValueOfMap via reflection. Likely a dependency on the 
> com.google.gwt.user.User module is missing.
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.writeEnumValueOfMethod(GwtAstBuilder.java:2793)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.processEnumType(GwtAstBuilder.java:2425)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1861)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1588)
> at 
> org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1382)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3058)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:141)
> at 
> com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
> at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:985)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:339)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
> at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
> at com.google.gwt.dev.Compiler.run(Compiler.java:206)
> at com.google.gwt.dev.Compiler.run(Compiler.java:158)
> at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
> at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
> at 
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
> at com.google.gwt.dev.Compiler.main(Compiler.java:127)
>

Thanks in Advance.
Jay Shukla

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Getting Unexcepted Complilation Error

2016-02-04 Thread Jay Shukla
Hi All,

I am New to GWT and trying to find solution on below exception on internet 
but no luck.
I imported existing GWT Web Project to eclipse and it was set up correctly 
in eclipse but when i try Compile it with "GWT Compile" option in Eclipse 
it is throwing below exception. 

I am using GWT 2.7.0.

Can someone please help me in troubleshoting it?


> Compiling module com.delta.qsiweb.QsiWeb
> [ERROR] Unexpected internal compiler error
> java.lang.RuntimeException: Unexpectedly unable to access 
> Enum.createValueOfMap via reflection. Likely a dependency on the 
> com.google.gwt.user.User module is missing.
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.writeEnumValueOfMethod(GwtAstBuilder.java:2793)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.processEnumType(GwtAstBuilder.java:2425)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1861)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1588)
> at 
> org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1382)
> at 
> com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3058)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:141)
> at 
> com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
> at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:985)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:339)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
> at 
> com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
> at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
> at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
> at com.google.gwt.dev.Compiler.run(Compiler.java:206)
> at com.google.gwt.dev.Compiler.run(Compiler.java:158)
> at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
> at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
> at 
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
> at com.google.gwt.dev.Compiler.main(Compiler.java:127)



Regards,
Thanks in Advance. 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Any JSON library that works in both GWT and non-GWT environments?

2016-02-04 Thread Matt Campbell

Hello:

I want to develop an application that shares code between the browser 
(via GWT), ANdroid, and iOS (via JJ2ObjC), like Inbox. My application 
will access JSON-based web APIs, so it needs to be able to parse and 
serialize JSON. So does anyone know if there's a Java JSON library that 
works in both GWT and non-GWT environments? I see that GWT has its own 
JSON package, but that won't work for the other platforms. And a quick 
look at Gson and Jackson shows that they depend a lot on reflection, 
which GWT doesn't support.


Thanks,
Matt

--
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Any JSON library that works in both GWT and non-GWT environments?

2016-02-04 Thread Vassilis Virvilis
I am using Resty-gwt in client side and cxf in server side. I don't' know
about IOS but in theory it should be able to consume valid REST, jax-rs
json.
On Feb 5, 2016 04:50, "Slava Pankov"  wrote:

> If your server side is going to be implemented on Java, then just use
> Errai JAX-RS (it supports Jackson provider, so can be consumed from any
> client side language).
> That way you have your domain classes in shared folder, and they are used
> both server and client side, so you don't have to serialize/deserialize
> them manually.
>
> If you have something different on the server side, then choose from any
> of the following JSON libs: Piriti and
> https://github.com/hpehl/piriti/wiki/Comparison
>
>
> On Thursday, February 4, 2016 at 2:22:29 PM UTC-8, Matt Campbell wrote:
>>
>> Hello:
>>
>> I want to develop an application that shares code between the browser
>> (via GWT), ANdroid, and iOS (via JJ2ObjC), like Inbox. My application
>> will access JSON-based web APIs, so it needs to be able to parse and
>> serialize JSON. So does anyone know if there's a Java JSON library that
>> works in both GWT and non-GWT environments? I see that GWT has its own
>> JSON package, but that won't work for the other platforms. And a quick
>> look at Gson and Jackson shows that they depend a lot on reflection,
>> which GWT doesn't support.
>>
>> Thanks,
>> Matt
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Any JSON library that works in both GWT and non-GWT environments?

2016-02-04 Thread Slava Pankov
If your server side is going to be implemented on Java, then just use Errai 
JAX-RS (it supports Jackson provider, so can be consumed from any client 
side language).
That way you have your domain classes in shared folder, and they are used 
both server and client side, so you don't have to serialize/deserialize 
them manually.

If you have something different on the server side, then choose from any of 
the following JSON libs: Piriti 
and https://github.com/hpehl/piriti/wiki/Comparison


On Thursday, February 4, 2016 at 2:22:29 PM UTC-8, Matt Campbell wrote:
>
> Hello: 
>
> I want to develop an application that shares code between the browser 
> (via GWT), ANdroid, and iOS (via JJ2ObjC), like Inbox. My application 
> will access JSON-based web APIs, so it needs to be able to parse and 
> serialize JSON. So does anyone know if there's a Java JSON library that 
> works in both GWT and non-GWT environments? I see that GWT has its own 
> JSON package, but that won't work for the other platforms. And a quick 
> look at Gson and Jackson shows that they depend a lot on reflection, 
> which GWT doesn't support. 
>
> Thanks, 
> Matt 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to invoke native handler

2016-02-04 Thread David
I have the following html code:
TEST
and GWT code:
  Element divElement = Document.get().getElementById("first_div");
  Event.sinkEvents(divElement , Event.ONCLICK);
  Event.setEventListener(divElement , new EventListener() {
Window.alert("I Got");
  }

The problem is once I clicked "TEST", default handler in original html is 
not invoked, instead display "I Got". How do I fix this issue? Thanks

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JSNI Question

2016-02-04 Thread Stepan Koltsov
Except there are lots of things that are not possible via jsinterop. (Or 
maybe possible, but hard to find how to do it).

For example:

* JsArray still requires type parameter to extend JavaScriptObject, so you 
cannot work with cannot work with arrays of @JsType

* you cannot do index without JSNI (you cannot express foo[bar] in 
jsinterop without JSNI and @JsOverlay).

* you cannot catch `this` argument in function callback (which is used 
heavily in jquery).

-- 
Stepan


On Thursday, January 14, 2016 at 2:21:07 PM UTC+3, salk31 wrote:
>
> NB JSNI is being replaced by JsInterop... it is much nicer so if you are 
> starting new code I'd strongly recommend you use it rather than JSNI.
>
> On Sunday, January 10, 2016 at 8:00:30 AM UTC, Gourab wrote:
>>
>> Let me understand your question.
>>
>> - You have a GWT application, where you want to expose few 
>> functionality/UI via JavaScript Api.
>>
>> If thats what you want to achieve:
>>
>> - Can you check if you have  
>> in the gwt module where the API is exposed ?
>> - I dont think you need to prefaced anything with $wnd
>>
>> Regards
>> Gourab.
>>
>>
>>
>>
>> On Sat, Jan 9, 2016 at 10:00 PM, Eric Nissan  wrote:
>>
>>> I never got a response to this.  Anyone know if this is an issue?
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks,
>>> Eric
>>>
>>>
>>> On Tuesday, December 29, 2015 at 5:55:28 PM UTC-5, Eric Nissan wrote:

 I am using JSNI to reference a javascript library.  My initial call is 
 fine, but then somewhere down they chain I get a null pointer inside the 
 javascript library.

 I am referencing the library like this

 $wnd.TradingView.widget({});

 which is a valid reference.  

 This then seems to load in other javascript files.  the object it loads 
 are not referenced as $wnd (because that is a GWT thing), and I eventually 
 get a "cannot read property 'init' of undefined".

 My question is, could this be causing my problems?  
 for example I am getting this error on this call.  Is this because it 
 is not prefaced with $wnd?
 $.i18n.init({})

>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "GWT Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-we...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT and DefinitelyTyped

2016-02-04 Thread Satguru Srivastava
I think that is a great idea.

Look at what JSweet (http://www.jsweet.org ) has done with DefinitelyTyped.

They have automated the process of generating java interfaces from .d.ts 
file and thus, in one stroke, made available the thousands of java script 
libraries to java programmers.

Typescript definition files seem to be becoming the de facto standard for 
defining interface for  JavaScript libraries.

So it makes sense to ride that wave :)



On Tuesday, January 26, 2016 at 3:16:04 AM UTC-6, Martin Trummer wrote:
>
> are there any plans/thoughts of using DefinitelyTyped with GWT - maybe in 
> GWT 3.x?
> http://definitelytyped.org/ 
>
> i.e. it would be great to generate GWT js-interop code from the 
> DefinitelyTyped type-script definitions.
> then GWT would immediately have type-safe access to all the 
> DefinitelyTyped supported libs 
>
> is this technically possible at all?
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


accessing list of objects in javascript with JsInterop

2016-02-04 Thread suneel varma
when a class with JsType annotation has a method that returns list of 
objects, how can we access that list in JavaScript as an array or in any 
other way. Returned list seems to be a wrapped object.

Same java code:

@JsType
public class Test {

List pojoList;

public List getPojoList(){
   return this.pojoList;
   }
}



-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.