Announcement

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

    Error using DataSource with schemaBean in Pro-Version

    Hi,

    using SmartGWT Pro 2.4 I am getting the following error multiple times when starting my sever:

    Code:
    The Batch DataSource Generator feature is only available with the Enterprise license
    I am not calling the "Batch DataSource Generator" explicitly, as far as I know. I am also not using any tools at all. All I want to do is using the schemaBean attribute withing my datasource-definitions. Do I need an Enterprise license to do so? I did not get this from the documentation...


    Thank your very much for your help,

    Jens
    Last edited by jstegemann; 26 Jan 2011, 07:40.

    #2
    No, you don't. The most likely explanation is that you are still using .jars from an older version. If not, try to isolate what server-side calls or configuration files you have that are causing these warnings.

    Comment


      #3
      Hi,

      when trying to run my own sample application (based on the samples for JPA, DMI and custom datasources) the same error occurred.

      I am also using SmartGWT Pro 2.4

      The exception was thrown, when the application was started in development mode and when the DSRequest.execute() method is called.

      This is my datasource definition:
      Code:
      <DataSource 
          ID="custom" 
          serverConstructor="com.isomorphic.jpa.JPADataSource"
          schemaBean="com.smartgwt.sample.server.Contact">
          <field name="id" type="sequence" hidden="true" primaryKey="true" />
          <field name="name" type="text" title="Name" required="true"   />
          <serverObject className="com.smartgwt.sample.server.DMIHandler" methodName="doIt"/>
      </DataSource>
      This is my DMIHandler class:
      Code:
      public class DMIHandler {
          
          public DMIHandler() {
              System.out.println("Starting DMIHandler");
          }
          
          public DSResponse doIt(DSRequest dsRequest) throws Exception {
              System.out.println("DOING IT!!!");
              return dsRequest.execute();
          }
      }
      The stack trace is not showing any particular code I have written, just:

      java.lang.Exception: The Batch DataSource Generator feature is only available with the Enterprise license. See http://smartclient.com/licensing for details
      at com.isomorphic.tools.DataSourceTools.getDataSourceConfigFromJavaClass(DataSourceTools.java:125)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at com.isomorphic.base.Reflection.invokeStaticMethod(Reflection.java:671)
      at com.isomorphic.base.Reflection.invokeStaticMethod(Reflection.java:607)
      at com.isomorphic.datasource.BasicDataSource.createAutoDeriveDS(BasicDataSource.java:277)
      at com.isomorphic.datasource.BasicDataSource.init(BasicDataSource.java:208)
      at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:165)
      at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:337)
      at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
      at com.isomorphic.datasource.DataSource.forName(DataSource.java:156)
      at com.isomorphic.datasource.DataSource.forName(DataSource.java:148)
      at com.isomorphic.datasource.DataSource.forName(DataSource.java:143)
      at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:95)
      at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:102)
      at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:82)
      at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:62)
      at com.isomorphic.rpc.RPCManager.setEnumProperties(RPCManager.java:1474)
      at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1098)
      at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
      at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:130)
      at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:95)
      at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      ...
      and a lot more from Jetty

      Thanks and best regards

      Comment


        #4
        I'm having the same problem. Were you ever able to fix it?

        Comment


          #5
          The previous poster (jkugelberg) has a flawed DataSource definition (no <fields> around the <field> element) and a very strange stack trace - almost as if the DMI logic introduced a second DataSource *after* the schemaBean attribute and JPA DataSource had already completed successfully.

          dirkg:

          1. is your stack trace the same?
          2. if so, can you see anything in your logic that might introduce a second DataSource - what if you remove all DMI logic?
          3. does downloading the latest nightly from smartclient.com/builds fix the problem for you?

          Comment


            #6
            This is my stack trace (it's pretty much the same as jkugelberg's):
            Code:
            === 2011-04-06 16:08:38,039 [l0-2] WARN  BasicDataSource - Exception trying to invoke DataSourceTools method
            java.lang.Exception: The Batch DataSource Generator feature is only available with the Enterprise license.  See http://smartclient.com/licensing for details
            	at com.isomorphic.tools.DataSourceTools.getDataSourceConfigFromJavaClass(DataSourceTools.java:125)
            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            	at java.lang.reflect.Method.invoke(Method.java:597)
            	at com.isomorphic.base.Reflection.invokeStaticMethod(Reflection.java:671)
            	at com.isomorphic.base.Reflection.invokeStaticMethod(Reflection.java:607)
            	at com.isomorphic.datasource.BasicDataSource.createAutoDeriveDS(BasicDataSource.java:277)
            	at com.isomorphic.datasource.BasicDataSource.init(BasicDataSource.java:208)
            	at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:165)
            	at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:337)
            	at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110)
            	at com.isomorphic.datasource.DataSource.forName(DataSource.java:156)
            	at com.isomorphic.datasource.DataSource.forName(DataSource.java:148)
            	at com.isomorphic.datasource.DataSource.forName(DataSource.java:143)
            	at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:95)
            	at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:102)
            	at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:82)
            	at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:62)
            	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:81)
            	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:64)
            	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
            	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
            	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
            	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
            	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
            	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
            	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
            	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
            	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            	at org.mortbay.jetty.Server.handle(Server.java:324)
            	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
            	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
            	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
            	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
            	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
            	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
            	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
            This is my DataSourceDefitinion (with some names replaced to make the legal department happy). I'm not using DMI, I'm using a custom DataSource. GizmoDataSource derives from BasicDataSource.
            Code:
            <DataSource
                ID="gizmos"
                serverConstructor="com.foo.server.GizmoDataSource"
                schemaBean="com.foo.client.Gizmo">
                <fields>
                    <field name="categoryId" type="integer" required="true" hidden="true"/>
                    <field name="key" type="text" required="true" hidden="true" primaryKey="true"/>
                </fields>
            </DataSource>
            This is my Gizmo class:
            Code:
            public class Gizmo implements Serializable {
            	private static final long serialVersionUID = -7654454066860882427L;
            
            	// Can't make these final because then they won't serialize.
            	private String m_displayString;
            	private long m_categoryId;
            	private Double m_score;
            	private MyEnum m_myEnum;
            	private boolean m_available;
            
            	public Phrase() {
            	}
            
            	public Phrase(
            			final String displayString,
            			final long categoryId,
            			final Double score,
            			final MyEnum myEnum,
            			final boolean available
            	) {
            		m_displayString = displayString;
            		m_categoryId = categoryId;
            		m_score = score;
            		m_myEnum = myEnum;
            		m_available = available
            	}
            
            	public String getDisplayString() {
            		return m_displayString;
            	}
            
            	public long getCategoryId() {
            		return m_categoryId;
            	}
            
            	public Double getScore() {
            		return m_score;
            	}
            
            	public MyEnum getEnum() {
            		return m_myEnum;
            	}
            
            	public boolean getAvailable() {
            		return m_available;
            	}
            
            	public String getKey() {
            		/* key is assembled from other parts of the class */
            	}
            }
            I will try the nightly right now.

            Comment


              #7
              I tried the nightly, I get the same problem.

              Comment


                #8
                There was indeed a problem here. We've fixed it, the fix will be present in nightly builds as of tomorrow.

                Comment


                  #9
                  Thank you so much! I'll try it out as soon as possible.

                  Comment


                    #10
                    Thanks for the feedback.
                    Now there is just one question left: Will there be a regular update containing the fix (not only a nightly build)? If yes, when will it be available?

                    Comment


                      #11
                      I just verified the fix. Fantastic! Thank you! Like jkugelberg, I can't wait for the final version 2.5 to come out.

                      Comment

                      Working...
                      X