Wavemaker and EnterpriseDB

I can't seem to get Wavemaker working with EnterpriseDB.  I moved over the jdbc driver.  I create a connection and it tests fine.  I'm using the PostgreSQLDialect.  When I hit import, it fails with the error listed below.  Any clues?

 UPDATE:  Looks like it doesn't like a table, V$VERSION.  This is a show stopper for EnterpriseDB.

compile:
    [javac] Compiling 141 source files to C:\Program Files (x86)\WaveMaker\Tomcat\temp\fileUtils_createTempDirectory45333.tmp\WEB-INF\classes
    [javac] C:\Users\lewis\Documents\WaveMaker\Projects\Project\services\edb\src\com\edb\data\V.version.java:9: '{' expected
    [javac] public class V.version  implements java.io.Serializable {
    [javac]               ^
    [javac] C:\Users\lewis\Documents\WaveMaker\Projects\Project\services\edb\src\com\edb\data\V.version.java:33: '}' expected
    [javac] ^
    [javac] 2 errors
2008-05-05 15:49:01,424 ERROR [com.activegrid.runtime.server.JSONRPCController] - <Compile failed; see the compiler error output for details.> (session 0400FFA3FF19C55B93C99B55E88C5B15, thread 40)
Compile failed; see the compiler error output for details.
    at com.activegrid.tools.project.DeploymentManager.antExecute(DeploymentManager.java:236)
    at com.activegrid.tools.project.DeploymentManager.antExecute(DeploymentManager.java:193)

2008-05-05 15:46:37,158 ERROR [com.activegrid.runtime.server.JSONRPCController] - <Compile failed; see the compiler error output for details.> (session 0400FFA3FF19C55B93C99B55E88C5B15, thread 40)
Compile failed; see the compiler error output for details.
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:999)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:820)
    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:585)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at com.activegrid.tools.util.AntUtils.javac(AntUtils.java:80)
    at com.activegrid.tools.util.AntUtils.javac(AntUtils.java:59)
    at com.activegrid.tools.data.ImportDB.compile(ImportDB.java:389)
    at com.activegrid.tools.data.ImportDB.generateBaseConfigFiles(ImportDB.java:369)
    at com.activegrid.tools.data.ImportDB.customRun(ImportDB.java:303)
    at com.activegrid.tools.data.BaseDataModelSetup.run(BaseDataModelSetup.java:304)
    at com.activegrid.studio.data.DataModelManager.importDatabase(DataModelManager.java:727)
    at com.activegrid.studio.data.DataModelManager.importDatabase(DataModelManager.java:115)
    at com.activegrid.studio.data.DataService.importDatabase(DataService.java:198)
    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:585)
    at com.activegrid.runtime.server.ServerUtils.invokeMethod(ServerUtils.java:252)
    at com.activegrid.runtime.server.ControllerBase.reflectionInvoke(ControllerBase.java:160)
    at com.activegrid.runtime.server.JSONRPCController.executeRequest(JSONRPCController.java:184)
    at com.activegrid.runtime.server.ControllerBase.handleRequestInternal(ControllerBase.java:85)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:857)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:475)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:440)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:143)
    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
edc's picture

Dollar in Table causes import to fail

Hi Lewis,

Welcome to the WM Dev community.

The defect here is, as you noted, the dollar in the table name. It's not specific to EnterpriseDB, it's due to how WM generates hibernate JAVA classes for each table. Dollar is one case we missed. A defect has been filed.

Fortunately the Reverse Eng strategy is available to us and provides an easy workaround for this.

The attached java file (remove .txt extension) implements a quick workaround naming strategy class.

The attached .zip file is really a .jar file (change .zip to .jar) of that class.

-Rename to .jar (do not unzip)

-Add to classpath

    \WaveMaker\studio\WEB-INF\lib is an easy place to add the jar file to your studio classpath

-Redeploy the studio project. Restarting the "wavemaker server" tomcat is just as easy.

Import your data model using it in the advance options: as in example:

 

 

If you want to build the attached java file yourself, you'll want:

hibernate3.jar;

hibernate-tools.jar;

and

studio\WEB-INF\classes on your classpath.

 

Thanks for the report.

Awesome

Thanks for the update.  I will try it first thing in the morning.

LewisC

 

Same Error

I copied the jar file in (as .jar) and restarted tomcat.  I added the naming strategy as shown (dev.wavemaker.MyRevEngNamingStrategy).  I am still gettng the same error with the table with the $.  I wasn't sure if it was really picking up the new jar so I added some letters to it (aaaMyRevEngNamingStrategy) and it gave me the error tha it couldn't find the class so I know it is picking up the new jar.

Any ideas?

LewisC

 

 

It's working

I was using something else for the java package.  I changed it to com.test and now it's working. 

Thanks,

LewisC

 

edc's picture

Excellent and com.test

Very glad to hear you've got it working. I don't understand why you needed to use com.test as your java package, to be clear, you should not need to, at least not as a direct result of rev eng strategy class. If you find otherwise, do let us know.

A reverse eng strategy can be used for  almost any mapping from table to java class customization one wants. The one in this thread simply removes the dollar sign. The com.activegrid classes it inherits from are in the java section of the sources.

com.test

Interesting.  It definitely did not work until I added the com.test.  I will change it back to what I had and try again.

LewisC

 

edc's picture

Data Model Package Name

Ah, was the package otherwise empty ?

You will need a package name. It need not be com.test, but you will need something there. com.test came about because I called my Data Model Name 'test' before going to the advanced options. Thus, when I showed the advanced options, com.test was already there.

The advanced options are always set. Using 'settings' (not advanced settings) just lets them default to the defaults. Using advanced options lets us override the defaults.

HTH (hope that helps).

 

com.test

Yeah, I figured the com.test was not required.  I had com.edb in my original test.  It did not work but when I added com.test it did.  However, I just imported again and it is working with com.edb.  I'm not sure what happened before.

It's all working fine now though.

Thanks for your assistance.

I'll be blogging about my experiences over the next few days and weeks.

LewisC