Ah! So in this external jar you need to declare uportal-war-classes as a *provided* dependency. That way it will be available to the jar at compile time but not pulled into the actual uportal-war classpath.

-Eric


On 1/16/13 4:51 PM, Paul Gazda wrote:

The jar is a dependency in the uportal-war pom.xml. In uP3 it is a dependency in uportal-impl pom.xml and ends up in the uPortal/WEB-INF/lib directory.

Paul

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Eric Dalquist
*Sent:* Wednesday, January 16, 2013 4:29 PM
*To:* [email protected]
*Subject:* Re: [uportal-dev] Issues due to possible spring 3.1.3 bug

Where does this code end up living/running? Is it a jar that gets put into the uPortal webapp?

-Eric

On 1/16/13 1:53 PM, Paul Gazda wrote:

    I didn't write the code, so I'm not completely familiar with the
    details, but basically our custom student center is a collection
    of servlets accessed by ajax calls. The custom module references
    uportal-war to gain access to the personManager spring bean so
    that it can get the ID of the authenticated student using the
    portal and then retrieve the class and other information for the
    student from our student database. This works without problems in uP3.

    Paul

    *From:*[email protected]
    <mailto:[email protected]>
    [mailto:[email protected]] *On Behalf Of
    *Eric Dalquist
    *Sent:* Wednesday, January 16, 2013 9:12 AM
    *To:* [email protected]
    <mailto:[email protected]>
    *Subject:* Re: [uportal-dev] Issues due to possible spring 3.1.3 bug

    Honestly uportal-war isn't meant to be used as a dependency by
    other code. I'd be interested in what exactly you're using out of
    uportal-war and see if we can get a better solution on our roadmap
    for you.

    Lots of things beyond just this are likely going to break or act
    in undefined ways when you have the entire uPortal project on the
    classpath twice (what having -classes.jar and the /target/classes
    dir results in).

    -Eric

    On 1/15/13 11:12 AM, Paul Gazda wrote:

        In uP 4.0.8, I have a dependency jar defined in the
        uportal-war pom.xml that uses hibernate. It is part of an
        important custom student center portlet that we use. When I
        include it and run deploy-war, I get many test failures with
        this error:

        Caused by: java.lang.IllegalStateException: Conflicting
        persistence unit definitions for name 'PortalDb':
        
file:/C:/Users/pag/.m2/repository/org/jasig/portal/uportal-war/4.0.8/uportal-war-4.0.8-classes.jar
        
<file:///C:%5CUsers%5Cpag%5C.m2%5Crepository%5Corg%5Cjasig%5Cportal%5Cuportal-war%5C4.0.8%5Cuportal-war-4.0.8-classes.jar>,
        file:/C:/JavaClasses/uportal.git/uportal-war/target/classes
        
<file:///C:%5CJavaClasses%5Cuportal.git%5Cuportal-war%5Ctarget%5Cclasses>

        This seems to be related to a bug in Spring reported here:
        http://www.mulesoft.org/jira/browse/MULE-6241

        When I change the spring version to 3.2.0, the test errors go
        away, but uportal does not start because of spring related errors.

        There seems to be a way of overriding a spring 3.1.3 method to
        work around the problem, but not being very familiar with
        spring, I find it very confusing as to how an internal spring
        method is overridden.

        Unless there is something fairly straightforward that will fix
        this problem, I'm wondering if it would be possible to upgrade
        to spring 3.2.0 in the next release of uP4.

        Thanks.

        Paul Gazda

--
        You are currently subscribed [email protected]  
<mailto:[email protected]>  as:[email protected]  
<mailto:[email protected]>

        To unsubscribe, change settings or access archives, 
seehttp://www.ja-sig.org/wiki/display/JSG/uportal-dev

--
    You are currently subscribed [email protected]  
<mailto:[email protected]>  as:[email protected]  
<mailto:[email protected]>

    To unsubscribe, change settings or access archives, 
seehttp://www.ja-sig.org/wiki/display/JSG/uportal-dev

--

You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to