OODT
  1. OODT
  2. OODT-64

java sql BatchUpdateExeception when trying to run TestCatalogServiceLocal

    Details

    • Type: Question Question
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1-incubating, 0.2
    • Fix Version/s: 0.1-incubating, 0.2
    • Component/s: catalog
    • Labels:
      None
    • Environment:

      Mac OSX 10.6 and Ubuntu Lucid Lynx

      Description

      I'm I missing an external dependency (outside of OODT and maven repository) to get this working?
      Or is this a bug?

      Running org.apache.oodt.cas.catalog.system.impl.TestCatalogServiceLocal
      java.sql.BatchUpdateException: failed batch

      Traceback from code as far as I can see:
      at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)
      at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
      at org.apache.oodt.commons.database.SqlScript.doExecuteBatch(SqlScript.java:221)
      at org.apache.oodt.commons.database.SqlScript.execute(SqlScript.java:132)
      at org.apache.oodt.cas.catalog.mapping.InMemoryIngestMapper.<init>(InMemoryIngestMapper.java:37)
      at org.apache.oodt.cas.catalog.mapping.InMemoryIngestMapperFactory.createMapper(InMemoryIngestMapperFactory.java:40)
      at org.apache.oodt.cas.catalog.mapping.InMemoryIngestMapperFactory.createMapper(InMemoryIngestMapperFactory.java:31)
      at org.apache.oodt.cas.catalog.system.impl.CatalogServiceLocalFactory.createCatalogService(CatalogServiceLocalFactory.java:60)
      at org.apache.oodt.cas.catalog.system.impl.TestCatalogServiceLocal.<init>(TestCatalogServiceLocal.java:76)

        Activity

        Hide
        Thomas Bennett added a comment -

        Not sure how this happened.

        Seems to be a file permission issue. Perhaps I ran it as sudo at some point... After deleting root owned maven tmp files and folders, the test passed.

        For Ubuntu I sudo deleted all the hsqld work files / folders in /tmp. Something like the following files:
        /tmp/hsperfdata_*
        /tmp/1
        /tmp/2
        /tmp/testMapperCat.log
        /tmp/testMapperCat.properties

        Same for Mac OS X:
        I sudo deleted (actually moved just in case) all the tmp files / folders in /var/folders/

        Show
        Thomas Bennett added a comment - Not sure how this happened. Seems to be a file permission issue. Perhaps I ran it as sudo at some point... After deleting root owned maven tmp files and folders, the test passed. For Ubuntu I sudo deleted all the hsqld work files / folders in /tmp. Something like the following files: /tmp/hsperfdata_* /tmp/1 /tmp/2 /tmp/testMapperCat.log /tmp/testMapperCat.properties Same for Mac OS X: I sudo deleted (actually moved just in case) all the tmp files / folders in /var/folders/
        Hide
        Thomas Bennett added a comment -

        Resolved issue. See comment.

        Show
        Thomas Bennett added a comment - Resolved issue. See comment.
        Hide
        Chris A. Mattmann added a comment -

        Thanks Tom, yep looks like you solved it. I was going to ask if there was some issue in downloading that dependency from one of the external repos.

        Great!

        Show
        Chris A. Mattmann added a comment - Thanks Tom, yep looks like you solved it. I was going to ask if there was some issue in downloading that dependency from one of the external repos. Great!
        Hide
        Thomas Bennett added a comment - - edited

        Hi Chris,

        I was going to ask if there was some issue in downloading that dependency

        No. Believe it or not, I was looking for the dependency in the wrong place -
        it was there all along. I was also misinterpreting the error message as a
        missing dependency.

        So... I've built all the components and I'm wanting to get a cataloger up
        and running.

        And now for my favourite all time dumb-ass question: How do I do that?

        I need some basics:

        • Can I launch stuff through maven?
        • Where are the actual executables built by maven?
        • How do I generate a class path. I've seen some maven targets
          like: dependency:build-classpath. Which generated a class path for me, but
          this was not particularly useful.

        Hmmm, I may just find the answers before you read this email - and have a
        good laugh at myself however, thought I would send this email just in
        case I don't. It is a bit of a show stopper at the moment.

        Show
        Thomas Bennett added a comment - - edited Hi Chris, I was going to ask if there was some issue in downloading that dependency No. Believe it or not, I was looking for the dependency in the wrong place - it was there all along. I was also misinterpreting the error message as a missing dependency. So... I've built all the components and I'm wanting to get a cataloger up and running. And now for my favourite all time dumb-ass question: How do I do that? I need some basics: Can I launch stuff through maven? Where are the actual executables built by maven? How do I generate a class path. I've seen some maven targets like: dependency:build-classpath. Which generated a class path for me, but this was not particularly useful. Hmmm, I may just find the answers before you read this email - and have a good laugh at myself however, thought I would send this email just in case I don't. It is a bit of a show stopper at the moment.
        Hide
        Chris A. Mattmann added a comment -

        Hey Tom,

        Happy Thanksgiving on the - side of GMT! (yes, I know Thanksgiving is a U.S. holiday, but hey I can still pass along the good vibes!)

        I was going to ask if there was some issue in downloading that dependency

        No. Believe it or not, I was looking for the dependency in the wrong place -
        it was there all along. I was also misinterpreting the error message as a
        missing dependency.

        Oh yeah, weird, that happens sometimes with Maven.

        So... I've built all the components and I'm wanting to get a cataloger up
        and running.

        And now for my favourite all time dumb-ass question: How do I do that?

        Hahah! LOL not a dumb ass question, a valid one! One of my favorite tutorials is this one [1], that shows how to get the File Manager up and running and to ingest a test product. If you get that far, then adding additional product types is not too hard and I'd be happy to help. I've got some material (including a "cookbook"-like tutorial that shows how to turn the FM into an iTunes podcaster!)

        • Can I launch stuff through maven?

        You definitely could, especially using Maven Antrun, but I wouldn't recommend it. I'd simply run the File Manager, Workflow Manager, or Resource Manager, as separate daemon services that you interact with.

        • Where are the actual executables built by maven?

        The executables are actually jar files that are dropped in the lib directory of the unpacked tarball for each one of the services. For example, the File Manager service is built into the target directory, you get something like cas-filemgr-0.1-incubating-dist.tar.gz. You then grab that tar ball, and then unpack it, and you end up with a ./bin ./etc ./policy ./lib ./logs CHANGES.txt style unpacked directory. ./lib contains all the built jar file libraries. Each one of those typically has a main class, or some executable API or code. The services themselves are run by daemon scripts that are packaged in the ./bin directory. Those script contain the right commands to run the CAS/OODT service on a particular port, setting the right classpath (in the ./lib directory), and with the right property parameters.

        • How do I generate a class path. I've seen some maven targets
          like: dependency:build-classpath. Which generated a class path for me, but
          this was not particularly useful.

        No worries, the ./bin scripts will take care of creating this for you, usually using the java.ext.dirs extension lib mechanism.

        Hmmm, I may just find the answers before you read this email - and have a
        good laugh at myself however, thought I would send this email just in
        case I don't. It is a bit of a show stopper at the moment.

        No worries, hopefully the combination of this help, and the email that Dave Woollard (and Brian Foster) sent will help out. If you need more help let me know and I (or any of the other community members) would be glad to help. We're grateful to have you here.

        Cheers,
        Chris

        [1] http://oodt.apache.org/components/maven/filemgr/user/basic.html

        Show
        Chris A. Mattmann added a comment - Hey Tom, Happy Thanksgiving on the - side of GMT! (yes, I know Thanksgiving is a U.S. holiday, but hey I can still pass along the good vibes!) I was going to ask if there was some issue in downloading that dependency No. Believe it or not, I was looking for the dependency in the wrong place - it was there all along. I was also misinterpreting the error message as a missing dependency. Oh yeah, weird, that happens sometimes with Maven. So... I've built all the components and I'm wanting to get a cataloger up and running. And now for my favourite all time dumb-ass question: How do I do that? Hahah! LOL not a dumb ass question, a valid one! One of my favorite tutorials is this one [1] , that shows how to get the File Manager up and running and to ingest a test product. If you get that far, then adding additional product types is not too hard and I'd be happy to help. I've got some material (including a "cookbook"-like tutorial that shows how to turn the FM into an iTunes podcaster!) Can I launch stuff through maven? You definitely could, especially using Maven Antrun, but I wouldn't recommend it. I'd simply run the File Manager, Workflow Manager, or Resource Manager, as separate daemon services that you interact with. Where are the actual executables built by maven? The executables are actually jar files that are dropped in the lib directory of the unpacked tarball for each one of the services. For example, the File Manager service is built into the target directory, you get something like cas-filemgr-0.1-incubating-dist.tar.gz. You then grab that tar ball, and then unpack it, and you end up with a ./bin ./etc ./policy ./lib ./logs CHANGES.txt style unpacked directory. ./lib contains all the built jar file libraries. Each one of those typically has a main class, or some executable API or code. The services themselves are run by daemon scripts that are packaged in the ./bin directory. Those script contain the right commands to run the CAS/OODT service on a particular port, setting the right classpath (in the ./lib directory), and with the right property parameters. How do I generate a class path. I've seen some maven targets like: dependency:build-classpath. Which generated a class path for me, but this was not particularly useful. No worries, the ./bin scripts will take care of creating this for you, usually using the java.ext.dirs extension lib mechanism. Hmmm, I may just find the answers before you read this email - and have a good laugh at myself however, thought I would send this email just in case I don't. It is a bit of a show stopper at the moment. No worries, hopefully the combination of this help, and the email that Dave Woollard (and Brian Foster) sent will help out. If you need more help let me know and I (or any of the other community members) would be glad to help. We're grateful to have you here. Cheers, Chris [1] http://oodt.apache.org/components/maven/filemgr/user/basic.html

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Bennett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development