<html><head></head><body><div class="ydp8bd43423yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div>Hi,</div><div><br></div><div>Sorry to bother you all, but I have been struggling with this point now (trying to migrate my Java+OpenSAML app to 3.x), and I have been stuck with this current problem.</div><div><br></div><div>I cannot seem to find the correct imports for "Configuration" and for "SecurityConfiguration".</div><div><br></div><div>If I include the xmltooling in the dependencies, Eclipse suggests/lets me add:</div><div><br></div><div>import org.opensaml.xml.Configuration</div><div>import org.opensaml.xml.security.SecurityConfiguration</div><div><br></div><div>but, if I do that, then I get a different error:</div><div><br></div><div><span>Description    Resource    Path    Location    Type<br>Type mismatch: cannot convert from org.opensaml.xml.XMLObjectBuilderFactory to org.opensaml.core.xml.XMLObjectBuilderFactory    SAMLWriter.java    /SAMLWriter/src/main/java    line 459    Java Problem<br><br></span><div>That error is happening on this line:</div><div><br></div><div><span>    private static XMLObjectBuilderFactory builderFactory;<br><br>    public static XMLObjectBuilderFactory getSAMLBuilder() throws ConfigurationException{<br><br>        if(builderFactory == null) {<br>              builderFactory = Configuration.getBuilderFactory();                   // <<<<< ERROR IS HERE...<br>        }<br>        return builderFactory;<br></span><div><span>    }<br></span></div><div><br></div><div><br></div><div>I think that I am either importing the wrong classes for Configuration and SecurityConfiguration (like I should be importing and using some classes from org.opensaml.core.xml instead of from org.opensaml.xml?), or maybe for OpenSAML 3.x, I should be using some other class/method to create the builderFactory?<br><span></span></div></div><div><br></div><div>If anyone can point me to how to get past this it would be appreciated!!</div><div><br></div><div>Thanks,</div><div>Jim<br></div></div><div><br></div><div><br></div><div><br></div>
        
        </div><div id="ydpc0137640yahoo_quoted_1931235895" class="ydpc0137640yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Saturday, February 23, 2019, 8:26:46 PM EST, o haya <ohaya@yahoo.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">Hi Brent,<br></div><div dir="ltr"><br></div><div dir="ltr">Thanks for all the info, esp. the links for the Javadocs - I had been looking for those, but wasn't able to find them earlier.  I'll try to resolve what I can and post back here on the ones that I can't find.<br></div><div dir="ltr"><br></div><div dir="ltr">Thanks,<br></div><div dir="ltr">Jim<br></div><div dir="ltr"><br></div><div dir="ltr">--------------------------------------------<br></div><div dir="ltr">On Sat, 2/23/19, Brent Putman <<a href="mailto:putmanb@georgetown.edu" rel="nofollow" target="_blank">putmanb@georgetown.edu</a>> wrote:<br></div><div dir="ltr"><br></div><div dir="ltr"> Subject: Re: Problems trying to migrate/build using OpenSAML3 (3.3.0) with Eclipse and Maven<br></div><div dir="ltr"> To: <a href="mailto:dev@shibboleth.net" rel="nofollow" target="_blank">dev@shibboleth.net</a><br></div><div dir="ltr"> Date: Saturday, February 23, 2019, 4:53 PM<br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     On 2/23/19<br></div><div dir="ltr"> 12:59 PM, o haya wrote:<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr">       Hi,<br></div><div dir="ltr"> <br></div><div dir="ltr"> I am trying to migrate the application that I had written (a<br></div><div dir="ltr"> modified version of SAMLWriter.java) earlier using OpenSAML<br></div><div dir="ltr"> 2.6.6, now, to OpenSAML 3.3.0 using Eclipse and Maven.<br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     Well, as I said before you don't have to use<br></div><div dir="ltr"> Maven, nor Eclipse. <br></div><div dir="ltr">       Use what you are comfortable with.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr">       <br></div><div dir="ltr"> <br></div><div dir="ltr"> I am not that familiar with Maven, but anyway, I added<br></div><div dir="ltr"> dependencies in the pom.xml:<br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     The use of dependencyManagement is a little overkill<br></div><div dir="ltr"> for a single<br></div><div dir="ltr">       project like this, but it's not wrong. I don't<br></div><div dir="ltr"> see any other<br></div><div dir="ltr">       obvious problems.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">       <br></div><div dir="ltr"> But, when I do Run As ==> Maven Build ==> clean<br></div><div dir="ltr"> install -U, I am getting some errors that I haven't been<br></div><div dir="ltr"> able to resolve so far:<br></div><div dir="ltr"> <br></div><div dir="ltr"> - Configuration cannot be resolved<br></div><div dir="ltr"> <br></div><div dir="ltr"> - IdentifierGenerator cannot be resolved to a type<br></div><div dir="ltr"> <br></div><div dir="ltr"> - SecureRandomIdentifierGenerator cannot be resolved to a<br></div><div dir="ltr"> type<br></div><div dir="ltr"> <br></div><div dir="ltr"> - SecurityConfiguration cannot be resolved to a type<br></div><div dir="ltr"> <br></div><div dir="ltr"> - SecurityHelper cannot be resolved<br></div><div dir="ltr"> <br></div><div dir="ltr"> - The constructor BasicX509Credential() is undefined<br></div><div dir="ltr"> <br></div><div dir="ltr"> - XMLHelper cannot be resolved<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     3.x is not 2.x.  At the very least all the package<br></div><div dir="ltr"> names changed,<br></div><div dir="ltr">       so any existing 'import' statements are<br></div><div dir="ltr"> wrong.  In many cases the<br></div><div dir="ltr">       code itself was refactored or rewritten, so classes<br></div><div dir="ltr"> and methods<br></div><div dir="ltr">       don't exist anymore, or have different names, or<br></div><div dir="ltr">       method/constructor arguments are different, etc.<br></div><div dir="ltr">     Some of the "cannot be resolved" ones are<br></div><div dir="ltr"> likely simply package<br></div><div dir="ltr">       changes.  Some of those classes don't exist<br></div><div dir="ltr"> anymore however, like<br></div><div dir="ltr">       XMLHelper, SecurityHelper, they were replaced by other<br></div><div dir="ltr"> things.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     The Javadocs are your friend:<br></div><div dir="ltr">     <a href="https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation" rel="nofollow" target="_blank">https://wiki.shibboleth.net/confluence/display/OS30/APIDocumentation</a><br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     For usage examples, the best thing is to look at the<br></div><div dir="ltr"> unit tests<br></div><div dir="ltr">       in the various projects.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr">       <br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr"> For the BasicX509Credential() error, this is the line that<br></div><div dir="ltr"> it is flagging in my code:<br></div><div dir="ltr"> <br></div><div dir="ltr">                                    BasicX509Credential<br></div><div dir="ltr"> credential = new BasicX509Credential();<br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     IIRC there is no longer a no-arg ctor for that<br></div><div dir="ltr"> class.  It takes a<br></div><div dir="ltr">       mandatory X509Certificate and optional PrivateKey. <br></div><div dir="ltr"> That's a good<br></div><div dir="ltr">       example of the kind of things that changed.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr">       <br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr"> As I said, I am not that familiar with Maven, so I am not<br></div><div dir="ltr"> sure if I need to add some other dependencies in the pom, or<br></div><div dir="ltr"> do I need to modify code that uses those types that are<br></div><div dir="ltr"> getting the errors?<br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     Yes, definitely many types have been<br></div><div dir="ltr"> added/removed/modified, so<br></div><div dir="ltr">       the corresponding 2.x code definitely must change.<br></div><div dir="ltr">     Wrt dependencies, you definitely need java-support<br></div><div dir="ltr"> from our<br></div><div dir="ltr">       projects, although if you're using Maven that will<br></div><div dir="ltr"> be resolved as<br></div><div dir="ltr">       a transitive dependency, as will all the other deps. <br></div><div dir="ltr"> If not using<br></div><div dir="ltr">       Maven then you'd have to manually include all the<br></div><div dir="ltr"> right jars in<br></div><div dir="ltr">       your project.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr">       <br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr"> Also, as I said I have the dependencies configured for<br></div><div dir="ltr"> opensaml version 3.3.0, but is there not a 3.4.2 in Maven?<br></div><div dir="ltr"> <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     Yes, 3.4.2 is the latest.<br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">     <br></div><div dir="ltr">     <br></div><div dir="ltr"> <br></div><div dir="ltr">   -- <br></div><div dir="ltr"> To unsubscribe from this list send an email to<br></div><div dir="ltr"> <a href="mailto:dev-unsubscribe@shibboleth.net" rel="nofollow" target="_blank">dev-unsubscribe@shibboleth.net</a><br></div><div dir="ltr"> -----Inline Attachment Follows-----<br></div><div dir="ltr"> <br></div><div dir="ltr"> </div></div>
            </div>
        </div></body></html>