Results 1 to 2 of 2

Thread: Referencing a simple roo projects domain classes

  1. #1
    Join Date
    Apr 2010
    Posts
    10

    Question Referencing a simple roo projects domain classes

    Hello Everyone,
    I've been developing a webapplication with a special server backend.
    The basic architecture is a webapplication running in a tomcat with database connection as usual and a server backend application that uses the same domain classes.
    It accepts incoming connections from remote clients and writes into the same database, the webapplication uses to present the data.

    After I have maintained the same classes in both projects I decided to extract the domain classes into a seperate (roo project) and include the dependency (scope: compile) via maven in the two other projects.

    While that works fine with the webapplication the backend application doesn't seem to be able to use the classes in runtime. Compiling with maven install works fine though.

    Starting the application results in the following error:

    Code:
    [EL Info]: 2012-02-14 11:19:30.735--ServerSession(1472770637)--EclipseLink, version: Eclipse Persistence Services - 2.3.1.v20111018-r10243
    [EL Info]: 2012-02-14 11:19:30.912--ServerSession(1472770637)--file:/C:/GIT Repository/Engeo/EngeoServer/target/classes/_persistenceUnit login successful
    [EL Warning]: 2012-02-14 11:19:30.932--The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units.  Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element
    Exception in thread "main" org.springframework.dao.InvalidDataAccessApiUsageException: Object: 2012-02-14 11:19:30 @ :  is not a known entity type.; nested exception is java.lang.IllegalArgumentException: Object: 2012-02-14 11:19:30 @ :  is not a known entity type.
    Does anybody happen to have an idea, where the problem may be or how else this could/should be realized?

    thank you very much in advance

    -tjr

  2. #2
    Join Date
    Apr 2010
    Posts
    10

    Talking

    Found the solution!

    So for further reference,
    this solved it:
    http://mojo.codehaus.org/aspectj-mav...weaveJars.html

    had to add the weave deps:
    Code:
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.4</version>
            <configuration>
              <weaveDependencies>
                <weaveDependency>
                  <groupId>org.agroup</groupId>
                  <artifactId>to-weave</artifactId>
                </weaveDependency>
              </weaveDependencies>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>compile</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •