No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Batch DataSource Generator Problem

    Iím having trouble with the Batch DataSource Generator. Iím trying to generate a DataSource from a Java Bean Class. According to the instructions Iím just supposed to enter the fully qualified class name in the ďList of class namesĒ text box. I do that and I get the following error:

    Transport error - HTTP code: 404 for URL:
    Iíve attached the server log and the result text from the developer console.

    Just a note, I used the visual builder to generate the DataSource successfully providing the same fully qualified class name. However, Iím evaluating the EE version and I want to see this work. Not sure what I'm doing wrong


    SmartGWT version:
    v8.2p_2012-05-11/EVAL Development Only
    Attached Files

    This generally means your <inherits> are wrong in .gwt.xml, you are missing <inherits name=""/> or you have not rerun a GWT Compile since adding this inherit.


      I did a GWT compile and tried again. There was no difference.

      Below is the contents of the .gwt.xml.

      <?xml version="1.0" encoding="UTF-8"?>
      <module rename-to='extree'>
        <inherits name=''/>
        <inherits name=""/>
        <inherits name="com.smartgwtee.SmartGwtEE"/>
        <inherits name=""/>
        <!-- Specify the app entry point class.                         -->
        <entry-point class='com.gdc4s.ctia.extree.client.ExTree'/>


        That doesn't make a lot of sense - you should verify that in your smartgwtee.jar you have com/smartclientee/tools/public/tools/batchDSGenerator.jsp - if so, then you can clearly see from the chain of <inherits> that this file should have been copied to the war/ area when you ran a GWT compile.


          I checked and it's there.

          I attached the image that shows what I entered and the response at the top left.
          Attached Files


            Wait, how are you running the tool? If you're seeing that UI, you should already be at the URL for which you are showing a 404.


              Also, please show the server-side logs that happen when you hit the OK button.


                Attached is a picture showing that I am at the correct URL and yet I'm getting the 404.

                I also attached the server log.
                Attached Files


                  It generates the 404 when I add the fully qualified name of the Java Bean class to the "List of class names" text box.

                  If I don't populate it and just hit the ok button without having populated any fields then it says "DataSource Generator Messages:" with a blank area.

                  I don't have a database, I'm only looking to generate a DataSource from the beans.


                    Again, how are you running the tool? We would expect that, when you see the UI from your screenshot, you are already at the URL So how can you then get a 404 for that URL? If you aren't already at that URL, what URL are you at?


                      After taking a closer look, there are actually two JSPs for the Batch DataSource Generator.


                      The first one is the one that brings up the dialog shown in the attachment called dsGenerator.gif.

                      The 404 occurs after I populate the class name and hit the "ok" button. The 404 is on the "batchDSGenerator.jsp".

                      After noticing this, I just to open just the batchDSGenerator.jsp and I get the screen that is attached and called batchDSGenerator.jsp.

                      I also attached the output from the results tab.
                      Attached Files


                        I dove into the JSP and called the batchDSGenerator.jsp with the URL parameter of my class and I get a little more expressive error:

                        HTTP ERROR: 404
                        ...\extree\war\WEB-INF\classes\hibernate.cfg.xml (The system cannot find the file specified)
                        From the following comment in the JSP, it looks like it's actually failing to fallback to the Java Bean because it can't find the hibernate config file.

                        It can also generate DataSource definitions directly from Hibernate mapped entities or POJOs
                        that follow Javabean naming semantics (ie, property foo is accessed with getFoo() and setFoo()).
                        In this case, provide any number of "className" parameters - these will be interpreted as 
                        Hibernate entity names first, then as fully-qualified Java class names if they are not found
                        as Hibernate mapped entities.  Example usage:
                        I'm not trying to use hibernate, I'm just trying to do a POJO bean.



                          We're not sure yet how you're in this state (we don't see a 404 or similar problem in the SDK after following a normal install).

                          However, one quick sanity check - do you have a need to generate dozens of DataSources at once, where you need to customize the generation process to take advantage of custom Java annotations or similar additional metadata?

                          If this isn't your use case, don't use the Batch DataSource Generator, just use the approaches from the QuickStart to declare DataSources with autoDeriveSchema.


                            Actually, itís pretty easy to reproduce.

                            1. Download and unzip latest build (see version below)
                            2. cd into the samples/builtinds directory
                            3. ant
                            4. ant hosted
                            5. goto URL:

                            and you should get the following error:

                            HTTP ERROR: 404
                            C:\smartgwtee-3.0p\samples\built-in-ds\war\WEB-INF\classes\hibernate.cfg.xml (The system cannot find the file specified)

                            SmartGWT version from Dev Console:
                            SmartClient Version: v8.2p_2012-06-01/EVAL Deployment

                            From the documentation, I should be able to do this, right? I don't want to use hibernate, I just want to generate a ds.xml for a given bean class.


                              That sample project doesn't have Hibernate configured or a foo.Bar bean, so this would be expected to error out even though that might not be the clearest error message. Try it in the hibernate sample project to see it working.