8 Replies Latest reply on Jun 9, 2009 9:03 AM by Steven Hawkins

    ClassNotFoundException: com.metamatrix.data.api.Connector

    Juan Ignacio Sánchez Lara Apprentice

      Hi,

      I'm trying to deploy a vdb embedded at JBoss 4.2.3.GA (JDK 1.6). I've followed the instructions at https://www.jboss.org/community/wiki/DeployingTeiid601EmbeddedinJBossAS , but when the server tries to start it will throw the following exception.

      Caused by: com.metamatrix.common.application.exception.ApplicationLifecycleException: Could not find Connector class org.teiid.connector.jdbc.JDBCConnector
       at org.teiid.dqp.internal.datamgr.impl.ConnectorManager.initStartConnector(ConnectorManager.java:410)
       ... 209 more
      Caused by: java.lang.ClassNotFoundException: com.metamatrix.data.api.Connector
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at org.teiid.dqp.internal.datamgr.impl.ConnectorManager.initStartConnector(ConnectorManager.java:406)


      I'm using 6.1.0.M3 with Hibernate Teiid dialect. My vdb uses two different connectors, Oracle and Excel. It do works at designer.

      Thanks in advance,

        • 1. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
          Steven Hawkins Master

          The simplest fix would be to recreate the connector binding under the new Designer milestone.

          This looks like the same problem experienced by http://www.jboss.org/index.html?module=bb&op=viewtopic&t=152908&start=10.

          • 2. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
            Juan Ignacio Sánchez Lara Apprentice

            I've updated to 6.1 designer and it won't change. I've deleted the connectors, created again and rebind them at the vdb.

            It seems there's also some problems at the environment. When I boot Eclipse (I've already used -clean), 'Problems' view displays several:

            An exception occurred during console notification
            org.eclipse.swt.SWTException: Device is disposed
            at org.eclipse.swt.SWT.error(SWT.java:3777)
            


            Problems occurred when invoking code from plug-in: "org.eclipse.ui.console".
            org.eclipse.swt.SWTException: Device is disposed
            


            starting workspace execution with url = "jdbc:metamatrix:admin@mmrofile:C:/workspaceTeiid/.metadata/.plugins/org.teiid.designer.dqp/workspace.properties;version=1;XMLFormat=Tree;sqlOptions=SHOWPLAN;EmbeddedContext=Designer;
            An exception stack trace is not available.
            


            com.metamatrix.admin.api.exception.AdminComponentException: Could not find Connector class org.teiid.connector.jdbc.JDBCConnector
            at com.metamatrix.dqp.embedded.admin.BaseAdmin.accumulateSystemException(BaseAdmin.java:107)
            at com.metamatrix.dqp.embedded.admin.DQPRuntimeStateAdminImpl.startConnectorBinding(DQPRuntimeStateAdminImpl.java:116)
            


            If I try to display data of an existing table(model view, 'preview data' button) it will throw the following:

            Unexpected exception for request 0.0
            [ComponentNotFoundException]Connector Binding "myconnectorbinding" failed to start, or did not start correctly. Please check the connector binding properties. Check the log file for more information.
             at com.metamatrix.dqp.embedded.services.EmbeddedDataService.selectConnector(EmbeddedDataService.java:117)
            


            com.metamatrix.jdbc.MMSQLException: Connector Binding "myconnectorbinding" failed to start, or did not start correctly. Please check the connector binding properties. Check the log file for more information.
             at com.metamatrix.jdbc.MMSQLException.create(MMSQLException.java:82)
            



            This is my session data:
            eclipse.buildId=M20090211-1700
            java.version=1.6.0_13
            java.vendor=Sun Microsystems Inc.
            BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
            Framework arguments: -showlocation 512M
            Command-line arguments: -os win32 -ws win32 -arch x86 -showlocation 512M -clean
            




            • 4. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
              Juan Ignacio Sánchez Lara Apprentice

              It seems that the boot messages aren't important, since the metamatrix one is information, not error. Nevertheless, I can't figure ComponentNotFoundException cause...

              • 5. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
                Juan Ignacio Sánchez Lara Apprentice

                I've unpacked a clean Eclipse with only Teiid Designer (6.1.0) and created a new model project. The problem is the same.

                Console trace:

                ...
                09:49:55,765 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                09:49:55,765 INFO [DatasourceConnectionProvider] Using datasource: java:/myDatasource
                09:49:58,750 INFO [SettingsFactory] RDBMS: Teiid Embedded, version: 6.1
                09:49:58,750 INFO [SettingsFactory] JDBC driver: Teiid Embedded JDBC Driver, version: 6.1
                09:49:58,750 INFO [SessionFactoryImpl] closing
                


                teiid log:
                ...
                Caused by: com.metamatrix.common.application.exception.ApplicationLifecycleException: Could not find Connector class org.teiid.connector.jdbc.JDBCConnector
                 at org.teiid.dqp.internal.datamgr.impl.ConnectorManager.initStartConnector(ConnectorManager.java:410)
                 ... 209 more
                Caused by: java.lang.ClassNotFoundException: com.metamatrix.data.api.Connector
                 at java.net.URLClassLoader$1.run(Unknown Source)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.net.URLClassLoader.findClass(Unknown Source)
                 at java.lang.ClassLoader.loadClass(Unknown Source)
                 at java.lang.ClassLoader.loadClass(Unknown Source)
                 at org.teiid.dqp.internal.datamgr.impl.ConnectorManager.initStartConnector(ConnectorManager.java:406)
                 ... 209 more
                


                • 6. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
                  Steven Hawkins Master

                  Does everything work in designer 6.1.0 with the recreated bindings, but then fails with embedded?

                  What deployment profile are you using for embedded? It looks like you may have an old version of the connector api jar in your classpath, which could cause the exception.

                  http://www.jboss.org/community/wiki/TeiidEmbeddedDeploymentProfiles
                  and
                  https://www.jboss.org/community/wiki/DeployingTeiidEmbeddedinJBossAS

                  have been updated to better reflect 6.1 deployments.

                  • 7. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
                    Juan Ignacio Sánchez Lara Apprentice

                    Something freakin' strange must have been happening at my classloading. I've just followed that guide one more time and I even had this error:

                    Caused by: java.lang.ClassNotFoundException: com.metamatrix.jdbc.EmbeddedDataSource
                    

                    After double checking everything I created a new jboss server install and errors were gone.

                    After all it seems it was a wrong mixing of wrong JDK (it needs JDK 6), wrong server (4.2.3 "normal" won't work with JDK 6, needs a different donwload) and some other mistakes...

                    Thank you very much for your support, I'll keep trying Teiid :)

                    • 8. Re: ClassNotFoundException: com.metamatrix.data.api.Connecto
                      Steven Hawkins Master

                      No problem, thanks for trying us out. Even though this is the 6 release series there's a lot that has changed since we were closed source. In response to this thread I worked TEIID-646, which should make the error you were seeing clearer.