Hi, Mike! Thanks for your reply!

Michael Dick wrote:
> My first guess is that the services files aren't extracted "properly".
> When
> you use the maven-assembly-plugin is the
> META-INF/services/org.apache.openjpa.lib.conf.ProductDerivation file
> included?

This was one of my gueses, I checked this  - all service files extracted and
actually included in my META-INF/services/. More over, I tryed manually
unpack openjpa-*.jar files and put their content to my bundle in respect
locations (from META-INF - to META-INF, for instance) with no luck =(

The strange thing is that Persistence.createEntityManagerFactory doesn't
throw  any exception and no messages is added to log (logging with default
level TRACE).

There is my pom.xml:

<dependencies>
        <dependency>
            <groupId>h2</groupId>
            <artifactId>h2</artifactId>
            <version>1.1.106</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa-persistence</artifactId>
            <version>1.2.0</version>
            <!-- I also tryed 1.0.1 version -->
        </dependency>
        <dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa-persistence-jdbc</artifactId>
            <version>1.2.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <failOnError>true</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <configuration>
                            <tasks>
                                <java
classname="org.apache.openjpa.enhance.PCEnhancer"
                                      classpathref="maven.runtime.classpath"
                                      dir="target/classes" fork="true"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>ru.btr.locawiki.Locawiki</mainClass>
                            <packageName>ru.btr.locawiki</packageName>
                        </manifest>
                        <manifestEntries>
                            <mode>release</mode>
                            <url>${pom.url}</url>
                        </manifestEntries>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <!-- this is used for inheritance merges -->
                        <phase>package</phase>
                        <!-- append to the packaging phase. -->
                        <goals>
                            <goal>single</goal>
                            <!-- I also tryed "attached" here-->
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


-- 
View this message in context: 
http://n2.nabble.com/Why-doesn%27t-unpacked-openjpa-works-like-packed-openjpa.jar--tp2455600p2455844.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to