Other Import Database issue

I'm trying to import Other database. I can do it from another product and all the java seems to be present and works fine in the other product. When I setup all the URL and Driver in wave maker it always tells me that can't find the driver. I tried this for a couple of other none supported databases and encountered the same problem. Works in other product but not in wavemaker. Do I have to modify the .Classpath file to point to the driver directory. They are in the classpath environment variable on the PC I use for development. I would really like to use the tool but I need to access the ianywhere database for the application.

The log for wavemaker says it can't find the driver, even though it is in the classpath variable on the pc.

Any suggestions.

thanks.

Hi,          Make

Hi,   

      Make sure that you have placed all the related jar files into the lib folder of the Project. (\ProjectName\webapproot\WEB-INF\lib)

Regards, Dharmang

Regards,
Dharmang

Yes that may be true

Hi,

Please try out the option suggested by Dharmang, if still the problem persists please share some more description -

1. Database you are trying to access

2. Generated logs - will be in the  <wavemakerprojects>/logs folder. wm.logs.

Thanks,

Rahul

 

Still can't find jodbc driver - cont'd

I tried the move of the jar files for Ianywhere version 10 into the ProjectName\webapproot\WEB-INF\lib, there is no lib just \class.

The log says:

2008-10-21 23:21:19,609 INFO [com.wavemaker.runtime.server.JSONRPCController] - (session 8F6114D932E57CC595268ED86DDCEDA5, thread 35)
2008-10-21 23:21:19,609 ERROR [com.wavemaker.runtime.server.JSONRPCController] - (session 8F6114D932E57CC595268ED86DDCEDA5, thread 35)
com.wavemaker.common.WMRuntimeException: ClassNotFoundException: com.sysbase.jdbc2.jdbc.SybDriver
at com.wavemaker.runtime.server.ServerUtils.invokeMethodWithEvents(ServerUtils.java:412)
at com.wavemaker.runtime.server.ControllerBase.reflectionInvoke(ControllerBase.java:219)
at com.wavemaker.runtime.server.JSONRPCController.executeRequest(JSONRPCController.java:182)
at com.wavemaker.runtime.server.ControllerBase.handleRequestInternal(ControllerBase.java:89)
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:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:76)
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:213)
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:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
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:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: com.sysbase.jdbc2.jdbc.SybDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:77)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:64)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:49)
at com.wavemaker.runtime.data.util.JDBCUtils.loadDriver(JDBCUtils.java:41)
at com.wavemaker.runtime.data.util.JDBCUtils.getConnection(JDBCUtils.java:47)
at com.wavemaker.tools.data.BaseDataModelSetup.testConnection(BaseDataModelSetup.java:958)
at com.wavemaker.tools.data.TestDBConnection.customRun(TestDBConnection.java:36)
at com.wavemaker.tools.data.BaseDataModelSetup.run(BaseDataModelSetup.java:424)
at com.wavemaker.studio.data.DataService.testConnection(DataService.java:255)
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.wavemaker.runtime.server.ServerUtils.invokeMethod(ServerUtils.java:345)
at com.wavemaker.runtime.server.ServerUtils.invokeMethodWithEvents(ServerUtils.java:389)
... 33 more
2008-10-21 23:21:28,390 INFO [com.wavemaker.runtime.server.JSONRPCController] - (session 8F6114D932E57CC595268ED86DDCEDA5, thread 35)
2008-10-21 23:21:28,390 ERROR [com.wavemaker.runtime.server.JSONRPCController] - (session 8F6114D932E57CC595268ED86DDCEDA5, thread 35)
com.wavemaker.common.WMRuntimeException: ClassNotFoundException: com.sysbase.jdbc2.jdbc.SybDriver
at com.wavemaker.runtime.server.ServerUtils.invokeMethodWithEvents(ServerUtils.java:412)
at com.wavemaker.runtime.server.ControllerBase.reflectionInvoke(ControllerBase.java:219)
at com.wavemaker.runtime.server.JSONRPCController.executeRequest(JSONRPCController.java:182)
at com.wavemaker.runtime.server.ControllerBase.handleRequestInternal(ControllerBase.java:89)
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:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:76)
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:213)
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:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
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:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: com.sysbase.jdbc2.jdbc.SybDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:77)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:64)
at com.wavemaker.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:49)
at com.wavemaker.runtime.data.util.JDBCUtils.loadDriver(JDBCUtils.java:41)
at com.wavemaker.runtime.data.util.JDBCUtils.getConnection(JDBCUtils.java:47)
at com.wavemaker.tools.data.BaseDataModelSetup.testConnection(BaseDataModelSetup.java:958)
at com.wavemaker.tools.data.TestDBConnection.customRun(TestDBConnection.java:36)
at com.wavemaker.tools.data.BaseDataModelSetup.run(BaseDataModelSetup.java:424)
at com.wavemaker.studio.data.DataService.testConnection(DataService.java:255)
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.wavemaker.runtime.server.ServerUtils.invokeMethod(ServerUtils.java:345)
at com.wavemaker.runtime.server.ServerUtils.invokeMethodWithEvents(ServerUtils.java:389)
... 33 more

