Running GWT JUNIT programatically
I'm having some trouble testing my application. We have some pretty complex hierarchical data being created and to do effective testing I want to put the Database into a known state before running any tests, whether that's empty or with a predefined set of data depends on the specific tests being run. GWT Junit tests don't allow you to perform async requests during the beforeMethod. To try and get around some of this I'm trying to run all my junit tests from my own handler. The process works kind of like this: A. load the list of GWTTestCases B. Ask each test whether it wants an empty database or a predefined data set in the DB and create the preconditions. All my tests extend a base class which extends GWTTestCase and has a series of flags that let it specify the required DB state. C. run the GWTTestCases as normal. The first 2 steps are pretty straightforward but the third one is throwing me. I can't get any of the tests to run. I'm sure I'm not running the tests properly. I'm getting a combination of errors both: The test class 'com.scalebase.management.client.DummyTest' was not found in module 'com.scalebase.management.ScaleBaseManagement'; no compilation unit for that type was seen And GWTTestCases require a name; null(com.scalebase.management.client.DummyTest) has none. Perhaps you used TestSuite.addTest() instead of addTestClass()? Can anyone give me some guidance in how to run the GWT unit tests programatically? Also should I be running the tests class by class or should I use reflection to try and run them method by method? I'm not really sure how normal tools handle these issues. Any help would be greatly appreciated Thanks My class looks like this: public class NewApproach { private ServersService ss; private ListTestBase tests; private void loadTests() { tests = new ArrayListTestBase(); tests.add(new DummyTest()); } private void clean() throws Exception { ss = new ServersService(); ss.clean(1); } private TestResult runTest(TestBase tests) throws Exception { if(tests.isCleanBeforeRunning()) clean(); TestResult tr = new TestResult(); tests.run(tr); return tr; } private void printResults(TestResult tr) { int passes = tr.runCount() - (tr.failureCount() + tr.errorCount()); System.out.println(Ran + tr.runCount() + tests + passes + passed); System.out.println(); while(tr.errors().hasMoreElements()) { TestFailure tf = tr.errors().nextElement(); System.out.println(tf.failedTest().toString() + error); System.out.println(tf.exceptionMessage()); System.out.println(tf.trace()); tf.thrownException().printStackTrace(); } while(tr.failures().hasMoreElements()) { TestFailure tf = tr.failures().nextElement(); System.out.println(tf.failedTest().toString() + failed); } } public void runTests() throws Exception { for(TestBase test: tests) { TestResult tr = runTest(test); this.printResults(tr); } } public static void main(String[] args) throws Exception { NewApproach na = new NewApproach(); na.loadTests(); na.runTests(); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Code Coverage
Do you mean you're using the surefire test goal or the gwt:test goal? I've spent a few days trying to get either working without much luck. I haven't been using maven to run my tests in the past (because I don't want them package into the war and increasing the size of the war) now I'm struggling to get maven to build and run my tests at all. They're in a separate folder outside of src. Which maven goal approach did you take to running emma? Thanks On Friday, March 8, 2013 6:13:11 PM UTC-5, Colin Alworth wrote: We've been using the Maven2 emma:emma goal, with no modifications at all - seems to behave correctly with htmlunit in dev mode, both for traditional junit tests and GWTTestCases. No changes to the pom, just executing emma:emma with maven 2.2.1 on our project. On Thursday, March 7, 2013 11:01:37 AM UTC-6, darkling wrote: Does anyone have any recent experience working with a code coverage tool and GWT? I heard that emma worked so I downloaded the eclipse emma plugin and gave it a whirl. The problem is it only seems to tell me that no line of mine was ever touched. I tried running it on my nonGWT code and it seems to work fine. But GWT gives me no answers. I read a post saying that the emma approach doesn't work with the latest version of GWT (I am using 2.4) can anyone confirm or deny this? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Code Coverage
Does anyone have any recent experience working with a code coverage tool and GWT? I heard that emma worked so I downloaded the eclipse emma plugin and gave it a whirl. The problem is it only seems to tell me that no line of mine was ever touched. I tried running it on my nonGWT code and it seems to work fine. But GWT gives me no answers. I read a post saying that the emma approach doesn't work with the latest version of GWT (I am using 2.4) can anyone confirm or deny this? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Code Coverage
I did but it didn't work for me. Did it work for you? Thanks On Thursday, March 7, 2013 12:07:33 PM UTC-5, Jens wrote: Have you used the patched GWT emma version? Take a look at: https://developers.google.com/web-toolkit/doc/latest/DevGuideTestingCoverage -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: SerializationException with List
Just an addendum but I tried removing maven and running the eclipse gwt plugin directly to build my project. I got the exact same errors: The response can not be deserialized when I have gwt-servlet-2.2.jar in my war lib and The response can not be deserialized expected version 7 but server had 5 when I don't. Any help would be wonderful because we're trying to do a release come Monday Thanks On Oct 28, 7:52 pm, darkling darkling...@aol.com wrote: Yes but I still got The response could not be deserialized Im using maven plugin so my POM looks like this: plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdgwt-maven-plugin/artifactId version2.4.0/version configuration localWorkers1/localWorkers warSourceDirectory${basedir}/war/warSourceDirectory module${cura.assessor.module}/module styleOBFUSCATED/style gwtVersion2.4.0/gwtVersion disableCastCheckingtrue/disableCastChecking soycfalse/soyc /configuration executions execution goals goalcompile/goal goalgenerateAsync/goal /goals /execution /executions /plugin I'm not manually including any gwt jars, though I added gwt- servlet.jar to my war folder because I got the explicit mismatching version error when I didn't Matt On Oct 28, 4:18 pm, Markus Zywitza markus.zywi...@gmail.com wrote: Did you already try ArrayList instead of List? --Markus 2011/10/28 darkling darkling...@aol.com I've just managed to update my GWT (2.4) and I'm having problems with my RPCs. Every time I try to send a List object it says the item can not be deserialized. I single stepped through it and it comes out as a SerializationException which GWT wraps in a IncompatibleRemoteServiceException. The Lists are of pojo objects that do implement Serializable and have always been deserializable before. I thought that it might be related to mismatching GWT jars so I tried changing them. When I use the gwt- servlet.jar (version 2.2.) it says Response can not be deserialized. When I use a different version of that jar it says Response can not be deserialized expected version 7 but server had 5 or something like that which leads me to believe my jars are correct. But for some reason I can't deserialize a list. I've seen a lot of postings on this subject but no concrete answers. I'm not running in hosted mode, just using raw tomcat. I can't figure out what's wrong. Can anyone recommend some other things I should check? Or a way to debug so I know what versions are being used? The System no longer complains about the versions when I use the correct jars but if the versions are correct can anyone suggest a reason why the List object can not be deserialized? Any help would be great, thanks. -- 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. -- 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.
SerializationException with List
I've just managed to update my GWT (2.4) and I'm having problems with my RPCs. Every time I try to send a List object it says the item can not be deserialized. I single stepped through it and it comes out as a SerializationException which GWT wraps in a IncompatibleRemoteServiceException. The Lists are of pojo objects that do implement Serializable and have always been deserializable before. I thought that it might be related to mismatching GWT jars so I tried changing them. When I use the gwt- servlet.jar (version 2.2.) it says Response can not be deserialized. When I use a different version of that jar it says Response can not be deserialized expected version 7 but server had 5 or something like that which leads me to believe my jars are correct. But for some reason I can't deserialize a list. I've seen a lot of postings on this subject but no concrete answers. I'm not running in hosted mode, just using raw tomcat. I can't figure out what's wrong. Can anyone recommend some other things I should check? Or a way to debug so I know what versions are being used? The System no longer complains about the versions when I use the correct jars but if the versions are correct can anyone suggest a reason why the List object can not be deserialized? Any help would be great, thanks. -- 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: SerializationException with List
Yes but I still got The response could not be deserialized Im using maven plugin so my POM looks like this: plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdgwt-maven-plugin/artifactId version2.4.0/version configuration localWorkers1/localWorkers warSourceDirectory${basedir}/war/warSourceDirectory module${cura.assessor.module}/module styleOBFUSCATED/style gwtVersion2.4.0/gwtVersion disableCastCheckingtrue/disableCastChecking soycfalse/soyc /configuration executions execution goals goalcompile/goal goalgenerateAsync/goal /goals /execution /executions /plugin I'm not manually including any gwt jars, though I added gwt- servlet.jar to my war folder because I got the explicit mismatching version error when I didn't Matt On Oct 28, 4:18 pm, Markus Zywitza markus.zywi...@gmail.com wrote: Did you already try ArrayList instead of List? --Markus 2011/10/28 darkling darkling...@aol.com I've just managed to update my GWT (2.4) and I'm having problems with my RPCs. Every time I try to send a List object it says the item can not be deserialized. I single stepped through it and it comes out as a SerializationException which GWT wraps in a IncompatibleRemoteServiceException. The Lists are of pojo objects that do implement Serializable and have always been deserializable before. I thought that it might be related to mismatching GWT jars so I tried changing them. When I use the gwt- servlet.jar (version 2.2.) it says Response can not be deserialized. When I use a different version of that jar it says Response can not be deserialized expected version 7 but server had 5 or something like that which leads me to believe my jars are correct. But for some reason I can't deserialize a list. I've seen a lot of postings on this subject but no concrete answers. I'm not running in hosted mode, just using raw tomcat. I can't figure out what's wrong. Can anyone recommend some other things I should check? Or a way to debug so I know what versions are being used? The System no longer complains about the versions when I use the correct jars but if the versions are correct can anyone suggest a reason why the List object can not be deserialized? Any help would be great, thanks. -- 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. -- 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.
Odd IncompatibleRemoteServiceException
We've been building this application for several months no problems until now. We haven't upgraded any jars but we did upgrade the Eclipse GWT plugin the other day. Since then the application works ok in normal mode but when I try to debug it in hosted mode it fails with the following exception: Invalid version number 2.0 passed to external.gwtOnLoad(), expected 2.1; your development mode bootstrap file may be out of date; if you are using -noserver try recompiling and redeploying your app; if you just switched to a different version of GWT, try clearing your browser cache I tried doing a clean, clearing browser cache, all that. I found where in the hosted.html file the version number is set. I have been going in manually to change it to 2.1 but that's very annoying. I'm using maven gwt plugin. Can anyone tell me where to change it permanently? The bigger problem is that after I have changed the version number I am still unable to debug in hosted mode. Then it crashes with this exception: SEVERE: Login: An IncompatibleRemoteServiceException was thrown while processing this call. com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from client, got 7. ) As I said we didn't change anything except possibly the eclipse plugin. I can't just get all latest from GWT because we're using EXT- GWT as our main library and I'm worried it won't be yet compatible. For an experiment I created a brand new GWT application that doesn't use EXT-GWT or Maven and it worked correctly in hosted mode, up to and including having version number 2.1. I'm really not sure what to try next. Any suggestions would be great I have a delivery on Monday and have been beating my head against this for a week. I can't debug anything while this issue remains. Thanks -- 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: Odd IncompatibleRemoteServiceException
It does have to regenerate it. Our build system actually deletes it everytime it runs but the hosted.html file actually has a modified date of February. I'm not sure how that's possible, it must be being copied from somewhere by GWT On Oct 27, 10:13 am, Jens jens.nehlme...@gmail.com wrote: An IncompatibleRemoteServiceException is thrown when you have an old gwt-servlet.jar in your WEB-INF/lib folder. Your client speaks version 7 while your server only understands (and expects) version 5. Just copy the correct GWT 2.1 gwt-servlet.jar into your WEB-INF/lib folder. Regarding your hosted mode file, have you tried to rename your war folder/your app folder so GWT has to regenerate it? -- 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: Odd IncompatibleRemoteServiceException
I tried grabbing gwt-servlet.jar and that did fix the second issue, assuming I manually change the verison number in hosted.html I can run the program in hosted mode. But when I regenerate hosted.html it always puts 2.0 If anyone can give me any suggestions that would be great Thanks for all the help so far On Oct 27, 11:11 am, darkling darkling...@aol.com wrote: It does have to regenerate it. Our build system actually deletes it everytime it runs but the hosted.html file actually has a modified date of February. I'm not sure how that's possible, it must be being copied from somewhere by GWT On Oct 27, 10:13 am, Jens jens.nehlme...@gmail.com wrote: An IncompatibleRemoteServiceException is thrown when you have an old gwt-servlet.jar in your WEB-INF/lib folder. Your client speaks version 7 while your server only understands (and expects) version 5. Just copy the correct GWT 2.1 gwt-servlet.jar into your WEB-INF/lib folder. Regarding your hosted mode file, have you tried to rename your war folder/your app folder so GWT has to regenerate it? -- 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: Odd IncompatibleRemoteServiceException
Can anyone tell me what jar or property makes the client want version number 7? I'd much rather revert the client to the correct version we support than try to update the server right before a release Thanks On Oct 27, 11:33 am, darkling darkling...@aol.com wrote: I tried grabbing gwt-servlet.jar and that did fix the second issue, assuming I manually change the verison number in hosted.html I can run the program in hosted mode. But when I regenerate hosted.html it always puts 2.0 If anyone can give me any suggestions that would be great Thanks for all the help so far On Oct 27, 11:11 am, darkling darkling...@aol.com wrote: It does have to regenerate it. Our build system actually deletes it everytime it runs but the hosted.html file actually has a modified date of February. I'm not sure how that's possible, it must be being copied from somewhere by GWT On Oct 27, 10:13 am, Jens jens.nehlme...@gmail.com wrote: An IncompatibleRemoteServiceException is thrown when you have an old gwt-servlet.jar in your WEB-INF/lib folder. Your client speaks version 7 while your server only understands (and expects) version 5. Just copy the correct GWT 2.1 gwt-servlet.jar into your WEB-INF/lib folder. Regarding your hosted mode file, have you tried to rename your war folder/your app folder so GWT has to regenerate it? -- 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.
Adding external jar to client side
I have a group of model files defined in an external jar. These are the objects used in my applications. They are shared among many projects. I have no trouble using them on the server side but I can't seem to get the GWT compiler to work with them so I can bring them onto the client side. The files are defined in a separate war from my GWT and I added a .gwt.xml file to the Model war. The compiler seems to know its there (if for example I change the name of the module I inherit to something that doesn't exist it complains) BUT it doesn't seem to compile the Model source. It just goes right into the main GWT project and complains that the source for the model is missing. I made sure the source files were included in the Model jar but it didn't help anything. I also confirmed that the .gwt.xml file exists in the jar. Do I need to compile them separately? Do I need a dummy entry point in the Model war? My current .gwt.xml just defined a source and a module name. Any help would be great because I'm kind of on a deadline. Thanks -- 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.
Out of Memory
I'm working with a GXT tree grid right now and its throwing OOM exceptions whenever I try to open a node. I'm struggling to figure that out since the tree only contains about 15 nodes and I have allocated over a gig of heap memory. Can anyone elaborate on how an OOM exception is thrown in GWT? I would have thought it couldn't be generated by compiled javascript. Although the JS could run out of heap space it would be more a browser crash than anything else. Can anyone give me some insight into how to debug this? Thanks -- 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: NetBeans GWT and JUNIT
I've been working on this all weekend without success. Can anyone help me? On Dec 3, 2:33 pm, darkling darkling...@aol.com wrote: I also wanted to add my Test class in case something in there is being done wrong: package com.baa.client; import com.baa.client.model.WebAppRestDataSource; import com.baa.client.presentation.DummyDynamicFormPresentation; import com.baa.client.presentation.DynamicFormPresentation; import com.google.gwt.junit.client.GWTTestCase; import com.smartgwt.client.data.Criteria; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.data.DSResponse; /** * * @author mmagliocca */ public class BaseDynamicFormTest extends GWTTestCase{ public BaseDynamicFormTest() { //ClasspathUtility.printDuplicates(); } @Override public String getModuleName() { return com.baa.Scaffolding; } /* @Test public void testTest() { } @Test public void testSave() { } @Test public void testCancel() { } @Test public void testGetPermissionsObject() { } */ //@Test public void testFetchData() { int x =1; x++; //finishTest(); } //@Test public void testGetXSD() { BaseDynamicFormImpl impl = new BaseDynamicFormImpl(); TestDynamicFormXSDDSCallBack xsdCallBack = new TestDynamicFormXSDDSCallBack(); TestDynamicFormDataDSCallBack dataCallBack = new TestDynamicFormDataDSCallBack(); Criteria criteria = new Criteria(ID, 3); dataCallBack.setForm(impl); xsdCallBack.setForm(impl); xsdCallBack.setForm(impl); xsdCallBack.setDsCallback(dataCallBack); xsdCallBack.setForm(impl); this.delayTestFinish(5000); impl.fetchXSD(criteria, xsdCallBack); } /* @Test public void testSetValidator() { } */ public class BaseDynamicFormImpl extends BaseDynamicForm { public DynamicFormPresentation getPermissionsObject() { return new DummyDynamicFormPresentation(null); } } public class TestDynamicFormXSDDSCallBack extends DynamicFormXSDCallBack { @Override public void execute(WebAppRestDataSource ds) { finishTest(); super.execute(ds); //validate correctness } } public class TestDynamicFormDataDSCallBack extends DynamicFormDataCallBack { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { super.execute(response, rawData, request); //validate correctness finishTest(); } } } On Dec 3, 9:24 am, darkling darkling...@aol.com wrote: I'm trying to debug my Junit test case because its throwing tons of errors. However when I try to debug it instead of being able to run it, it tells me The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java: 605) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1189) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1152) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java: 541) at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:406) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:282) So now rather than debugging the errors that are caused when I run the test, I'm trying to debug the errors that only appear when I debug the test! I've seen lots of posts on this basic topic but they've all been Eclipse based and I'm not sure how to translate it for Netbeans. I'm using the GWT netbeans plugin and my test classes live in the test directory not the src directory. This is my module file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0.0// EN http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro- source/core/src/gwt-module.dtd module !-- Inherit the core Web Toolkit stuff. -- inherits name=com.google.gwt.user.User/ inherits name=com.smartgwt.SmartGwt/ !-- TODO: remove from production -- !-- provides access to SmartGWT console for debugging, to start console enter javascript:isc.showConsole() in browser URL -- inherits name=com.smartgwt.tools.SmartGwtTools/ !-- SmartGWT skin that we modify -- !-- TODO: determine if we can rename this -- inherits name=com.smartclient.theme.silverwave.SilverWave
NetBeans GWT and JUNIT
I'm trying to debug my Junit test case because its throwing tons of errors. However when I try to debug it instead of being able to run it, it tells me The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java: 605) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1189) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1152) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java: 541) at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:406) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:282) So now rather than debugging the errors that are caused when I run the test, I'm trying to debug the errors that only appear when I debug the test! I've seen lots of posts on this basic topic but they've all been Eclipse based and I'm not sure how to translate it for Netbeans. I'm using the GWT netbeans plugin and my test classes live in the test directory not the src directory. This is my module file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0.0// EN http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro- source/core/src/gwt-module.dtd module !-- Inherit the core Web Toolkit stuff.-- inherits name=com.google.gwt.user.User/ inherits name=com.smartgwt.SmartGwt/ !-- TODO: remove from production -- !-- provides access to SmartGWT console for debugging, to start console enter javascript:isc.showConsole() in browser URL -- inherits name=com.smartgwt.tools.SmartGwtTools/ !-- SmartGWT skin that we modify -- !-- TODO: determine if we can rename this -- inherits name=com.smartclient.theme.silverwave.SilverWave/ !--inherits name=com.smartgwt.SmartGwtNoTheme/-- !-- TODO: remove from production -- !-- For development, only compile one permutation to save time -- !-- Possible user.agent settings: ie6,ie8, gecko, gecko1_8(FireFox 2), safari, opera -- !--set-property name=user.agent value=ie8/-- set-property name=user.agent value=gecko1_8/ inherits name=com.google.gwt.junit.JUnit/ !-- Include client-side source we might like to test -- source path=client/ !-- Include client-side source for the test cases -- source path=test/ !-- Specify the app entry point class. -- entry-point class=com.baa.client.WebAppEntryPoint/ /module I'm trying to include the test sources in the module but I'm not sure if I did it right. Can anyone help me? Thanks -- 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-tool...@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: NetBeans GWT and JUNIT
I also wanted to add my Test class in case something in there is being done wrong: package com.baa.client; import com.baa.client.model.WebAppRestDataSource; import com.baa.client.presentation.DummyDynamicFormPresentation; import com.baa.client.presentation.DynamicFormPresentation; import com.google.gwt.junit.client.GWTTestCase; import com.smartgwt.client.data.Criteria; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.data.DSResponse; /** * * @author mmagliocca */ public class BaseDynamicFormTest extends GWTTestCase{ public BaseDynamicFormTest() { //ClasspathUtility.printDuplicates(); } @Override public String getModuleName() { return com.baa.Scaffolding; } /* @Test public void testTest() { } @Test public void testSave() { } @Test public void testCancel() { } @Test public void testGetPermissionsObject() { } */ //@Test public void testFetchData() { int x =1; x++; //finishTest(); } //@Test public void testGetXSD() { BaseDynamicFormImpl impl = new BaseDynamicFormImpl(); TestDynamicFormXSDDSCallBack xsdCallBack = new TestDynamicFormXSDDSCallBack(); TestDynamicFormDataDSCallBack dataCallBack = new TestDynamicFormDataDSCallBack(); Criteria criteria = new Criteria(ID, 3); dataCallBack.setForm(impl); xsdCallBack.setForm(impl); xsdCallBack.setForm(impl); xsdCallBack.setDsCallback(dataCallBack); xsdCallBack.setForm(impl); this.delayTestFinish(5000); impl.fetchXSD(criteria, xsdCallBack); } /* @Test public void testSetValidator() { } */ public class BaseDynamicFormImpl extends BaseDynamicForm { public DynamicFormPresentation getPermissionsObject() { return new DummyDynamicFormPresentation(null); } } public class TestDynamicFormXSDDSCallBack extends DynamicFormXSDCallBack { @Override public void execute(WebAppRestDataSource ds) { finishTest(); super.execute(ds); //validate correctness } } public class TestDynamicFormDataDSCallBack extends DynamicFormDataCallBack { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { super.execute(response, rawData, request); //validate correctness finishTest(); } } } On Dec 3, 9:24 am, darkling darkling...@aol.com wrote: I'm trying to debug my Junit test case because its throwing tons of errors. However when I try to debug it instead of being able to run it, it tells me The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.baa.client.BaseDynamicFormTest' was not found in module 'com.baa.AccountView'; no compilation unit for that type was seen at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java: 605) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1189) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 1152) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java: 541) at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:406) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:282) So now rather than debugging the errors that are caused when I run the test, I'm trying to debug the errors that only appear when I debug the test! I've seen lots of posts on this basic topic but they've all been Eclipse based and I'm not sure how to translate it for Netbeans. I'm using the GWT netbeans plugin and my test classes live in the test directory not the src directory. This is my module file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0.0// EN http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro- source/core/src/gwt-module.dtd module !-- Inherit the core Web Toolkit stuff. -- inherits name=com.google.gwt.user.User/ inherits name=com.smartgwt.SmartGwt/ !-- TODO: remove from production -- !-- provides access to SmartGWT console for debugging, to start console enter javascript:isc.showConsole() in browser URL -- inherits name=com.smartgwt.tools.SmartGwtTools/ !-- SmartGWT skin that we modify -- !-- TODO: determine if we can rename this -- inherits name=com.smartclient.theme.silverwave.SilverWave/ !--inherits name=com.smartgwt.SmartGwtNoTheme/-- !-- TODO: remove from production -- !-- For development, only compile one permutation to save time -- !-- Possible user.agent settings: ie6,ie8, gecko, gecko1_8(FireFox 2), safari, opera -- !--set-property
Re: Junit blows up in HTMLunit
I'm starting to wonder if this might be netbeans related. I let netbeans build my test class stubs but I'm not sure if netbeans's follows the right pattern. The developer's guide says: Run your test case. Use the class junit.textui.TestRunner as your main class and pass the full name of your test class as the command line argument, e.g. com.example.foo.client.FooTest. When running the test case, make sure your classpath includes: etc etc I've been just telling netbeans to Test the project by clicking on the project and selecting test. Will this not work? I'm not really sure where to test the junit testing parameters and commandline arguments. I tried creating an empty junit test case (by which I mean the methods were all empty) and it threw no errors. I tried removing lines in the real methods to see which line made it explode but it seemed like anything at all in the test methods caused the issues, even if the only line was finishTest(). I'm not really sure how to interpret this behavior. This is the test class. Some of the annotations have been commented out because I've been testing for junit 3 and junit 4 to see if I could get either to work. The methods basically just make an RPC call and then say it worked successfully. You can find the asynchronous callback functions defined at the bottom of the code. Any suggestions or thoughts would be most welcome package com.baa.client; import com.baa.client.model.WebAppRestDataSource; import com.baa.client.presentation.DynamicFormPresentation; import com.google.gwt.junit.client.GWTTestCase; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.data.DSResponse; import java.io.File; import java.util.Arrays; public class BaseDynamicFormTest extends GWTTestCase{ public BaseDynamicFormTest() { // ClasspathUtility.printMembers(org.apache.commons.httpclient.HttpClient); } @Override public String getModuleName() { return com.baa.Scaffolding; } //@Test public void testFetchData() { finishTest(); } //@Test public void testGetXSD() { BaseDynamicFormImpl impl = new BaseDynamicFormImpl(); TestDynamicFormXSDDSCallBack xsdCallBack = new TestDynamicFormXSDDSCallBack(); TestDynamicFormDataDSCallBack dataCallBack = new TestDynamicFormDataDSCallBack(); dataCallBack.setForm(impl); xsdCallBack.setForm(impl); xsdCallBack.setDsCallback(dataCallBack); this.delayTestFinish(5000); impl.fetchXSD(null, xsdCallBack); } public class BaseDynamicFormImpl extends BaseDynamicForm { public DynamicFormPresentation getPermissionsObject() { return null; } } public class TestDynamicFormXSDDSCallBack extends DynamicFormXSDCallBack { protected BaseDynamicFormTest test; @Override public void execute(WebAppRestDataSource ds) { super.execute(ds); //validate correctness test.finishTest(); } } public class TestDynamicFormDataDSCallBack extends DynamicFormDataCallBack { protected BaseDynamicFormTest test; @Override public void execute(DSResponse response, Object rawData, DSRequest request) { super.execute(response, rawData, request); //validate correctness test.finishTest(); } } } On Nov 12, 7:26 am, darkling darkling...@aol.com wrote: Yes it extends GWTTestCase. I'm assuming this needs to be some kind of classpath/classloader bug but I'm not really sure where to look. Is this code executed in the server? Should I be checking my server libs? Any suggestions or advice would be welcome Thanks On Nov 11, 11:22 pm, Didier Durand durand.did...@gmail.com wrote: Hi, Does your test case extends GWTTestCase: seehttp://code.google.com/webtoolkit/doc/latest/DevGuideTesting.html#Dev... for all details regards didier On Nov 11, 5:59 pm, darkling darkling...@aol.com wrote: I'm trying to build some unit tests for a GWT application. I'm using GWT 2.2, SmartGWT 1.6,JUNIT4.5 (I also triedJUNIT3.8), Tomcat 6, and Netbeans 6.9.1. What happens is that I'll try to run my tests and the test will crash hard with the following exception: Exception in thread htmlUnit client thread java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.init(Lorg/apache/commons/ httpclient/HttpConnectionManager;)V at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java: 394) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java: 352) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java: 94) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java: 1397
Re: GXT, smartGWT and Co
I've been studying both SmartGWT and EXT-GWT (GXT) lately thinking about similar issues (which is the right one to use and under which circumstances). What I've found so far suggests a few major differences: SmartGWT seems to be a thin GWT wrapper around JS libraries as compared to GXT's pure GWT java SmartGWT seems to specialize in writing less code: DataSources and certainly their server side wizards (need to pay for those) allow you to build applications quickly with less code generation. This is both a strength and a weakness IMHO, it works fabulously when it does work but it can be difficult to debug if you have problems. It can also be difficult to add new features to existing widgets or hook into the widgets because they seem to defer directly to the Smartclient JS libraries. GXT requires you to write more glue code (especially in moving data around and inserting values) than SmartGWT but it is easier modify widgets and functionality by overriding methods. GXT is GPL, SmartGWT is LGPL SmartGWT supports selenium Neither one has a ton of MVP classes out of the box IMHO SmartGWT is a little less intuitive to a GWT coder, there will be a learning curve because it remains more similar to the SC ajax library than to GWT. GXT has a similar but smaller learning curve because the Store/bean/service pattern is pretty familiar to most GWT coders Personally I'd like to know which one is going to be the industry standard. Google seems to be ( I have heard this though it may be incorrect) throwing its weight behind SmartGWT which makes me wonder if GWT is going to somehow absorb SmartGWT. If that's true I hope they get rid of the thin wrapper approach. Ignoring for the moment the industry standard question, I'd recommend using SmartGWT to minimze code generation if you're not doing anything especially odd and GXT if you think you may need to alter the underlying code. For example, SmartGWT only seems to allow ListGrid grouping with result sets entirely on the client side, if your result set is several thousand in total this isn't so good, especially if you're groups may only be 10 or 20 items each. We're trying to decide the right way to handle this. I don't know if I answered your question but I hope something here was helpful GL On Nov 15, 6:50 am, nino ekambi jazzmatad...@googlemail.com wrote: For what i know GXT is planing with version 3 to support more GWT feartures For the other libraries, no idea. 2010/11/15 Stefan Bachert stefanbach...@yahoo.de Hi, to which degree does framework which are on the top of GWT, follows GWT and support new features? - smartGWT ? MVP ? Cell Widgets ? RequestFactory - GXT ? MVP ? Cell Widgets ? RequestFactory - mosaic ? MVP ? Cell Widgets ? RequestFactory .. more ? Stefan Bachert http://gwtworld.de -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- 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-tool...@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: Junit blows up in HTMLunit
Yes it extends GWTTestCase. I'm assuming this needs to be some kind of classpath/classloader bug but I'm not really sure where to look. Is this code executed in the server? Should I be checking my server libs? Any suggestions or advice would be welcome Thanks On Nov 11, 11:22 pm, Didier Durand durand.did...@gmail.com wrote: Hi, Does your test case extends GWTTestCase: seehttp://code.google.com/webtoolkit/doc/latest/DevGuideTesting.html#Dev... for all details regards didier On Nov 11, 5:59 pm, darkling darkling...@aol.com wrote: I'm trying to build some unit tests for a GWT application. I'm using GWT 2.2, SmartGWT 1.6, JUNIT 4.5 (I also tried JUNIT 3.8), Tomcat 6, and Netbeans 6.9.1. What happens is that I'll try to run my tests and the test will crash hard with the following exception: Exception in thread htmlUnit client thread java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.init(Lorg/apache/commons/ httpclient/HttpConnectionManager;)V at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java: 394) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java: 352) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java: 94) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java: 1397) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java: 1331) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:293) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:339) at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java:100) I realize that NoSuchMethodError is almost invariably caused by classpath or classloader issues and have been trying to dissect that but without success. I can only find one copy of htmlunit on my runtime classpath (it's in GWT-user.jar) and I'm not really sure where else to look for causes of this problem. Do I need to add GWT jars to Tomcat or something for my unit tests to work? Has anyone run into this problem before? I can't figure out how I can solve it. Any suggestions or strategies would be most appreciated. Thanks -- 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-tool...@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.
Junit blows up in HTMLunit
I'm trying to build some unit tests for a GWT application. I'm using GWT 2.2, SmartGWT 1.6, JUNIT 4.5 (I also tried JUNIT 3.8), Tomcat 6, and Netbeans 6.9.1. What happens is that I'll try to run my tests and the test will crash hard with the following exception: Exception in thread htmlUnit client thread java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.init(Lorg/apache/commons/ httpclient/HttpConnectionManager;)V at com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java: 394) at com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java: 352) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java: 94) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java: 1397) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java: 1331) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:293) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:339) at com.google.gwt.junit.RunStyleHtmlUnit $HtmlUnitThread.run(RunStyleHtmlUnit.java:100) I realize that NoSuchMethodError is almost invariably caused by classpath or classloader issues and have been trying to dissect that but without success. I can only find one copy of htmlunit on my runtime classpath (it's in GWT-user.jar) and I'm not really sure where else to look for causes of this problem. Do I need to add GWT jars to Tomcat or something for my unit tests to work? Has anyone run into this problem before? I can't figure out how I can solve it. Any suggestions or strategies would be most appreciated. Thanks -- 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-tool...@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.
Passing errors to OnFailure
If I'm on the server and I catch an exception, how do I pass control back to onFailure rather than onsuccess? If i catch a nullpointer exception for instance in my server code, the method executes as scheduled and winds up in onsuccess which isn't doing any error checking and can;t handle the unknown state. Can anyone explain to me how this works? I wasn't able to gather it from the javadoc. Thanks -- 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-tool...@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.
My icons are missing
I'm trying to add icons to my application. Everything worked fine when I ran in the google browser but now that I've published the system to my dev server (its Sun Application server 9.1) the icons are all missing. I'm also noticing that any servlets I try to access via HTTP (FormPanels) rather than RPC also come up as 404s. My RPC servlets work fine. The icons I'm trying to access are the grid icons from EXT-GWT which always worked fine up until now. I packaged up my war and dropped it into the autodeploy in Glassfish just as I always would but now the links aren't working. Am I doing something wrong for GWT? My war structure is /images /appName (with all the GWT JS files) appName.html gxt-grey.css gxt-all.css I'm trying to access .x-grid3-dirty-cell { background-image:url(/images/default/grid/dirty.gif); } which isn't working. When I try to input the URL http://localhost:8080/appName/images/default/grid/dirty.gif The icon appears. Can anyone tell me what I'm doing wrong? Thanks -- 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-tool...@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: My icons are missing
Not to ask a dumb question but why does it work when I run it through the GWT plugin and not when I move it to glassfish? I really want the same code to run in both places. My application is called ADT which is also the name of my google script folder. I have servlets mapped to the extension /adt/ MyServlet. It is reachable in eclipse when I run it through google's run as web app. It does not work when I make it a web app and run it through glass fish. The servlet exists at http://localhost:8080/ADTR/adt/fileUpload. I can reach it via inpuing this URL in tha address bar. However the system when it attempts to reach out via FormPanel to action /adt/MyServlet goes to someplace else, apprently localhost: 8080/adt/fileUpload. I was able to hack this by setting the FormPanel action to /ADTR/adt/ MyServlet but now it doesn't work in eclipse. I can't have 2 different versions of the software running or my bugs will go through the roof. Can anyone suggest a way to fix this so the same links work on both boxes? That's why I tried to make them relative to begin with. Thanks in advance On Jan 22, 12:36 pm, DaveC david.andrew.chap...@googlemail.com wrote: Note the first forward slash in your image url - this points to the root of your server and not /appname/... Cheers, Dave On Jan 22, 4:41 pm, darkling darkling...@aol.com wrote: I'm trying to add icons to my application. Everything worked fine when I ran in the google browser but now that I've published the system to my dev server (its Sun Application server 9.1) the icons are all missing. I'm also noticing that any servlets I try to access via HTTP (FormPanels) rather than RPC also come up as 404s. My RPC servlets work fine. The icons I'm trying to access are the grid icons from EXT-GWT which always worked fine up until now. I packaged up my war and dropped it into the autodeploy in Glassfish just as I always would but now the links aren't working. Am I doing something wrong for GWT? My war structure is /images /appName (with all the GWT JS files) appName.html gxt-grey.css gxt-all.css I'm trying to access .x-grid3-dirty-cell { background-image:url(/images/default/grid/dirty.gif); } which isn't working. When I try to input the URL http://localhost:8080/appName/images/default/grid/dirty.gif The icon appears. Can anyone tell me what I'm doing wrong? Thanks- Hide quoted text - - Show quoted text - -- 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-tool...@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: My icons are missing
Not to ask a dumb question but why does it work when I run it through the GWT plugin and not when I move it to glassfish? I really want the same code to run in both places. My application is called ADT which is also the name of my google script folder. I have servlets mapped to the extension /adt/ MyServlet. It is reachable in eclipse when I run it through google's run as web app. It does not work when I make it a web app and run it through glass fish. The servlet exists at http://localhost:8080/ADTR/adt/fileUpload. I can reach it via inpuing this URL in tha address bar. However the system when it attempts to reach out via FormPanel to action /adt/MyServlet goes to someplace else, apprently localhost: 8080/adt/fileUpload. I was able to hack this by setting the FormPanel action to /ADTR/adt/ MyServlet but now it doesn't work in eclipse. I can't have 2 different versions of the software running or my bugs will go through the roof. Can anyone suggest a way to fix this so the same links work on both boxes? That's why I tried to make them relative to begin with. Thanks in advance On Jan 22, 12:36 pm, DaveC david.andrew.chap...@googlemail.com wrote: Note the first forward slash in your image url - this points to the root of your server and not /appname/... Cheers, Dave On Jan 22, 4:41 pm, darkling darkling...@aol.com wrote: I'm trying to add icons to my application. Everything worked fine when I ran in the google browser but now that I've published the system to my dev server (its Sun Application server 9.1) the icons are all missing. I'm also noticing that any servlets I try to access via HTTP (FormPanels) rather than RPC also come up as 404s. My RPC servlets work fine. The icons I'm trying to access are the grid icons from EXT-GWT which always worked fine up until now. I packaged up my war and dropped it into the autodeploy in Glassfish just as I always would but now the links aren't working. Am I doing something wrong for GWT? My war structure is /images /appName (with all the GWT JS files) appName.html gxt-grey.css gxt-all.css I'm trying to access .x-grid3-dirty-cell { background-image:url(/images/default/grid/dirty.gif); } which isn't working. When I try to input the URL http://localhost:8080/appName/images/default/grid/dirty.gif The icon appears. Can anyone tell me what I'm doing wrong? Thanks- Hide quoted text - - Show quoted text - -- 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-tool...@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.
Forms that send arrays of items
Is there an effective way of using GWT's FormPanel to post an array of values to a servlet? It's related to a file upload widget so I need to do this via a standard HTTP request rather than an RPC. The idea is that in addition to posting the file, the user can select several options as meta data. These options ideally take the form of 3 arrays containing 1 to N items each. I've so far been able to post to the servlet single selections for the 3 options using Hidden items which are attached to the formpanel. Is there a control or widget or whatever that allows me to send arrays? Thanks -- 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-tool...@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.
Forms with Arrays
Is there an effective way of using GWT's FormPanel to post an array of values to a servlet? It's related to a file upload widget so I need to do this via a standard HTTP request rather than an RPC. The idea is that in addition to posting the file, the user can select several options as meta data. These options ideally take the form of 3 arrays containing 1 to N items each. I've so far been able to post to the servlet single selections for the 3 options using Hidden items which are attached to the formpanel. Is there a control or widget or whatever that allows me to send arrays? Thanks -- 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-tool...@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.
What's a good graph/chart library
I'm looking to build charts for my current application. These charts aren't incredibly complex but they do have 2 Y axises and require me to do a mix of bar and line graphs on a single chart. Basically the left Y axis should represent the line graph while the right y axis should present the bar graph. CAn anyone recommend a good library or subsytem that will do this for GWT? Thanks -- 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-tool...@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: What's a good graph/chart library
I've examined quite a few but I was curious if any are gaining widespread acceptance for best at what I need. I've been experimenting with gchart but I'm finding it awkward to use in some cases. Any advice would be great Thanks On Jan 6, 10:03 am, Chris Ramsdale cramsd...@google.com wrote: There are several out there. You might want to check out: http://code.google.com/p/gwt-chronoscope/ On Wed, Jan 6, 2010 at 8:30 AM, darkling darkling...@aol.com wrote: I'm looking to build charts for my current application. These charts aren't incredibly complex but they do have 2 Y axises and require me to do a mix of bar and line graphs on a single chart. Basically the left Y axis should represent the line graph while the right y axis should present the bar graph. CAn anyone recommend a good library or subsytem that will do this for GWT? Thanks -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.- Hide quoted text - - Show quoted text - -- 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-tool...@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.
File Upload Problem
I've read several posts about this but everyon seems to be using different code and different methods. I've tried several but none seem to work. I must be missing some fundamental component. I try to upload a file but even though the request arrives on server side theres no file. The request is only 48 bytes and I can't figure out why. If anyone can tell me what I'm doing wrong I'd greatly appreciate it. Client side: FormPanel form = new FormPanel(); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.setMethod(FormPanel.METHOD_POST); form.setAction(/adt/fileUpload); form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler () { public void onSubmitComplete(SubmitCompleteEvent event) { // When the form submission is successfully completed, this event is // fired. Assuming the service returned a response of type text/html, // we can get the result text here (see the FormPanel documentation for // further explanation). errors.setHTML(event.getResults()); }}); file = new FileUpload(); file.setStylePrimaryName(FileUpload); form.add(file); this.add(form); Server Side: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletFileUpload upload = new ServletFileUpload(); System.out.println(Here); EnumerationStringenumer = request.getParameterNames(); while(enumer.hasMoreElements()) { String name = enumer.nextElement(); System.out.println(name + + request.getParameterValues (name)); } try{ FileItemIterator iter = upload.getItemIterator(request); System.out.println(Size + iter.hasNext()); while (iter.hasNext()) { FileItemStream item = iter.next(); String name = item.getFieldName(); InputStream stream = item.openStream(); // Process the input stream ByteArrayOutputStream out = new ByteArrayOutputStream (); int len; byte[] buffer = new byte[8192]; while ((len = stream.read(buffer, 0, buffer.length)) ! = -1) { out.write(buffer, 0, len); } int maxFileSize = 10*(1024*2); //10 megs max if (out.size() maxFileSize) { System.out.println(File is than + maxFileSize); return; } File f = new File(item.getName()); if(f.exists()) f.delete(); FileOutputStream fos = new FileOutputStream(f); byte[] bytes = out.toByteArray(); fos.write(bytes); StandardGridImport sgi = new StandardGridImport(); sgi.init(f.getPath()); ListGridBean beans = sgi.parseGrid(); ListCellFormatError errors = sgi.getErrors(); PrintWriter pw = response.getWriter(); for(int x = 0; x errors.size(); x++) pw.write(errors.get(x).toString()); pw.flush(); pw.close(); System.out.println(Done); } } catch(Exception e){ e.printStackTrace(); } } -- 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-tool...@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.
How can I write to file system from GWT servlet
I'm using GWT for my web app and Apache POI for a subsystem that involves reading and writing Excel docs. However when I try to build a servlet that uses FileOutputStream, Eclipse tells me that GWT won't allow me to use any file writing class. I just need to write out the Excel file I built to disk so I can pass it back to the client side. I want to write it out to disk so that it's properly formatted as an Excel file (I have severe misgivings about trying to pass it back to client side as an HSSFWorkbook which is the class Apache POI uses). Anyway can anyone give me an idea how to write to disk? Or do I need to use a Content Management System and write to that? What are the limits of the GWT sandbox's IO and is there anyway to stretch them? Maybe I can extend HttpServlet and get filesystem access through the normal servlet? Why does GWT forbid servlets to do file IO? Or am I just confused. Any help anyone can offer on doing file IO from a GWT servlet would be most appreciated. -- 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-tool...@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: How can I write to file system from GWT servlet
Thanks that seems to work well. Just one (probably stupid question) what does it mean to turn off he app engine? Does this effect the way the client side code would run? Thanks On Dec 21, 9:17 am, Nicanor Cristian nicanor.bab...@gmail.com wrote: GWT is a framework for clientside. There is no sandbox for server side. AFAIK the gwt-rpc servlet is an extension of HttpServlet. I don't see any difference between a normal servlet and the gwt-rpc one. Eclipse could tell you that because you enabled google application engine (GAE) and the latter doesn't support file writing. On 12/21/2009 02:36 PM, darkling wrote: I'm using GWT for my web app and Apache POI for a subsystem that involves reading and writing Excel docs. However when I try to build a servlet that uses FileOutputStream, Eclipse tells me that GWT won't allow me to use any file writing class. I just need to write out the Excel file I built to disk so I can pass it back to the client side. I want to write it out to disk so that it's properly formatted as an Excel file (I have severe misgivings about trying to pass it back to client side as an HSSFWorkbook which is the class Apache POI uses). Anyway can anyone give me an idea how to write to disk? Or do I need to use a Content Management System and write to that? What are the limits of the GWT sandbox's IO and is there anyway to stretch them? Maybe I can extend HttpServlet and get filesystem access through the normal servlet? Why does GWT forbid servlets to do file IO? Or am I just confused. Any help anyone can offer on doing file IO from a GWT servlet would be most appreciated. -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.- Hide quoted text - - Show quoted text - -- 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-tool...@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.
Can anyone help me add jars
I'm just learning GWT right now, I'm actually using smartGWT and building inside Eclipse using eclipse's GWT plugin. I'm trying to build a simple application where the smartGWT front end talks to a standard smartclient servlet backend. My problem is at run time all the jars I've tried to install into eclipse can't be found by the servlet engine. It crashes with messages like: Dec 12, 2009 4:25:38 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: failed BaseServlet java.lang.NoClassDefFoundError: com/isomorphic/servlet/IDACall at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass (IsolatedAppClassLoader.java:151) at java.lang.ClassLoader.loadClass(Unknown Source) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java: 233) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize (ServletHandler.java:612) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java:181) at com.google.appengine.tools.development.AbstractContainerService.startup (AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start (DevAppServerImpl.java:217) at com.google.appengine.tools.development.gwt.AppEngineLauncher.start (AppEngineLauncher.java:86) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:589) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) Eclipse does know where the jar is but for some reason the Jetty engine doesn't know where it is. Apparently it's not being package correctly. Can anyone tell me what I have to do to make sure the jars get exported? Do I need to make modules for these? I'm a little fuzzy on modules but I thought they were only used to exposed the jars to client side code. The GWT code doesn't need to know about these jars they are purely used by the servlets and the only connection is done via DSRequests through URLs. Can anyone help me figure out what I'm doing wrong? This is driving me nuts. -- 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-tool...@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.