1 2 Previous Next 20 Replies Latest reply: May 28, 2009 5:55 AM by 807581 Go to original post RSS
      • 15. Re: Help Regarding ECBO Api
        807581
        Hi...
        can you please tell me the changes i need to do in musicdb example, so that the connector can access a similar musicdb database i created in SQL server.
        • 16. Re: Help Regarding ECBO Api
          807581
          i have created a maven project, and now i am trying to build the existing musicdb example .
          it creates a project named as ds-jcr-musicdb(jar).
          now when i try to build the project it gives me the below error

          [compiler:testCompile]
          Nothing to compile - all classes are up to date
          [#test]
          [surefire:test]
          Surefire report directory: C:\MEP\sgmp-client-1_1_01-fcs-b02\sgmp-client-1_1_01-fcs-b02\samples\secure-musicdb\src\connector\ecbo\ds-jcr-musicdb-3.1.39-project\ds-jcr-musicdb-3.1.39\target\surefire-reports
          -------------------------------------------------------
          T E S T S
          -------------------------------------------------------
          Running com.sun.mep.connector.jcr.DbRepositoryTest
          DbRepository loaded by sun.misc.Launcher$AppClassLoader@11b86e7
          Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.547 sec <<< FAILURE!
          Running com.sun.mep.connector.jdbc.album.MusicAlbumTest
          WARNING: Unable to connect to Postgres database while running unit test - skipping
          WARNING: Unable to connect to Postgres database while running unit test - skipping
          Results :
          Tests in error:
          testDbRepositoryLogin(com.sun.mep.connector.jcr.DbRepositoryTest)
          testGetNodes(com.sun.mep.connector.jcr.DbRepositoryTest)
          [ERROR]Mojo:
          [ERROR] org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
          [ERROR]FAILED for project:
          [ERROR] com.synchronica.mep:ds-jcr-musicdb:jar:3.1.39
          [ERROR]Reason:
          [ERROR]There are test failures.
          [ERROR]Please refer to C:\MEP\sgmp-client-1_1_01-fcs-b02\sgmp-client-1_1_01-fcs-b02\samples\secure-musicdb\src\connector\ecbo\ds-jcr-musicdb-3.1.39-project\ds-jcr-musicdb-3.1.39\target\surefire-reports for the individual test results.
          ------------------------------------------------------------------------
          For more information, run with the -e flag
          ------------------------------------------------------------------------
          BUILD FAILED
          ------------------------------------------------------------------------
          Total time: 1 minute 48 seconds
          Finished at: Fri May 29 16:41:44 IST 2009
          Final Memory: 98M/175M
          ------------------------------------------------------------------------

          Please help.
          • 17. Re: Help Regarding ECBO Api
            807581
            Jayanth,

            To build the sample, you should use NB's Open Project option and select

            sgmp-client-1_1_01-fcs-b02\samples\secure-musicdb\src\connector\ecbo\ds-jcr-musicdb-3.1.39

            If that is what you did, then the problem may be the same as before -- being behind a firewall. Open Source software developement is very network-centric.

            If your company is interested in SGMP there should be a way to remove such obstacles. You might want to contact Vella Rama (vella.raman@sun.com) -- the Manager responsible for SGMP -- to discuss your interest in SGMP.
            • 18. Re: Help Regarding ECBO Api
              807581
              Hi tomamiro,

              I have build the project and I Am able to connect to MYSQL, every thing is fine with MYSQL . Now I want to connect to MS SQL Server so what are the necessary changes has to be made. I have tried connecting to MS SQL Server , I have created JDBC Connection pool and Resource and also for Connectors I have a created Pool and Resource. More over I am developing project using JAX-RS , I have made following changes in ConnectionPool.java program

              in place of DB_USER_NAME = "musicdbuser" I have given my MS SQL Server username
              and DB_USER_PASS = "musicdbpass"; I have given my MS SQL server password .
              and I also made necessary changes for JNDI Name.

              More over I have doubt here musicdbuser and musicdbpass are the credentials to access database or server .What is the role and scope of the these credentials, how to use these and what changes has to be made for MS SQL Server

              For the above changes I made , following is the exception I got :

              type : Exception report

              message

              description: The server encountered an internal error () that prevented it from fulfilling this request.

              exception: javax.servlet.ServletException: com.sun.jersey.api.container.ContainerException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.mep.ws.vtms.util.ConnectionPool

              root cause: com.sun.jersey.api.container.ContainerException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.mep.ws.vtms.util.ConnectionPool

              root cause: java.lang.NoClassDefFoundError: Could not initialize class com.sun.mep.ws.vtms.util.ConnectionPool
              • 19. Re: Help Regarding ECBO Api
                807581
                Jayanth,

                Glad to hear you have made some progress.

                The best way to help you is try it myself, but that will take a little time. In the meantime, some quick ideas. Did you create the musicdb database in MS SQL? I suggest you look at the ant build.xml installer and see what it does. As far as I remember, it creates the musicdb database and the musicdbuser user for MySQL. However, it does not create the database for Oracle -- that other database we have tested with. There is very detailed documentation in the installation guide on what setup you have to perform to use Oracle. I suggest looking at it and substituting MS SQL for Oracle.

                Another thought. You got the ecbo sample working right? Before changing two things -- going to a jaxrs connector and a MS SQL database -- it might be better to get the ecbo connector working with the new database.
                • 20. Re: Help Regarding ECBO Api
                  807581
                  Hi Tomamiro,

                  I have tried with ECBO api also , when i create connection pool for MSSQL server the default is not supporting to javax.sql.DataSource . Then , i tried with some other driver sun.jdbc.odbc.ee.DataSource then iam to ping the server with musicdbuser and musidbpass credentials . When i create a user its throwing me exception regarding credentials and message follows:
                  javax.jcr.LoginException: Login failed:javax.jcr.SimpleCredentials@d4c984:null,null

                  Actually its hitting the provider class and it is checking credentials has to start with musicdbuser , and then its throwing the above exception.

                  And in the MusicDbDataSource class i have change the code with following in retriving the connection :

                  * public Connection getConnection(String username, String password)*

                  * {*
                  * try {*
                  * // Load the database driver*
                  * Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");*

                  * // Get a connection to the database*
                  * return DriverManager.getConnection(*
                  * "jdbc:odbc:musicdb",*
                  * "musicdbuser1", "musicdbpass1");*
                  * }*
                  * catch (Exception e) {*
                  * throw new RuntimeException("5-----"+e+ " "+ username +" "+password);*
                  * }*
                  * }*


                  But I dont get the exception starting with 5--- and the exception message.


                  Can u help me out in this regard.
                  1 2 Previous Next