I'm not sure what I'm missing. Thanks for your help.

FutureChalk

Please try using this driver name

Hi,

You are trying to connect to Sybase correct.

I searched on net and could not find any driver with name - com.sysbase.jdbc2.jdbc.SybDriver

Can you try using the driver name - com.sybase.jdbc2.jdbc.SybDriver and also let me know which jar you are using.

Thanks,

Rahul

Other Database Connection -

Tried that driver name still can't find it. I'm using the jconn2.jar and jodbc.jar which I put into

project ...\webapproot\WEB-INF\ there is not lib directory. Wavemaker thinks about it before giving me the error it can't find driver. I believe it is just a problem of putting the jar files in the place wavemaker is looing for them.The doc says the application server classpath.

It almost works but fails on the driver.

thanks.

FutureChalk

Did you try putting it in

Hi,

If you are on windows - Try putting the same in

<Your WaveMaker project Directory>\Projects\<ProjectName>\webapproot\WEB-INF\lib

foler. There will be already lot of jar files in it. Copy your jars too in the same folder. Hope this will resolve the issue.

Thanks,

Rahul

I've gotten it to work and

I've gotten it to work and for other databases you must put the appropriate jar files into the following directory.

C:\Program Files\WaveMaker\studio\WEB-INF\lib

I was using Sql Anywhere and the two jar files you need are jconn2.jar and jodbc.jar.

Once I put the files in this direcrory I was able to connect.

Thanks to those who responded to the query I was able to determine where to put the files.

FutureChalk

small's picture

Glad you got that to

Glad you got that to work.

Copying the jar into WaveMaker\studio\WEB-INF\lib makes the jars available to the studio. This should allow the studio to do a "test connection", but may not allow your application to connect when you do a testrun or when you deploy your application remotely.

To enable testrun or a deploy, copy the required jars to \Projects\\lib. That should make the jars available to your project.

The path that Rahul recommended above (\Projects\\webapproot\WEB-INF\lib) gets removed when we do a clean. So I wouldn't recommend it.

-matt

Test OK, but import fails.

've copied the jars, etc., and the test apparently is OK. But, when I try to import the database I get the following error:

"Import failed: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database. See wm.log for compiler output"

Here is what I have for the first two tabs:
Database System Other
Host
Username
Password
Database

Service Name
Connection URL jdbc:sybase:Tds::/
Java Package com.
Table Filter .*
Schema Filter .*
Driver Class com.sybase.jdbc4.jdbc.SybDriver
Dialect org.hibernate.dialect.SybaseAnywhereDialect
Naming Strategy (empty)

If anyone has a suggestion about how I can get around this without making a change on the Sybase side, I would greatly appreciate it!