You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Brian Gregory <bg...@g-webdesign.com> on 2008/02/28 03:43:50 UTC

Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

I've encountered the INSERT instead of UPDATE bug in OpenJPA 1.0.0 (and
verified that 1.0.1 behaves the same) and would like to force my webapp to
use 1.0.2. 

I've tried: 

1. placing the openjpa-1.0.2.jar in my WEB-INF/lib directory 
2. installing the jar here:
repository/org/apache/openjpa/openjpa/1.0.2/openjpa-1.0.2.jar 
3. including the dependency in my geronimo-web.xml 

    <sys:dependencies> 
      <sys:dependency> 
        <sys:groupId>org.apache.openjpa</sys:groupId> 
        <sys:artifactId>openjpa</sys:artifactId> 
        <sys:version>1.0.2</sys:version> 
        <sys:type>jar</sys:type> 
      </sys:dependency> 
    </sys:dependencies> 

4. Removing the 1.0.0 (or 1.0.1) version from the geronimo repository 
5. Renaming the jar to openjpa-1.0.0.jar and stomping on top of the jar at
repository/org/apache/openjpa/openjpa/1.0.0/openjpa-1.0.0.jar 


In cases 1-3 the following is still reported: 
8  default  INFO   [http-8080-1] openjpa.Runtime - Starting OpenJPA 1.0.0 

In case 4, geronimo won't start because of dependencies on 1.0.0 (of course) 

In case 5 it worked, but it seems like a horrible hack at best (production
management nightmare) 

Anyone have a suggestion? 
-- 
View this message in context: http://www.nabble.com/Upgrade-OpenJPA-to-v1.0.2-in-Geronimo-2.0-or-2.1-due-to-bug-tp15728483s134p15728483.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

Posted by Brian Gregory <bg...@g-webdesign.com>.
I added this to the aliases:

org.apache.geronimo.configs/openjpa//car to
org.apache.geronimo.configs/persistence/2.0.2/car

Add now I get the following when my webapp loads:

org.apache.geronimo.kernel.repository.MissingDependencyException: Missing
dependency: to org.apache.geronimo.configs/persistence/2.0.2/car




Brian Gregory wrote:
> 
> The artifact_aliases.properties works great in 2.1.
> The WEB-INF/lib does not.
> 
> I may try your other suggestions, but won't they cause dependency
> problems?
> 

-- 
View this message in context: http://www.nabble.com/Upgrade-OpenJPA-to-v1.0.2-in-Geronimo-2.0-or-2.1-due-to-bug-tp15728483s134p15737177.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

Posted by Brian Gregory <bg...@g-webdesign.com>.
The artifact_aliases.properties works great in 2.1.
The WEB-INF/lib does not.

I may try your other suggestions, but won't they cause dependency problems?
-- 
View this message in context: http://www.nabble.com/Upgrade-OpenJPA-to-v1.0.2-in-Geronimo-2.0-or-2.1-due-to-bug-tp15728483s134p15736930.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

Posted by David Jencks <da...@yahoo.com>.
On Feb 27, 2008, at 8:21 PM, Brian Gregory wrote:

>
> I tried placing the substitution in the artifact_alias.properties  
> file and it
> doesn't seem to do anything in geronimo 2.0.2. (I tried to force it by
> removing the 1.0.0 dir to force the dependency but no dice)
>
> I will also try 2.1 ... tomorrow. I will also Report it ...  
> tomorrow. I'm
> fried.

I don't remember exactly when I made the artifact_alias for jars  
work.... I think it was after 2.0.2 though.  Please tell us how it  
works.

btw you might be able to get the "jar in ear/war" to work by mapping  
o.a.g.configs/openjpa//car to o.a.g.configs/persistence/2.0.2/car

Another thing you could try with the "jar in ear/war" method is using  
hidden-classes to hide the openjpa that geronimo has in it.  I think  
the artifact_aliases is maybe better though.

thanks
david jencks
>
> Thanks for the response.
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Upgrade-OpenJPA- 
> to-v1.0.2-in-Geronimo-2.0-or-2.1-due-to-bug- 
> tp15728483s134p15729306.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>



Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

Posted by Brian Gregory <bg...@g-webdesign.com>.
I tried placing the substitution in the artifact_alias.properties file and it
doesn't seem to do anything in geronimo 2.0.2. (I tried to force it by
removing the 1.0.0 dir to force the dependency but no dice)

I will also try 2.1 ... tomorrow. I will also Report it ... tomorrow. I'm
fried.

Thanks for the response. 



-- 
View this message in context: http://www.nabble.com/Upgrade-OpenJPA-to-v1.0.2-in-Geronimo-2.0-or-2.1-due-to-bug-tp15728483s134p15729306.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Wed, Feb 27, 2008 at 6:43 PM, Brian Gregory <bg...@g-webdesign.com> wrote:

>  1. placing the openjpa-1.0.2.jar in my WEB-INF/lib directory

I'm pretty sure I've read in the spec that a jpa provider can be put
in WEB-INF/lib directory and it should be the one used by the webapp
overriding the one provided by the application server. Don't know if
Geronimo supports this. It looks it does not. It's a bug then. Report
the issue.

As to 4-5 you can use artifact_alias entry to get geronimo to find it
(quotes from DJ's last email ;-))

entries would look like
org.apache.openjpa/openjpa//jar=org.apache.openjpa/openjpa/1.0.2/jar
org.apache.openjpa/openjpa/1.0.0/jar=org.apache.openjpa/openjpa/1.0.2/jar

I have never used the technique so I'd be glad if you let me know how
it worked ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl