Failed to add output directory to classpath

245 views
Skip to first unread message

Chris Cleveland

unread,
May 18, 2012, 12:55:10 PM5/18/12
to activejd...@googlegroups.com
I'm getting an error in my project's POM file. I have this section to enable instrumentation:

            <plugin>
                <groupId>org.javalite</groupId>
                <artifactId>activejdbc-instrumentation</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>instrument</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

In Eclipse, the <execution> tag is highlighted in red and shows the error "Failed to add output directory to classpath (org.javalite:activejdbc-instrumentation:1.2.2:instrument:default:process-classes)"

This is a plain-vanilla Maven project, using the standard layout. What could be wrong?

ipolevoy

unread,
May 18, 2012, 2:44:20 PM5/18/12
to activejd...@googlegroups.com
Chris, does it work on the command line?

thanks
igor

Chris Cleveland

unread,
May 18, 2012, 2:58:33 PM5/18/12
to activejd...@googlegroups.com
It does. A "mvn install" works fine. A "START INSTRUMENTATION" section appears in the maven output and at the end it says "build success".

When I run the code, though, I get this error:

org.javalite.activejdbc.InitException: Failed to find table: main_$_users
    at org.javalite.activejdbc.MetaModel.getAttributeNames(MetaModel.java:143)
    at org.javalite.activejdbc.MetaModel.checkAttributeOrAssociation(MetaModel.java:299)
    at org.javalite.activejdbc.Model.set(Model.java:196)

My model class is "User". I do not know if the failure above is a problem with instrumentation or a completely different issue.

ipolevoy

unread,
May 18, 2012, 5:05:38 PM5/18/12
to activejd...@googlegroups.com
hm, never seen this before, what is the name of your model?
Is your model an inner class by any chance?
have you tried @Table annotation?

thanks
igor

Chris Cleveland

unread,
May 18, 2012, 5:32:10 PM5/18/12
to activejd...@googlegroups.com
Yes, it was an inner class. Good catch.
Reply all
Reply to author
Forward
0 new messages