You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Mikko Nylén <mi...@gmail.com> on 2009/02/25 21:53:58 UTC

Problem with Hibernate

Hi!

I'm having some trouble setting hibernate-core as one of my dependencies. My
ivy.xml file looks like this:

-------------------------------------------

<ivy-module version="2.0">
    <info
        organisation="..."
        module="..."
        status="integration">
    </info>

    <dependencies>
        <dependency org="junit" name="junit" rev="4.5" />
        <dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA"
/>
    </dependencies>
</ivy-module>

----------------------------------------

And the result when running the <ivy:retrieve ... /> Ant task is:

--------------------------------------
No ivy:settings found for the default reference 'ivy.instance'.  A default
instance will be used
no settings file found, using default...
[ivy:retrieve] :: Ivy 2.0.0 - 20090108225011 :: http://ant.apache.org/ivy/::
:: loading settings :: url =
jar:file:/home/mnylen/.ant/lib/ivy-2.0.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies ::
mnylen#...;working@mnylen-desktop
[ivy:retrieve]     confs: [default]
[ivy:retrieve]     found junit#junit;4.5 in public
[ivy:retrieve]     found org.hibernate#hibernate-core;3.3.1.GA in public
[ivy:retrieve]     found antlr#antlr;2.7.6 in public
[ivy:retrieve]     found commons-collections#commons-collections;3.1 in
public
[ivy:retrieve]     found dom4j#dom4j;1.6.1 in public
[ivy:retrieve]     found xml-apis#xml-apis;1.0.b2 in public
[ivy:retrieve]     found javax.transaction#jta;1.1 in public
[ivy:retrieve]     found org.slf4j#slf4j-api;1.5.2 in public
[ivy:retrieve]     found javax.security#jaas;1.0.01 in public
[ivy:retrieve]     found javax.security#jacc;1.0 in public
[ivy:retrieve]     found ant#ant;1.6.5 in public
[ivy:retrieve]     found javassist#javassist;3.4.GA in public
[ivy:retrieve]     found org.hibernate#hibernate-cglib-repack;2.1_3 in
public
[ivy:retrieve] :: resolution report :: resolve 355ms :: artifacts dl 860ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   13  |   0   |   0   |   0   ||   16  |   0   |
    ---------------------------------------------------------------------
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]         [FAILED     ] javax.security#jaas;1.0.01!jaas.jar:
(0ms)
[ivy:retrieve]     ==== shared: tried
[ivy:retrieve]
/home/mnylen/.ivy2/shared/javax.security/jaas/1.0.01/jars/jaas.jar
[ivy:retrieve]     ==== public: tried
[ivy:retrieve]
http://repo1.maven.org/maven2/javax/security/jaas/1.0.01/jaas-1.0.01.jar
[ivy:retrieve]         [FAILED     ] javax.security#jacc;1.0!jacc.jar:
(0ms)
[ivy:retrieve]     ==== shared: tried
[ivy:retrieve]
/home/mnylen/.ivy2/shared/javax.security/jacc/1.0/jars/jacc.jar
[ivy:retrieve]     ==== public: tried
[ivy:retrieve]
http://repo1.maven.org/maven2/javax/security/jacc/1.0/jacc-1.0.jar
[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]         ::              FAILED DOWNLOADS            ::
[ivy:retrieve]         :: ^ see resolution messages for details  ^ ::
[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]         :: javax.security#jaas;1.0.01!jaas.jar
[ivy:retrieve]         :: javax.security#jacc;1.0!jacc.jar
[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED

------------------------------------

What I'm missing here?

Regards,
Mikko Nylén

Re: Problem with Hibernate

Posted by Mikko Nylén <mi...@gmail.com>.
Yeah,

I noticed that too.

However, when I was reading Harnessing Hibernate from O'Reilly there was
something about javax.transaction.jta being non-free and thus it wouldn't be
available from the Maven repositories. The solution seems to be excluding
organizations javax.security and javax.transaction when specifying
hibernate-core as dependency and then adding a dependency to
org.apache.geronimo.specs#geronimo-jta_1.1_spec. My ivy.xml now looks like
this:

--------------------------------------

<ivy-module version="2.0">
    <info
        organisation="mnylen"
        module="..."
        status="integration">
    </info>

    <dependencies>
        <dependency org="junit" name="junit" rev="4.5" />

        <dependency org="org.apache.geronimo.specs"
name="geronimo-jta_1.1_spec" rev="1.1.1" />

        <dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA
">
            <exclude org="javax.transaction" />
            <exclude org="javax.security" />
        </dependency>

        <dependency org="org.hibernate" name="hibernate-tools" rev="3.2.0.ga"
/>
    </dependencies>
</ivy-module>

--------------------------------------

This seems to be working fine. At least, I dont get errors during
ivy:retrieve.

- Mikko Nylén

2009/2/27 Lee Theobald <Le...@openobjects.com>

>
> I'm getting the same error Nikko.  I don't think it's you or me though.
> Taking a look at contents of the repository
> (http://repo1.maven.org/maven2/javax/security/), the jar files mentioned
> in
> the output don't exist at the locations I believe they should.
>
> Have the jar files been removed for some reason? Do we need to link to
> another repository?
>
> The page for the JACC artifact also have a link to a jar file that doesn't
> exist any more:
>
> http://mavensearch.net/search?q=group:javax.security+artifact:jacc+version:1.0
>
> Lee,
> --
> View this message in context:
> http://www.nabble.com/Problem-with-Hibernate-tp22211560p22243300.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>

Re: Problem with Hibernate

Posted by Lee Theobald <Le...@openobjects.com>.
I'm getting the same error Nikko.  I don't think it's you or me though. 
Taking a look at contents of the repository
(http://repo1.maven.org/maven2/javax/security/), the jar files mentioned in
the output don't exist at the locations I believe they should.

Have the jar files been removed for some reason? Do we need to link to
another repository?

The page for the JACC artifact also have a link to a jar file that doesn't
exist any more:
http://mavensearch.net/search?q=group:javax.security+artifact:jacc+version:1.0

Lee,
-- 
View this message in context: http://www.nabble.com/Problem-with-Hibernate-tp22211560p22243300.html
Sent from the ivy-user mailing list archive at Nabble.com.