MySQL query

Hey All,

I am trying to query a MySQL DB with OO but there doesnt appear to be a MySQL option in the DB content pack.

Can anybody please advise how I can do this?

Thanks

  • Hi,

    In OO Base CP we have generic JDBC . If you do a right click on the JDBC folder you'll find instructions how to integrate with MySQL. 

    HTH,

    Lucian

  • Verified Answer

    Hey Lucian,


    Thank you for your response.


    I followed the instructions and believe I followed them correctly or obviously not


    I downloaded the jdbc connector

    mysql-connector-java-5.1.47.jar

     

    and put it in


    Program Files\Hewlett Packard Enterprise\HPE Operations Orchestration\studio\lib\ext\com.hp.oo_oo-sql-legacy-plugin


    When I try to run the SQL query I get

    exception=java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.iconclude.content.actions.sql.services.databases.MySqlDatabase.setUp(MySqlDatabase.java:21)
    at com.iconclude.content.actions.sql.services.ConnectionService.setUpConnection(ConnectionService.java:81)
    at com.iconclude.content.actions.sql.services.SQLQueryService.executeSqlQuery(SQLQueryService.java:26)
    at com.iconclude.content.actions.sql.SQLQuery.execute(SQLQuery.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.hp.oo.sdk.plugins.abstracts.BaseActionPlugin.execute(BaseActionPlugin.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.hp.oo.maven.PluginAdapterImpl.executePlugin(PluginAdapterImpl.java:344)
    at com.hp.oo.maven.PluginAdapterImpl.execute(PluginAdapterImpl.java:257)
    at com.hp.oo.execution.control.actions.contentexecution.ContentExecutionActions.executeContentAction(ContentExecutionActions.java:105)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at io.cloudslang.worker.execution.reflection.ReflectionAdapterImpl.executeControlAction(ReflectionAdapterImpl.java:91)
    at io.cloudslang.worker.execution.services.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:331)
    at io.cloudslang.worker.execution.services.ExecutionServiceImpl.execute(ExecutionServiceImpl.java:85)
    at io.cloudslang.worker.management.services.SimpleExecutionRunnable.executeRegularStep(SimpleExecutionRunnable.java:173)
    at io.cloudslang.worker.management.services.SimpleExecutionRunnable.run(SimpleExecutionRunnable.java:126)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.cloudslang.worker.management.services.WorkerThreadFactory$1.run(WorkerThreadFactory.java:39)
    at java.lang.Thread.run(Thread.java:748)
    ;returnCode=-1;rowsLeft=0;returnResult=com.mysql.jdbc.Driver;sessionId=;Result=com.mysql.jdbc.Driver;}

  • Hi,

    I assume you are running the flow from Studio. After adding the jdbc jar under <STUDIO_HOME>\lib\ext\com.hp.oo_oo-sql-legacy-plugin did you restart Studio?

    If yes and the flows still din't work my suggestion is for you to open a support case.

    Thanks,

    Lucian

  • Hi Lucian,

    Thank you so much I was able to solve the problem.

    The problem was I was a moron.

    I unzipped the gz but not the tar (Hangs head in shame0