-
Sencha User
creating a table
How to create a table.
when I look at Grid class implementation on sencha overview site, they say that it is nesessary to make a Data class and DataProperties interface. but nevertheless when I create them I have
Generator 'com.sencha.gxt.data.rebind.PropertyAccessGenerator' threw an exception while rebinding "/../../DataProperties
-
The first thing I would check would be to ensure you copied the code exactly.
If you're sure that that's right, please post your stacktrace as the GWT compiler is usually pretty good about telling you what's wrong.
-
Sencha User
when I copy all the code it says "The constructor ColumnConfig<Post,String>(ValueProvider<Post,String>, int, String) is undefined" for example.
this constructor is in Post.java
if I import this class from example.jar instead of typing(copying from the site) it, compiler says: No source code is available for type com.sencha.gxt.examples.resources.client.model.Post; did you forget to inherit a required module?
when I add inherits for example.recources compiler says:
13:50:26.722 [ERROR] [lucene_trying_1] Failed to load module 'lucene_trying_1' from user agent 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0' at localhost:60144
java.lang.NoClassDefFoundError: org/apache/openjpa/enhance/PersistenceCapable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:750)
at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation(TypeOracleMediator.java:498)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:648)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:663)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:809)
at com.google.gwt.dev.javac.TypeOracleMediator.addNewTypes(TypeOracleMediator.java:439)
at com.google.gwt.dev.javac.TypeOracleMediatorFromSource.addNewUnits(TypeOracleMediatorFromSource.java:52)
at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:164)
at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:82)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:466)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:388)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373)
at com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:108)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:197)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: org.apache.openjpa.enhance.PersistenceCapable
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:750)
at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation(TypeOracleMediator.java:498)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:648)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:663)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:809)
at com.google.gwt.dev.javac.TypeOracleMediator.addNewTypes(TypeOracleMediator.java:439)
at com.google.gwt.dev.javac.TypeOracleMediatorFromSource.addNewUnits(TypeOracleMediatorFromSource.java:52)
at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:164)
at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:82)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:466)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:388)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373)
at com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:108)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:197)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:679)
-
Sencha User
well, comming back to the main problem:
when I create an object from the gxt.examples library
it sais: No source code is available for type com.sencha.gxt.explorer.client.grid.LiveGridExample; did you forget to inherit a required module?
as I understand I need to add to gwt.xml an inherit string like: " <inherits name="com.sencha.gxt.explorer.Explorer"/>"
when I do so it sais:
Loading modules
com.manning.gwtip.lucene.Lucene_trying_1
Loading inherited module 'com.manning.gwtip.lucene.Lucene_trying_1'
Loading inherited module 'com.sencha.gxt.explorer.Explorer'
Loading inherited module 'com.google.gwt.inject.Inject'
[ERROR] Unable to find 'com/google/gwt/inject/Inject.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 14: Unexpected exception while processing element 'inherits'
I can't understand
-
You need Gin (version 1.5) and Guice (version 3.0) to build this. These are in the war, and seaching for errors like "Unable to find 'com/google/gwt/inject/Inject.gwt.xml' on your classpath" on Google shows documentation about Gin.
-
Why are you including the entire Explorer project if you are trying to draw a Grid? This seems like massive overkill - like a new operating system just to play a card game.
Go to http://www.sencha.com/examples/#ExamplePlace:basicgrid and open the Source tab. Copy the simple EntryPoint there, and try adding it to your own project - you'll also need the Stock and StockProperties types, discussed elsewhere. These should be the *only* classes from the examples required - everything else is in GXT or GWT itself.
-
Sencha User
I do so because I want to see it works.
-
Like I said, Gin is required, and Gin needs the Guice library to make it work. If you want to get the full explorer running, you'll need to set up a database (the war file uses H2 I believe), and you'll need to JPA enhance the entity files (Music and Folder) so that JPA can monitor reads and writes to them. This isn't part of GXT itself, this is just how the explorer back-end works to make it simple to use as sencha.com/examples. In the same way, it isn't made to be necessarily easy to wire the whole thing up on your own - that's why we include the compiled war.
If you have specific questions or errors, go ahead and post them, but this is an application designed to showcase examples, not an example application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules